HAL
Select one of the symbols to view example projects that use it.
 
Outline
#define __STM32F4xx_HAL_DFSDM_H
Includes
#include "stm32f4xx_hal_def.h"
Exported types
HAL_DFSDM_Channel_StateTypeDef
DFSDM_Channel_OutputClockTypeDef
DFSDM_Channel_InputTypeDef
DFSDM_Channel_SerialInterfaceTypeDef
DFSDM_Channel_AwdTypeDef
DFSDM_Channel_InitTypeDef
DFSDM_Channel_HandleTypeDef
HAL_DFSDM_Filter_StateTypeDef
DFSDM_Filter_RegularParamTypeDef
DFSDM_Filter_InjectedParamTypeDef
DFSDM_Filter_FilterParamTypeDef
DFSDM_Filter_InitTypeDef
DFSDM_Filter_HandleTypeDef
DFSDM_Filter_AwdParamTypeDef
#define DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM
#define DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO
#define DFSDM_CHANNEL_EXTERNAL_INPUTS
#define DFSDM_CHANNEL_INTERNAL_REGISTER
#define DFSDM_CHANNEL_STANDARD_MODE
#define DFSDM_CHANNEL_INTERLEAVED_MODE
#define DFSDM_CHANNEL_DUAL_MODE
#define DFSDM_CHANNEL_SAME_CHANNEL_PINS
#define DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS
#define DFSDM_CHANNEL_SPI_RISING
#define DFSDM_CHANNEL_SPI_FALLING
#define DFSDM_CHANNEL_MANCHESTER_RISING
#define DFSDM_CHANNEL_MANCHESTER_FALLING
#define DFSDM_CHANNEL_SPI_CLOCK_EXTERNAL
#define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL
#define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_FALLING
#define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_RISING
#define DFSDM_CHANNEL_FASTSINC_ORDER
#define DFSDM_CHANNEL_SINC1_ORDER
#define DFSDM_CHANNEL_SINC2_ORDER
#define DFSDM_CHANNEL_SINC3_ORDER
#define DFSDM_FILTER_SW_TRIGGER
#define DFSDM_FILTER_SYNC_TRIGGER
#define DFSDM_FILTER_EXT_TRIGGER
#define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO
#define DFSDM_FILTER_EXT_TRIG_TIM3_TRGO
#define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO
#define DFSDM_FILTER_EXT_TRIG_TIM10_OC1
#define DFSDM_FILTER_EXT_TRIG_TIM2_TRGO
#define DFSDM_FILTER_EXT_TRIG_TIM4_TRGO
#define DFSDM_FILTER_EXT_TRIG_TIM11_OC1
#define DFSDM_FILTER_EXT_TRIG_TIM6_TRGO
#define DFSDM_FILTER_EXT_TRIG_TIM7_TRGO
#define DFSDM_FILTER_EXT_TRIG_EXTI11
#define DFSDM_FILTER_EXT_TRIG_EXTI15
#define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO
#define DFSDM_FILTER_EXT_TRIG_TIM3_TRGO
#define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO
#define DFSDM_FILTER_EXT_TRIG_TIM10_OC1
#define DFSDM_FILTER_EXT_TRIG_TIM4_TRGO
#define DFSDM_FILTER_EXT_TRIG_TIM6_TRGO
#define DFSDM_FILTER_EXT_TRIG_EXTI11
#define DFSDM_FILTER_EXT_TRIG_EXTI15
#define DFSDM_FILTER_EXT_TRIG_RISING_EDGE
#define DFSDM_FILTER_EXT_TRIG_FALLING_EDGE
#define DFSDM_FILTER_EXT_TRIG_BOTH_EDGES
#define DFSDM_FILTER_FASTSINC_ORDER
#define DFSDM_FILTER_SINC1_ORDER
#define DFSDM_FILTER_SINC2_ORDER
#define DFSDM_FILTER_SINC3_ORDER
#define DFSDM_FILTER_SINC4_ORDER
#define DFSDM_FILTER_SINC5_ORDER
#define DFSDM_FILTER_AWD_FILTER_DATA
#define DFSDM_FILTER_AWD_CHANNEL_DATA
#define DFSDM_FILTER_ERROR_NONE
#define DFSDM_FILTER_ERROR_REGULAR_OVERRUN
#define DFSDM_FILTER_ERROR_INJECTED_OVERRUN
#define DFSDM_FILTER_ERROR_DMA
#define DFSDM_FILTER_ERROR_INVALID_CALLBACK
#define DFSDM_NO_BREAK_SIGNAL
#define DFSDM_BREAK_SIGNAL_0
#define DFSDM_BREAK_SIGNAL_1
#define DFSDM_BREAK_SIGNAL_2
#define DFSDM_BREAK_SIGNAL_3
#define DFSDM_CHANNEL_0
#define DFSDM_CHANNEL_1
#define DFSDM_CHANNEL_2
#define DFSDM_CHANNEL_3
#define DFSDM_CHANNEL_4
#define DFSDM_CHANNEL_5
#define DFSDM_CHANNEL_6
#define DFSDM_CHANNEL_7
#define DFSDM_CONTINUOUS_CONV_OFF
#define DFSDM_CONTINUOUS_CONV_ON
#define DFSDM_AWD_HIGH_THRESHOLD
#define DFSDM_AWD_LOW_THRESHOLD
#define DFSDM1_CKOUT_DFSDM2_CKOUT
#define DFSDM1_CKOUT_DFSDM1
#define DFSDM2_CKOUT_DFSDM2_CKOUT
#define DFSDM2_CKOUT_DFSDM2
#define DFSDM1_CKIN_DFSDM2_CKOUT
#define DFSDM1_CKIN_PAD
#define DFSDM2_CKIN_DFSDM2_CKOUT
#define DFSDM2_CKIN_PAD
#define DFSDM1_T4_OC2_BITSTREAM_CKIN0
#define DFSDM1_T4_OC2_BITSTREAM_CKIN2
#define DFSDM1_T4_OC1_BITSTREAM_CKIN3
#define DFSDM1_T4_OC1_BITSTREAM_CKIN1
#define DFSDM2_T3_OC4_BITSTREAM_CKIN0
#define DFSDM2_T3_OC4_BITSTREAM_CKIN4
#define DFSDM2_T3_OC3_BITSTREAM_CKIN5
#define DFSDM2_T3_OC3_BITSTREAM_CKIN1
#define DFSDM2_T3_OC2_BITSTREAM_CKIN6
#define DFSDM2_T3_OC2_BITSTREAM_CKIN2
#define DFSDM2_T3_OC1_BITSTREAM_CKIN3
#define DFSDM2_T3_OC1_BITSTREAM_CKIN7
#define DFSDM1_DATIN0_TO_DATIN0_PAD
#define DFSDM1_DATIN0_TO_DATIN1_PAD
#define DFSDM1_DATIN2_TO_DATIN2_PAD
#define DFSDM1_DATIN2_TO_DATIN3_PAD
#define DFSDM2_DATIN0_TO_DATIN0_PAD
#define DFSDM2_DATIN0_TO_DATIN1_PAD
#define DFSDM2_DATIN2_TO_DATIN2_PAD
#define DFSDM2_DATIN2_TO_DATIN3_PAD
#define DFSDM2_DATIN4_TO_DATIN4_PAD
#define DFSDM2_DATIN4_TO_DATIN5_PAD
#define DFSDM2_DATIN6_TO_DATIN6_PAD
#define DFSDM2_DATIN6_TO_DATIN7_PAD
#define HAL_MCHDLY_CLOCK_DFSDM2
#define HAL_MCHDLY_CLOCK_DFSDM1
#define HAL_DFSDM2_CKIN_PAD
#define HAL_DFSDM2_CKIN_DM
#define HAL_DFSDM1_CKIN_PAD
#define HAL_DFSDM1_CKIN_DM
#define HAL_DFSDM2_CKOUT_DFSDM2
#define HAL_DFSDM2_CKOUT_M27
#define HAL_DFSDM1_CKOUT_DFSDM1
#define HAL_DFSDM1_CKOUT_M27
#define HAL_DATAIN0_DFSDM2_PAD
#define HAL_DATAIN0_DFSDM2_DATAIN1
#define HAL_DATAIN0_DFSDM1_PAD
#define HAL_DATAIN0_DFSDM1_DATAIN1
#define HAL_DATAIN2_DFSDM2_PAD
#define HAL_DATAIN2_DFSDM2_DATAIN3
#define HAL_DATAIN2_DFSDM1_PAD
#define HAL_DATAIN2_DFSDM1_DATAIN3
#define HAL_DATAIN4_DFSDM2_PAD
#define HAL_DATAIN4_DFSDM2_DATAIN5
#define HAL_DATAIN6_DFSDM2_PAD
#define HAL_DATAIN6_DFSDM2_DATAIN7
#define HAL_DFSDM1_CLKIN0_TIM4OC2
#define HAL_DFSDM1_CLKIN2_TIM4OC2
#define HAL_DFSDM1_CLKIN1_TIM4OC1
#define HAL_DFSDM1_CLKIN3_TIM4OC1
#define HAL_DFSDM2_CLKIN0_TIM3OC4
#define HAL_DFSDM2_CLKIN4_TIM3OC4
#define HAL_DFSDM2_CLKIN1_TIM3OC3
#define HAL_DFSDM2_CLKIN5_TIM3OC3
#define HAL_DFSDM2_CLKIN2_TIM3OC2
#define HAL_DFSDM2_CLKIN6_TIM3OC2
#define HAL_DFSDM2_CLKIN3_TIM3OC1
#define HAL_DFSDM2_CLKIN7_TIM3OC1
Exported macros
#define __HAL_DFSDM_CHANNEL_RESET_HANDLE_STATE
#define __HAL_DFSDM_FILTER_RESET_HANDLE_STATE
Exported functions
HAL_DFSDM_ChannelInit(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelDeInit(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelMspInit(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelMspDeInit(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelCkabStart(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelCkabStart_IT(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelCkabStop(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelCkabStop_IT(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelScdStart(DFSDM_Channel_HandleTypeDef *, uint32_t, uint32_t);
HAL_DFSDM_ChannelScdStart_IT(DFSDM_Channel_HandleTypeDef *, uint32_t, uint32_t);
HAL_DFSDM_ChannelScdStop(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelScdStop_IT(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelGetAwdValue(const DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelModifyOffset(DFSDM_Channel_HandleTypeDef *, int32_t);
HAL_DFSDM_ChannelPollForCkab(const DFSDM_Channel_HandleTypeDef *, uint32_t);
HAL_DFSDM_ChannelPollForScd(const DFSDM_Channel_HandleTypeDef *, uint32_t);
HAL_DFSDM_ChannelCkabCallback(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelScdCallback(DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_ChannelGetState(const DFSDM_Channel_HandleTypeDef *);
HAL_DFSDM_FilterInit(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterDeInit(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterMspInit(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterMspDeInit(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterConfigRegChannel(DFSDM_Filter_HandleTypeDef *, uint32_t, uint32_t);
HAL_DFSDM_FilterConfigInjChannel(DFSDM_Filter_HandleTypeDef *, uint32_t);
HAL_DFSDM_FilterRegularStart(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterRegularStart_IT(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterRegularStart_DMA(DFSDM_Filter_HandleTypeDef *, int32_t *, uint32_t);
HAL_DFSDM_FilterRegularMsbStart_DMA(DFSDM_Filter_HandleTypeDef *, int16_t *, uint32_t);
HAL_DFSDM_FilterRegularStop(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterRegularStop_IT(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterRegularStop_DMA(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterInjectedStart(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterInjectedStart_IT(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterInjectedStart_DMA(DFSDM_Filter_HandleTypeDef *, int32_t *, uint32_t);
HAL_DFSDM_FilterInjectedMsbStart_DMA(DFSDM_Filter_HandleTypeDef *, int16_t *, uint32_t);
HAL_DFSDM_FilterInjectedStop(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterInjectedStop_IT(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterInjectedStop_DMA(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterAwdStart_IT(DFSDM_Filter_HandleTypeDef *, const DFSDM_Filter_AwdParamTypeDef *);
HAL_DFSDM_FilterAwdStop_IT(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterExdStart(DFSDM_Filter_HandleTypeDef *, uint32_t);
HAL_DFSDM_FilterExdStop(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterGetRegularValue(const DFSDM_Filter_HandleTypeDef *, uint32_t *);
HAL_DFSDM_FilterGetInjectedValue(const DFSDM_Filter_HandleTypeDef *, uint32_t *);
HAL_DFSDM_FilterGetExdMaxValue(const DFSDM_Filter_HandleTypeDef *, uint32_t *);
HAL_DFSDM_FilterGetExdMinValue(const DFSDM_Filter_HandleTypeDef *, uint32_t *);
HAL_DFSDM_FilterGetConvTimeValue(const DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterPollForRegConversion(DFSDM_Filter_HandleTypeDef *, uint32_t);
HAL_DFSDM_FilterPollForInjConversion(DFSDM_Filter_HandleTypeDef *, uint32_t);
HAL_DFSDM_FilterRegConvCpltCallback(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterRegConvHalfCpltCallback(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterInjConvCpltCallback(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterInjConvHalfCpltCallback(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterAwdCallback(DFSDM_Filter_HandleTypeDef *, uint32_t, uint32_t);
HAL_DFSDM_FilterErrorCallback(DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterGetState(const DFSDM_Filter_HandleTypeDef *);
HAL_DFSDM_FilterGetError(const DFSDM_Filter_HandleTypeDef *);
Private macros
#define IS_DFSDM_CHANNEL_OUTPUT_CLOCK_DIVIDER
#define IS_DFSDM_CHANNEL_FILTER_OVS_RATIO
#define IS_DFSDM_CHANNEL_OFFSET
#define IS_DFSDM_CHANNEL_RIGHT_BIT_SHIFT
#define IS_DFSDM_CHANNEL_SCD_THRESHOLD
#define IS_DFSDM_FILTER_OVS_RATIO
#define IS_DFSDM_FILTER_INTEGRATOR_OVS_RATIO
#define IS_DFSDM_FILTER_AWD_THRESHOLD
#define IS_DFSDM_BREAK_SIGNALS
#define IS_DFSDM_INJECTED_CHANNEL
#define IS_DFSDM_INJECTED_CHANNEL
Files
loading...
SourceVuSTM32 Libraries and SamplesHALInc/stm32f4xx_hal_dfsdm.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file stm32f4xx_hal_dfsdm.h * @author MCD Application Team * @brief Header file of DFSDM HAL module. ****************************************************************************** * @attention * * Copyright (c) 2017 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STM32F4xx_HAL_DFSDM_H #define __STM32F4xx_HAL_DFSDM_H #ifdef __cplusplus extern "C" { #endif #if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx) /* Includes ------------------------------------------------------------------*/ #include "stm32f4xx_hal_def.h" /** @addtogroup STM32F4xx_HAL_Driver * @{ *//* ... */ /** @addtogroup DFSDM * @{ *//* ... */ Includes /* Exported types ------------------------------------------------------------*/ /** @defgroup DFSDM_Exported_Types DFSDM Exported Types * @{ *//* ... */ /** * @brief HAL DFSDM Channel states definition *//* ... */ typedef enum { HAL_DFSDM_CHANNEL_STATE_RESET = 0x00U, /*!< DFSDM channel not initialized */ HAL_DFSDM_CHANNEL_STATE_READY = 0x01U, /*!< DFSDM channel initialized and ready for use */ HAL_DFSDM_CHANNEL_STATE_ERROR = 0xFFU /*!< DFSDM channel state error */ ...}HAL_DFSDM_Channel_StateTypeDef; /** * @brief DFSDM channel output clock structure definition *//* ... */ typedef struct { FunctionalState Activation; /*!< Output clock enable/disable */ uint32_t Selection; /*!< Output clock is system clock or audio clock. This parameter can be a value of @ref DFSDM_Channel_OutputClock *//* ... */ uint32_t Divider; /*!< Output clock divider. This parameter must be a number between Min_Data = 2 and Max_Data = 256 *//* ... */ ...}DFSDM_Channel_OutputClockTypeDef; /** * @brief DFSDM channel input structure definition *//* ... */ typedef struct { uint32_t Multiplexer; /*!< Input is external serial inputs or internal register. This parameter can be a value of @ref DFSDM_Channel_InputMultiplexer *//* ... */ uint32_t DataPacking; /*!< Standard, interleaved or dual mode for internal register. This parameter can be a value of @ref DFSDM_Channel_DataPacking *//* ... */ uint32_t Pins; /*!< Input pins are taken from same or following channel. This parameter can be a value of @ref DFSDM_Channel_InputPins *//* ... */ ...}DFSDM_Channel_InputTypeDef; /** * @brief DFSDM channel serial interface structure definition *//* ... */ typedef struct { uint32_t Type; /*!< SPI or Manchester modes. This parameter can be a value of @ref DFSDM_Channel_SerialInterfaceType *//* ... */ uint32_t SpiClock; /*!< SPI clock select (external or internal with different sampling point). This parameter can be a value of @ref DFSDM_Channel_SpiClock *//* ... */ ...}DFSDM_Channel_SerialInterfaceTypeDef; /** * @brief DFSDM channel analog watchdog structure definition *//* ... */ typedef struct { uint32_t FilterOrder; /*!< Analog watchdog Sinc filter order. This parameter can be a value of @ref DFSDM_Channel_AwdFilterOrder *//* ... */ uint32_t Oversampling; /*!< Analog watchdog filter oversampling ratio. This parameter must be a number between Min_Data = 1 and Max_Data = 32 *//* ... */ ...}DFSDM_Channel_AwdTypeDef; /** * @brief DFSDM channel init structure definition *//* ... */ typedef struct { DFSDM_Channel_OutputClockTypeDef OutputClock; /*!< DFSDM channel output clock parameters */ DFSDM_Channel_InputTypeDef Input; /*!< DFSDM channel input parameters */ DFSDM_Channel_SerialInterfaceTypeDef SerialInterface; /*!< DFSDM channel serial interface parameters */ DFSDM_Channel_AwdTypeDef Awd; /*!< DFSDM channel analog watchdog parameters */ int32_t Offset; /*!< DFSDM channel offset. This parameter must be a number between Min_Data = -8388608 and Max_Data = 8388607 *//* ... */ uint32_t RightBitShift; /*!< DFSDM channel right bit shift. This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x1F *//* ... */ ...}DFSDM_Channel_InitTypeDef; /** * @brief DFSDM channel handle structure definition *//* ... */ #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) typedef struct __DFSDM_Channel_HandleTypeDef #else typedef struct #endif /* USE_HAL_DFSDM_REGISTER_CALLBACKS */ { DFSDM_Channel_TypeDef *Instance; /*!< DFSDM channel instance */ DFSDM_Channel_InitTypeDef Init; /*!< DFSDM channel init parameters */ HAL_DFSDM_Channel_StateTypeDef State; /*!< DFSDM channel state */ #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) void (*CkabCallback) (struct __DFSDM_Channel_HandleTypeDef *hdfsdm_channel); /*!< DFSDM channel clock absence detection callback */ void (*ScdCallback) (struct __DFSDM_Channel_HandleTypeDef *hdfsdm_channel); /*!< DFSDM channel short circuit detection callback */ void (*MspInitCallback) (struct __DFSDM_Channel_HandleTypeDef *hdfsdm_channel); /*!< DFSDM channel MSP init callback */ void (*MspDeInitCallback) (struct __DFSDM_Channel_HandleTypeDef *hdfsdm_channel); /*!< DFSDM channel MSP de-init callback *//* ... */ #endif ...}DFSDM_Channel_HandleTypeDef; #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) /** * @brief DFSDM channel callback ID enumeration definition *//* ... */ typedef enum { HAL_DFSDM_CHANNEL_CKAB_CB_ID = 0x00U, /*!< DFSDM channel clock absence detection callback ID */ HAL_DFSDM_CHANNEL_SCD_CB_ID = 0x01U, /*!< DFSDM channel short circuit detection callback ID */ HAL_DFSDM_CHANNEL_MSPINIT_CB_ID = 0x02U, /*!< DFSDM channel MSP init callback ID */ HAL_DFSDM_CHANNEL_MSPDEINIT_CB_ID = 0x03U /*!< DFSDM channel MSP de-init callback ID */ ...}HAL_DFSDM_Channel_CallbackIDTypeDef; /** * @brief DFSDM channel callback pointer definition *//* ... */ typedef void (*pDFSDM_Channel_CallbackTypeDef)(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);/* ... */ #endif /** * @brief HAL DFSDM Filter states definition *//* ... */ typedef enum { HAL_DFSDM_FILTER_STATE_RESET = 0x00U, /*!< DFSDM filter not initialized */ HAL_DFSDM_FILTER_STATE_READY = 0x01U, /*!< DFSDM filter initialized and ready for use */ HAL_DFSDM_FILTER_STATE_REG = 0x02U, /*!< DFSDM filter regular conversion in progress */ HAL_DFSDM_FILTER_STATE_INJ = 0x03U, /*!< DFSDM filter injected conversion in progress */ HAL_DFSDM_FILTER_STATE_REG_INJ = 0x04U, /*!< DFSDM filter regular and injected conversions in progress */ HAL_DFSDM_FILTER_STATE_ERROR = 0xFFU /*!< DFSDM filter state error */ ...}HAL_DFSDM_Filter_StateTypeDef; /** * @brief DFSDM filter regular conversion parameters structure definition *//* ... */ typedef struct { uint32_t Trigger; /*!< Trigger used to start regular conversion: software or synchronous. This parameter can be a value of @ref DFSDM_Filter_Trigger *//* ... */ FunctionalState FastMode; /*!< Enable/disable fast mode for regular conversion */ FunctionalState DmaMode; /*!< Enable/disable DMA for regular conversion */ ...}DFSDM_Filter_RegularParamTypeDef; /** * @brief DFSDM filter injected conversion parameters structure definition *//* ... */ typedef struct { uint32_t Trigger; /*!< Trigger used to start injected conversion: software, external or synchronous. This parameter can be a value of @ref DFSDM_Filter_Trigger *//* ... */ FunctionalState ScanMode; /*!< Enable/disable scanning mode for injected conversion */ FunctionalState DmaMode; /*!< Enable/disable DMA for injected conversion */ uint32_t ExtTrigger; /*!< External trigger. This parameter can be a value of @ref DFSDM_Filter_ExtTrigger *//* ... */ uint32_t ExtTriggerEdge; /*!< External trigger edge: rising, falling or both. This parameter can be a value of @ref DFSDM_Filter_ExtTriggerEdge *//* ... */ ...}DFSDM_Filter_InjectedParamTypeDef; /** * @brief DFSDM filter parameters structure definition *//* ... */ typedef struct { uint32_t SincOrder; /*!< Sinc filter order. This parameter can be a value of @ref DFSDM_Filter_SincOrder *//* ... */ uint32_t Oversampling; /*!< Filter oversampling ratio. This parameter must be a number between Min_Data = 1 and Max_Data = 1024 *//* ... */ uint32_t IntOversampling; /*!< Integrator oversampling ratio. This parameter must be a number between Min_Data = 1 and Max_Data = 256 *//* ... */ ...}DFSDM_Filter_FilterParamTypeDef; /** * @brief DFSDM filter init structure definition *//* ... */ typedef struct { DFSDM_Filter_RegularParamTypeDef RegularParam; /*!< DFSDM regular conversion parameters */ DFSDM_Filter_InjectedParamTypeDef InjectedParam; /*!< DFSDM injected conversion parameters */ DFSDM_Filter_FilterParamTypeDef FilterParam; /*!< DFSDM filter parameters */ ...}DFSDM_Filter_InitTypeDef; /** * @brief DFSDM filter handle structure definition *//* ... */ #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) typedef struct __DFSDM_Filter_HandleTypeDef #else typedef struct #endif /* USE_HAL_DFSDM_REGISTER_CALLBACKS */ { DFSDM_Filter_TypeDef *Instance; /*!< DFSDM filter instance */ DFSDM_Filter_InitTypeDef Init; /*!< DFSDM filter init parameters */ DMA_HandleTypeDef *hdmaReg; /*!< Pointer on DMA handler for regular conversions */ DMA_HandleTypeDef *hdmaInj; /*!< Pointer on DMA handler for injected conversions */ uint32_t RegularContMode; /*!< Regular conversion continuous mode */ uint32_t RegularTrigger; /*!< Trigger used for regular conversion */ uint32_t InjectedTrigger; /*!< Trigger used for injected conversion */ uint32_t ExtTriggerEdge; /*!< Rising, falling or both edges selected */ FunctionalState InjectedScanMode; /*!< Injected scanning mode */ uint32_t InjectedChannelsNbr; /*!< Number of channels in injected sequence */ uint32_t InjConvRemaining; /*!< Injected conversions remaining */ HAL_DFSDM_Filter_StateTypeDef State; /*!< DFSDM filter state */ uint32_t ErrorCode; /*!< DFSDM filter error code */ #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) void (*AwdCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel, uint32_t Threshold); /*!< DFSDM filter analog watchdog callback */ void (*RegConvCpltCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /*!< DFSDM filter regular conversion complete callback */ void (*RegConvHalfCpltCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /*!< DFSDM filter half regular conversion complete callback */ void (*InjConvCpltCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /*!< DFSDM filter injected conversion complete callback */ void (*InjConvHalfCpltCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /*!< DFSDM filter half injected conversion complete callback */ void (*ErrorCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /*!< DFSDM filter error callback */ void (*MspInitCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /*!< DFSDM filter MSP init callback */ void (*MspDeInitCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /*!< DFSDM filter MSP de-init callback *//* ... */ #endif ...}DFSDM_Filter_HandleTypeDef; /** * @brief DFSDM filter analog watchdog parameters structure definition *//* ... */ typedef struct { uint32_t DataSource; /*!< Values from digital filter or from channel watchdog filter. This parameter can be a value of @ref DFSDM_Filter_AwdDataSource *//* ... */ uint32_t Channel; /*!< Analog watchdog channel selection. This parameter can be a values combination of @ref DFSDM_Channel_Selection *//* ... */ int32_t HighThreshold; /*!< High threshold for the analog watchdog. This parameter must be a number between Min_Data = -8388608 and Max_Data = 8388607 *//* ... */ int32_t LowThreshold; /*!< Low threshold for the analog watchdog. This parameter must be a number between Min_Data = -8388608 and Max_Data = 8388607 *//* ... */ uint32_t HighBreakSignal; /*!< Break signal assigned to analog watchdog high threshold event. This parameter can be a values combination of @ref DFSDM_BreakSignals *//* ... */ uint32_t LowBreakSignal; /*!< Break signal assigned to analog watchdog low threshold event. This parameter can be a values combination of @ref DFSDM_BreakSignals *//* ... */ ...}DFSDM_Filter_AwdParamTypeDef; #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) /** * @brief DFSDM filter callback ID enumeration definition *//* ... */ typedef enum { HAL_DFSDM_FILTER_REGCONV_COMPLETE_CB_ID = 0x00U, /*!< DFSDM filter regular conversion complete callback ID */ HAL_DFSDM_FILTER_REGCONV_HALFCOMPLETE_CB_ID = 0x01U, /*!< DFSDM filter half regular conversion complete callback ID */ HAL_DFSDM_FILTER_INJCONV_COMPLETE_CB_ID = 0x02U, /*!< DFSDM filter injected conversion complete callback ID */ HAL_DFSDM_FILTER_INJCONV_HALFCOMPLETE_CB_ID = 0x03U, /*!< DFSDM filter half injected conversion complete callback ID */ HAL_DFSDM_FILTER_ERROR_CB_ID = 0x04U, /*!< DFSDM filter error callback ID */ HAL_DFSDM_FILTER_MSPINIT_CB_ID = 0x05U, /*!< DFSDM filter MSP init callback ID */ HAL_DFSDM_FILTER_MSPDEINIT_CB_ID = 0x06U /*!< DFSDM filter MSP de-init callback ID */ ...}HAL_DFSDM_Filter_CallbackIDTypeDef; /** * @brief DFSDM filter callback pointer definition *//* ... */ typedef void (*pDFSDM_Filter_CallbackTypeDef)(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); typedef void (*pDFSDM_Filter_AwdCallbackTypeDef)(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel, uint32_t Threshold);/* ... */ #endif /** * @} *//* ... */ #if defined(SYSCFG_MCHDLYCR_BSCKSEL) /** * @brief Synchronization parameters structure definition for STM32F413xx/STM32F423xx devices *//* ... */ typedef struct { uint32_t DFSDM1ClockIn; /*!< Source selection for DFSDM1_Ckin. This parameter can be a value of @ref DFSDM_1_CLOCKIN_SELECTION*//* ... */ uint32_t DFSDM2ClockIn; /*!< Source selection for DFSDM2_Ckin. This parameter can be a value of @ref DFSDM_2_CLOCKIN_SELECTION*//* ... */ uint32_t DFSDM1ClockOut; /*!< Source selection for DFSDM1_Ckout. This parameter can be a value of @ref DFSDM_1_CLOCKOUT_SELECTION*//* ... */ uint32_t DFSDM2ClockOut; /*!< Source selection for DFSDM2_Ckout. This parameter can be a value of @ref DFSDM_2_CLOCKOUT_SELECTION*//* ... */ uint32_t DFSDM1BitClkDistribution; /*!< Distribution of the DFSDM1 bitstream clock gated by TIM4 OC1 or TIM4 OC2. This parameter can be a value of @ref DFSDM_1_BIT_STREAM_DISTRIBUTION @note The DFSDM2 audio gated by TIM4 OC2 can be injected on CKIN0 or CKIN2 @note The DFSDM2 audio gated by TIM4 OC1 can be injected on CKIN1 or CKIN3 *//* ... */ uint32_t DFSDM2BitClkDistribution; /*!< Distribution of the DFSDM2 bitstream clock gated by TIM3 OC1 or TIM3 OC2 or TIM3 OC3 or TIM3 OC4. This parameter can be a value of @ref DFSDM_2_BIT_STREAM_DISTRIBUTION @note The DFSDM2 audio gated by TIM3 OC4 can be injected on CKIN0 or CKIN4 @note The DFSDM2 audio gated by TIM3 OC3 can be injected on CKIN1 or CKIN5 @note The DFSDM2 audio gated by TIM3 OC2 can be injected on CKIN2 or CKIN6 @note The DFSDM2 audio gated by TIM3 OC1 can be injected on CKIN3 or CKIN7 *//* ... */ uint32_t DFSDM1DataDistribution; /*!< Source selection for DatIn0 and DatIn2 of DFSDM1. This parameter can be a value of @ref DFSDM_1_DATA_DISTRIBUTION *//* ... */ uint32_t DFSDM2DataDistribution; /*!< Source selection for DatIn0, DatIn2, DatIn4 and DatIn6 of DFSDM2. This parameter can be a value of @ref DFSDM_2_DATA_DISTRIBUTION *//* ... */ ...}DFSDM_MultiChannelConfigTypeDef;/* ... */ #endif /* SYSCFG_MCHDLYCR_BSCKSEL */ /** * @} *//* ... */ Exported types /* End of exported types -----------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /** @defgroup DFSDM_Exported_Constants DFSDM Exported Constants * @{ *//* ... */ /** @defgroup DFSDM_Channel_OutputClock DFSDM channel output clock selection * @{ *//* ... */ #define DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM 0x00000000U /*!< Source for output clock is system clock */ #define DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO DFSDM_CHCFGR1_CKOUTSRC /*!< Source for output clock is audio clock */ /** * @} *//* ... */ /** @defgroup DFSDM_Channel_InputMultiplexer DFSDM channel input multiplexer * @{ *//* ... */ #define DFSDM_CHANNEL_EXTERNAL_INPUTS 0x00000000U /*!< Data are taken from external inputs */ #define DFSDM_CHANNEL_INTERNAL_REGISTER DFSDM_CHCFGR1_DATMPX_1 /*!< Data are taken from internal register */ /** * @} *//* ... */ /** @defgroup DFSDM_Channel_DataPacking DFSDM channel input data packing * @{ *//* ... */ #define DFSDM_CHANNEL_STANDARD_MODE 0x00000000U /*!< Standard data packing mode */ #define DFSDM_CHANNEL_INTERLEAVED_MODE DFSDM_CHCFGR1_DATPACK_0 /*!< Interleaved data packing mode */ #define DFSDM_CHANNEL_DUAL_MODE DFSDM_CHCFGR1_DATPACK_1 /*!< Dual data packing mode */ /** * @} *//* ... */ /** @defgroup DFSDM_Channel_InputPins DFSDM channel input pins * @{ *//* ... */ #define DFSDM_CHANNEL_SAME_CHANNEL_PINS 0x00000000U /*!< Input from pins on same channel */ #define DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS DFSDM_CHCFGR1_CHINSEL /*!< Input from pins on following channel */ /** * @} *//* ... */ /** @defgroup DFSDM_Channel_SerialInterfaceType DFSDM channel serial interface type * @{ *//* ... */ #define DFSDM_CHANNEL_SPI_RISING 0x00000000U /*!< SPI with rising edge */ #define DFSDM_CHANNEL_SPI_FALLING DFSDM_CHCFGR1_SITP_0 /*!< SPI with falling edge */ #define DFSDM_CHANNEL_MANCHESTER_RISING DFSDM_CHCFGR1_SITP_1 /*!< Manchester with rising edge */ #define DFSDM_CHANNEL_MANCHESTER_FALLING DFSDM_CHCFGR1_SITP /*!< Manchester with falling edge */ /** * @} *//* ... */ /** @defgroup DFSDM_Channel_SpiClock DFSDM channel SPI clock selection * @{ *//* ... */ #define DFSDM_CHANNEL_SPI_CLOCK_EXTERNAL 0x00000000U /*!< External SPI clock */ #define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL DFSDM_CHCFGR1_SPICKSEL_0 /*!< Internal SPI clock */ #define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_FALLING DFSDM_CHCFGR1_SPICKSEL_1 /*!< Internal SPI clock divided by 2, falling edge */ #define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_RISING DFSDM_CHCFGR1_SPICKSEL /*!< Internal SPI clock divided by 2, rising edge */ /** * @} *//* ... */ /** @defgroup DFSDM_Channel_AwdFilterOrder DFSDM channel analog watchdog filter order * @{ *//* ... */ #define DFSDM_CHANNEL_FASTSINC_ORDER 0x00000000U /*!< FastSinc filter type */ #define DFSDM_CHANNEL_SINC1_ORDER DFSDM_CHAWSCDR_AWFORD_0 /*!< Sinc 1 filter type */ #define DFSDM_CHANNEL_SINC2_ORDER DFSDM_CHAWSCDR_AWFORD_1 /*!< Sinc 2 filter type */ #define DFSDM_CHANNEL_SINC3_ORDER DFSDM_CHAWSCDR_AWFORD /*!< Sinc 3 filter type */ /** * @} *//* ... */ /** @defgroup DFSDM_Filter_Trigger DFSDM filter conversion trigger * @{ *//* ... */ #define DFSDM_FILTER_SW_TRIGGER 0x00000000U /*!< Software trigger */ #define DFSDM_FILTER_SYNC_TRIGGER 0x00000001U /*!< Synchronous with DFSDM_FLT0 */ #define DFSDM_FILTER_EXT_TRIGGER 0x00000002U /*!< External trigger (only for injected conversion) */ 24 defines/** * @} *//* ... */ /** @defgroup DFSDM_Filter_ExtTrigger DFSDM filter external trigger * @{ *//* ... */ #if defined(STM32F413xx) || defined(STM32F423xx) /* Trigger for stm32f413xx and STM32f423xx devices */ #define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO 0x00000000U /*!< For All DFSDM1/2 filters */ #define DFSDM_FILTER_EXT_TRIG_TIM3_TRGO DFSDM_FLTCR1_JEXTSEL_0 /*!< For All DFSDM1/2 filters */ #define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO DFSDM_FLTCR1_JEXTSEL_1 /*!< For All DFSDM1/2 filters */ #define DFSDM_FILTER_EXT_TRIG_TIM10_OC1 (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_1) /*!< For DFSDM1 filter 0 and 1 and DFSDM2 filter 0, 1 and 2 */ #define DFSDM_FILTER_EXT_TRIG_TIM2_TRGO (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_1) /*!< For DFSDM2 filter 3 */ #define DFSDM_FILTER_EXT_TRIG_TIM4_TRGO DFSDM_FLTCR1_JEXTSEL_2 /*!< For DFSDM1 filter 0 and 1 and DFSDM2 filter 0, 1 and 2 */ #define DFSDM_FILTER_EXT_TRIG_TIM11_OC1 DFSDM_FLTCR1_JEXTSEL_2 /*!< For DFSDM2 filter 3 */ #define DFSDM_FILTER_EXT_TRIG_TIM6_TRGO (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_2) /*!< For DFSDM1 filter 0 and 1 and DFSDM2 filter 0 and 1 */ #define DFSDM_FILTER_EXT_TRIG_TIM7_TRGO (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_2) /*!< For DFSDM2 filter 2 and 3*/ #define DFSDM_FILTER_EXT_TRIG_EXTI11 (DFSDM_FLTCR1_JEXTSEL_1 | DFSDM_FLTCR1_JEXTSEL_2) /*!< For All DFSDM1/2 filters */ #define DFSDM_FILTER_EXT_TRIG_EXTI15 DFSDM_FLTCR1_JEXTSEL /*!< For All DFSDM1/2 filters */ 11 defines#else/* ... */ /* Trigger for stm32f412xx devices */ #define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO 0x00000000U /*!< For DFSDM1 filter 0 and 1*/ #define DFSDM_FILTER_EXT_TRIG_TIM3_TRGO DFSDM_FLTCR1_JEXTSEL_0 /*!< For DFSDM1 filter 0 and 1*/ #define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO DFSDM_FLTCR1_JEXTSEL_1 /*!< For DFSDM1 filter 0 and 1*/ #define DFSDM_FILTER_EXT_TRIG_TIM10_OC1 (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_1) /*!< For DFSDM1 filter 0 and 1*/ #define DFSDM_FILTER_EXT_TRIG_TIM4_TRGO DFSDM_FLTCR1_JEXTSEL_2 /*!< For DFSDM1 filter 0 and 1*/ #define DFSDM_FILTER_EXT_TRIG_TIM6_TRGO (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_2) /*!< For DFSDM1 filter 0 and 1*/ #define DFSDM_FILTER_EXT_TRIG_EXTI11 (DFSDM_FLTCR1_JEXTSEL_1 | DFSDM_FLTCR1_JEXTSEL_2) /*!< For DFSDM1 filter 0 and 1*/ #define DFSDM_FILTER_EXT_TRIG_EXTI15 DFSDM_FLTCR1_JEXTSEL /*!< For DFSDM1 filter 0 and 1*/ 8 defines#endif/* ... */ /** * @} *//* ... */ /** @defgroup DFSDM_Filter_ExtTriggerEdge DFSDM filter external trigger edge * @{ *//* ... */ #define DFSDM_FILTER_EXT_TRIG_RISING_EDGE DFSDM_FLTCR1_JEXTEN_0 /*!< External rising edge */ #define DFSDM_FILTER_EXT_TRIG_FALLING_EDGE DFSDM_FLTCR1_JEXTEN_1 /*!< External falling edge */ #define DFSDM_FILTER_EXT_TRIG_BOTH_EDGES DFSDM_FLTCR1_JEXTEN /*!< External rising and falling edges */ /** * @} *//* ... */ /** @defgroup DFSDM_Filter_SincOrder DFSDM filter sinc order * @{ *//* ... */ #define DFSDM_FILTER_FASTSINC_ORDER 0x00000000U /*!< FastSinc filter type */ #define DFSDM_FILTER_SINC1_ORDER DFSDM_FLTFCR_FORD_0 /*!< Sinc 1 filter type */ #define DFSDM_FILTER_SINC2_ORDER DFSDM_FLTFCR_FORD_1 /*!< Sinc 2 filter type */ #define DFSDM_FILTER_SINC3_ORDER (DFSDM_FLTFCR_FORD_0 | DFSDM_FLTFCR_FORD_1) /*!< Sinc 3 filter type */ #define DFSDM_FILTER_SINC4_ORDER DFSDM_FLTFCR_FORD_2 /*!< Sinc 4 filter type */ #define DFSDM_FILTER_SINC5_ORDER (DFSDM_FLTFCR_FORD_0 | DFSDM_FLTFCR_FORD_2) /*!< Sinc 5 filter type */ /** * @} *//* ... */ /** @defgroup DFSDM_Filter_AwdDataSource DFSDM filter analog watchdog data source * @{ *//* ... */ #define DFSDM_FILTER_AWD_FILTER_DATA 0x00000000U /*!< From digital filter */ #define DFSDM_FILTER_AWD_CHANNEL_DATA DFSDM_FLTCR1_AWFSEL /*!< From analog watchdog channel */ /** * @} *//* ... */ /** @defgroup DFSDM_Filter_ErrorCode DFSDM filter error code * @{ *//* ... */ #define DFSDM_FILTER_ERROR_NONE 0x00000000U /*!< No error */ #define DFSDM_FILTER_ERROR_REGULAR_OVERRUN 0x00000001U /*!< Overrun occurs during regular conversion */ #define DFSDM_FILTER_ERROR_INJECTED_OVERRUN 0x00000002U /*!< Overrun occurs during injected conversion */ #define DFSDM_FILTER_ERROR_DMA 0x00000003U /*!< DMA error occurs */ 15 defines#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) #define DFSDM_FILTER_ERROR_INVALID_CALLBACK 0x00000004U /*!< Invalid callback error occurs */ #endif /** * @} *//* ... */ /** @defgroup DFSDM_BreakSignals DFSDM break signals * @{ *//* ... */ #define DFSDM_NO_BREAK_SIGNAL 0x00000000U /*!< No break signal */ #define DFSDM_BREAK_SIGNAL_0 0x00000001U /*!< Break signal 0 */ #define DFSDM_BREAK_SIGNAL_1 0x00000002U /*!< Break signal 1 */ #define DFSDM_BREAK_SIGNAL_2 0x00000004U /*!< Break signal 2 */ #define DFSDM_BREAK_SIGNAL_3 0x00000008U /*!< Break signal 3 */ /** * @} *//* ... */ /** @defgroup DFSDM_Channel_Selection DFSDM Channel Selection * @{ *//* ... */ /* DFSDM Channels ------------------------------------------------------------*/ /* The DFSDM channels are defined as follows: - in 16-bit LSB the channel mask is set - in 16-bit MSB the channel number is set e.g. for channel 3 definition: - the channel mask is 0x00000008 (bit 3 is set) - the channel number 3 is 0x00030000 --> Consequently, channel 3 definition is 0x00000008 | 0x00030000 = 0x00030008 *//* ... */ #define DFSDM_CHANNEL_0 0x00000001U #define DFSDM_CHANNEL_1 0x00010002U #define DFSDM_CHANNEL_2 0x00020004U #define DFSDM_CHANNEL_3 0x00030008U #define DFSDM_CHANNEL_4 0x00040010U /* only for stmm32f413xx and stm32f423xx devices */ #define DFSDM_CHANNEL_5 0x00050020U /* only for stmm32f413xx and stm32f423xx devices */ #define DFSDM_CHANNEL_6 0x00060040U /* only for stmm32f413xx and stm32f423xx devices */ #define DFSDM_CHANNEL_7 0x00070080U /* only for stmm32f413xx and stm32f423xx devices */ /** * @} *//* ... */ /** @defgroup DFSDM_ContinuousMode DFSDM Continuous Mode * @{ *//* ... */ #define DFSDM_CONTINUOUS_CONV_OFF 0x00000000U /*!< Conversion are not continuous */ #define DFSDM_CONTINUOUS_CONV_ON 0x00000001U /*!< Conversion are continuous */ /** * @} *//* ... */ /** @defgroup DFSDM_AwdThreshold DFSDM analog watchdog threshold * @{ *//* ... */ #define DFSDM_AWD_HIGH_THRESHOLD 0x00000000U /*!< Analog watchdog high threshold */ #define DFSDM_AWD_LOW_THRESHOLD 0x00000001U /*!< Analog watchdog low threshold */ 17 defines/** * @} *//* ... */ #if defined(SYSCFG_MCHDLYCR_BSCKSEL) /** @defgroup DFSDM_1_CLOCKOUT_SELECTION DFSDM1 ClockOut Selection * @{ *//* ... */ #define DFSDM1_CKOUT_DFSDM2_CKOUT 0x00000080U #define DFSDM1_CKOUT_DFSDM1 0x00000000U /** * @} *//* ... */ /** @defgroup DFSDM_2_CLOCKOUT_SELECTION DFSDM2 ClockOut Selection * @{ *//* ... */ #define DFSDM2_CKOUT_DFSDM2_CKOUT 0x00040000U #define DFSDM2_CKOUT_DFSDM2 0x00000000U /** * @} *//* ... */ /** @defgroup DFSDM_1_CLOCKIN_SELECTION DFSDM1 ClockIn Selection * @{ *//* ... */ #define DFSDM1_CKIN_DFSDM2_CKOUT 0x00000040U #define DFSDM1_CKIN_PAD 0x00000000U /** * @} *//* ... */ /** @defgroup DFSDM_2_CLOCKIN_SELECTION DFSDM2 ClockIn Selection * @{ *//* ... */ #define DFSDM2_CKIN_DFSDM2_CKOUT 0x00020000U #define DFSDM2_CKIN_PAD 0x00000000U /** * @} *//* ... */ /** @defgroup DFSDM_1_BIT_STREAM_DISTRIBUTION DFSDM1 Bit Stream Distribution * @{ *//* ... */ #define DFSDM1_T4_OC2_BITSTREAM_CKIN0 0x00000000U /* TIM4_OC2 to CLKIN0 */ #define DFSDM1_T4_OC2_BITSTREAM_CKIN2 SYSCFG_MCHDLYCR_DFSDM1CK02SEL /* TIM4_OC2 to CLKIN2 */ #define DFSDM1_T4_OC1_BITSTREAM_CKIN3 SYSCFG_MCHDLYCR_DFSDM1CK13SEL /* TIM4_OC1 to CLKIN3 */ #define DFSDM1_T4_OC1_BITSTREAM_CKIN1 0x00000000U /* TIM4_OC1 to CLKIN1 */ /** * @} *//* ... */ /** @defgroup DFSDM_2_BIT_STREAM_DISTRIBUTION DFSDM12 Bit Stream Distribution * @{ *//* ... */ #define DFSDM2_T3_OC4_BITSTREAM_CKIN0 0x00000000U /* TIM3_OC4 to CKIN0 */ #define DFSDM2_T3_OC4_BITSTREAM_CKIN4 SYSCFG_MCHDLYCR_DFSDM2CK04SEL /* TIM3_OC4 to CKIN4 */ #define DFSDM2_T3_OC3_BITSTREAM_CKIN5 SYSCFG_MCHDLYCR_DFSDM2CK15SEL /* TIM3_OC3 to CKIN5 */ #define DFSDM2_T3_OC3_BITSTREAM_CKIN1 0x00000000U /* TIM3_OC3 to CKIN1 */ #define DFSDM2_T3_OC2_BITSTREAM_CKIN6 SYSCFG_MCHDLYCR_DFSDM2CK26SEL /* TIM3_OC2to CKIN6 */ #define DFSDM2_T3_OC2_BITSTREAM_CKIN2 0x00000000U /* TIM3_OC2 to CKIN2 */ #define DFSDM2_T3_OC1_BITSTREAM_CKIN3 0x00000000U /* TIM3_OC1 to CKIN3 */ #define DFSDM2_T3_OC1_BITSTREAM_CKIN7 SYSCFG_MCHDLYCR_DFSDM2CK37SEL /* TIM3_OC1 to CKIN7 */ /** * @} *//* ... */ /** @defgroup DFSDM_1_DATA_DISTRIBUTION DFSDM1 Data Distribution * @{ *//* ... */ #define DFSDM1_DATIN0_TO_DATIN0_PAD 0x00000000U #define DFSDM1_DATIN0_TO_DATIN1_PAD SYSCFG_MCHDLYCR_DFSDM1D0SEL #define DFSDM1_DATIN2_TO_DATIN2_PAD 0x00000000U #define DFSDM1_DATIN2_TO_DATIN3_PAD SYSCFG_MCHDLYCR_DFSDM1D2SEL /** * @} *//* ... */ /** @defgroup DFSDM_2_DATA_DISTRIBUTION DFSDM2 Data Distribution * @{ *//* ... */ #define DFSDM2_DATIN0_TO_DATIN0_PAD 0x00000000U #define DFSDM2_DATIN0_TO_DATIN1_PAD SYSCFG_MCHDLYCR_DFSDM2D0SEL #define DFSDM2_DATIN2_TO_DATIN2_PAD 0x00000000U #define DFSDM2_DATIN2_TO_DATIN3_PAD SYSCFG_MCHDLYCR_DFSDM2D2SEL #define DFSDM2_DATIN4_TO_DATIN4_PAD 0x00000000U #define DFSDM2_DATIN4_TO_DATIN5_PAD SYSCFG_MCHDLYCR_DFSDM2D4SEL #define DFSDM2_DATIN6_TO_DATIN6_PAD 0x00000000U #define DFSDM2_DATIN6_TO_DATIN7_PAD SYSCFG_MCHDLYCR_DFSDM2D6SEL /** * @} *//* ... */ /** @defgroup HAL_MCHDLY_CLOCK HAL MCHDLY Clock enable * @{ *//* ... */ #define HAL_MCHDLY_CLOCK_DFSDM2 SYSCFG_MCHDLYCR_MCHDLY2EN #define HAL_MCHDLY_CLOCK_DFSDM1 SYSCFG_MCHDLYCR_MCHDLY1EN /** * @} *//* ... */ /** @defgroup DFSDM_CLOCKIN_SOURCE DFSDM Clock In Source Selection * @{ *//* ... */ #define HAL_DFSDM2_CKIN_PAD 0x00040000U #define HAL_DFSDM2_CKIN_DM SYSCFG_MCHDLYCR_DFSDM2CFG #define HAL_DFSDM1_CKIN_PAD 0x00000000U #define HAL_DFSDM1_CKIN_DM SYSCFG_MCHDLYCR_DFSDM1CFG /** * @} *//* ... */ /** @defgroup DFSDM_CLOCKOUT_SOURCE DFSDM Clock Source Selection * @{ *//* ... */ #define HAL_DFSDM2_CKOUT_DFSDM2 0x10000000U #define HAL_DFSDM2_CKOUT_M27 SYSCFG_MCHDLYCR_DFSDM2CKOSEL #define HAL_DFSDM1_CKOUT_DFSDM1 0x00000000U #define HAL_DFSDM1_CKOUT_M27 SYSCFG_MCHDLYCR_DFSDM1CKOSEL /** * @} *//* ... */ /** @defgroup DFSDM_DATAIN0_SOURCE DFSDM Source Selection For DATAIN0 * @{ *//* ... */ #define HAL_DATAIN0_DFSDM2_PAD 0x10000000U #define HAL_DATAIN0_DFSDM2_DATAIN1 SYSCFG_MCHDLYCR_DFSDM2D0SEL #define HAL_DATAIN0_DFSDM1_PAD 0x00000000U #define HAL_DATAIN0_DFSDM1_DATAIN1 SYSCFG_MCHDLYCR_DFSDM1D0SEL /** * @} *//* ... */ /** @defgroup DFSDM_DATAIN2_SOURCE DFSDM Source Selection For DATAIN2 * @{ *//* ... */ #define HAL_DATAIN2_DFSDM2_PAD 0x10000000U #define HAL_DATAIN2_DFSDM2_DATAIN3 SYSCFG_MCHDLYCR_DFSDM2D2SEL #define HAL_DATAIN2_DFSDM1_PAD 0x00000000U #define HAL_DATAIN2_DFSDM1_DATAIN3 SYSCFG_MCHDLYCR_DFSDM1D2SEL /** * @} *//* ... */ /** @defgroup DFSDM_DATAIN4_SOURCE DFSDM Source Selection For DATAIN4 * @{ *//* ... */ #define HAL_DATAIN4_DFSDM2_PAD 0x00000000U #define HAL_DATAIN4_DFSDM2_DATAIN5 SYSCFG_MCHDLYCR_DFSDM2D4SEL /** * @} *//* ... */ /** @defgroup DFSDM_DATAIN6_SOURCE DFSDM Source Selection For DATAIN6 * @{ *//* ... */ #define HAL_DATAIN6_DFSDM2_PAD 0x00000000U #define HAL_DATAIN6_DFSDM2_DATAIN7 SYSCFG_MCHDLYCR_DFSDM2D6SEL /** * @} *//* ... */ /** @defgroup DFSDM1_CLKIN_SOURCE DFSDM1 Source Selection For CLKIN * @{ *//* ... */ #define HAL_DFSDM1_CLKIN0_TIM4OC2 0x01000000U #define HAL_DFSDM1_CLKIN2_TIM4OC2 SYSCFG_MCHDLYCR_DFSDM1CK02SEL #define HAL_DFSDM1_CLKIN1_TIM4OC1 0x02000000U #define HAL_DFSDM1_CLKIN3_TIM4OC1 SYSCFG_MCHDLYCR_DFSDM1CK13SEL /** * @} *//* ... */ /** @defgroup DFSDM2_CLKIN_SOURCE DFSDM2 Source Selection For CLKIN * @{ *//* ... */ #define HAL_DFSDM2_CLKIN0_TIM3OC4 0x04000000U #define HAL_DFSDM2_CLKIN4_TIM3OC4 SYSCFG_MCHDLYCR_DFSDM2CK04SEL #define HAL_DFSDM2_CLKIN1_TIM3OC3 0x08000000U #define HAL_DFSDM2_CLKIN5_TIM3OC3 SYSCFG_MCHDLYCR_DFSDM2CK15SEL #define HAL_DFSDM2_CLKIN2_TIM3OC2 0x10000000U #define HAL_DFSDM2_CLKIN6_TIM3OC2 SYSCFG_MCHDLYCR_DFSDM2CK26SEL #define HAL_DFSDM2_CLKIN3_TIM3OC1 0x00000000U #define HAL_DFSDM2_CLKIN7_TIM3OC1 SYSCFG_MCHDLYCR_DFSDM2CK37SEL 66 defines/** * @} *//* ... */ /* ... */ #endif /* SYSCFG_MCHDLYCR_BSCKSEL*/ /** * @} *//* ... */ /* End of exported constants -------------------------------------------------*/ /* Exported macros -----------------------------------------------------------*/ /** @defgroup DFSDM_Exported_Macros DFSDM Exported Macros * @{ *//* ... */ /** @brief Reset DFSDM channel handle state. * @param __HANDLE__ DFSDM channel handle. * @retval None *//* ... */ #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) #define __HAL_DFSDM_CHANNEL_RESET_HANDLE_STATE(__HANDLE__) do{ \ (__HANDLE__)->State = HAL_DFSDM_CHANNEL_STATE_RESET; \ (__HANDLE__)->MspInitCallback = NULL; \ (__HANDLE__)->MspDeInitCallback = NULL; \ ...} while(0)... /* ... */#else #define __HAL_DFSDM_CHANNEL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DFSDM_CHANNEL_STATE_RESET) #endif /** @brief Reset DFSDM filter handle state. * @param __HANDLE__ DFSDM filter handle. * @retval None *//* ... */ #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) #define __HAL_DFSDM_FILTER_RESET_HANDLE_STATE(__HANDLE__) do{ \ (__HANDLE__)->State = HAL_DFSDM_FILTER_STATE_RESET; \ (__HANDLE__)->MspInitCallback = NULL; \ (__HANDLE__)->MspDeInitCallback = NULL; \ ...} while(0)... /* ... */#else #define __HAL_DFSDM_FILTER_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DFSDM_FILTER_STATE_RESET) #endif /** * @} *//* ... */ Exported macros/* End of exported macros ----------------------------------------------------*/ /* Exported functions --------------------------------------------------------*/ /** @addtogroup DFSDM_Exported_Functions DFSDM Exported Functions * @{ *//* ... */ /** @addtogroup DFSDM_Exported_Functions_Group1_Channel Channel initialization and de-initialization functions * @{ *//* ... */ /* Channel initialization and de-initialization functions *********************/ HAL_StatusTypeDef HAL_DFSDM_ChannelInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); HAL_StatusTypeDef HAL_DFSDM_ChannelDeInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); void HAL_DFSDM_ChannelMspInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); void HAL_DFSDM_ChannelMspDeInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) /* Channel callbacks register/unregister functions ****************************/ HAL_StatusTypeDef HAL_DFSDM_Channel_RegisterCallback(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, HAL_DFSDM_Channel_CallbackIDTypeDef CallbackID, pDFSDM_Channel_CallbackTypeDef pCallback); HAL_StatusTypeDef HAL_DFSDM_Channel_UnRegisterCallback(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, HAL_DFSDM_Channel_CallbackIDTypeDef CallbackID);/* ... */ #endif /** * @} *//* ... */ /** @addtogroup DFSDM_Exported_Functions_Group2_Channel Channel operation functions * @{ *//* ... */ /* Channel operation functions ************************************************/ HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStart(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStart_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStop(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStop_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); HAL_StatusTypeDef HAL_DFSDM_ChannelScdStart(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Threshold, uint32_t BreakSignal); HAL_StatusTypeDef HAL_DFSDM_ChannelScdStart_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Threshold, uint32_t BreakSignal); HAL_StatusTypeDef HAL_DFSDM_ChannelScdStop(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); HAL_StatusTypeDef HAL_DFSDM_ChannelScdStop_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); int16_t HAL_DFSDM_ChannelGetAwdValue(const DFSDM_Channel_HandleTypeDef *hdfsdm_channel); HAL_StatusTypeDef HAL_DFSDM_ChannelModifyOffset(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, int32_t Offset); HAL_StatusTypeDef HAL_DFSDM_ChannelPollForCkab(const DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Timeout); HAL_StatusTypeDef HAL_DFSDM_ChannelPollForScd(const DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Timeout); void HAL_DFSDM_ChannelCkabCallback(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); void HAL_DFSDM_ChannelScdCallback(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); /** * @} *//* ... */ /** @defgroup DFSDM_Exported_Functions_Group3_Channel Channel state function * @{ *//* ... */ /* Channel state function *****************************************************/ HAL_DFSDM_Channel_StateTypeDef HAL_DFSDM_ChannelGetState(const DFSDM_Channel_HandleTypeDef *hdfsdm_channel); /** * @} *//* ... */ /** @addtogroup DFSDM_Exported_Functions_Group1_Filter Filter initialization and de-initialization functions * @{ *//* ... */ /* Filter initialization and de-initialization functions *********************/ HAL_StatusTypeDef HAL_DFSDM_FilterInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterDeInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); void HAL_DFSDM_FilterMspInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); void HAL_DFSDM_FilterMspDeInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) /* Filter callbacks register/unregister functions ****************************/ HAL_StatusTypeDef HAL_DFSDM_Filter_RegisterCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, HAL_DFSDM_Filter_CallbackIDTypeDef CallbackID, pDFSDM_Filter_CallbackTypeDef pCallback); HAL_StatusTypeDef HAL_DFSDM_Filter_UnRegisterCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, HAL_DFSDM_Filter_CallbackIDTypeDef CallbackID); HAL_StatusTypeDef HAL_DFSDM_Filter_RegisterAwdCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, pDFSDM_Filter_AwdCallbackTypeDef pCallback); HAL_StatusTypeDef HAL_DFSDM_Filter_UnRegisterAwdCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);/* ... */ #endif /** * @} *//* ... */ /** @addtogroup DFSDM_Exported_Functions_Group2_Filter Filter control functions * @{ *//* ... */ /* Filter control functions *********************/ HAL_StatusTypeDef HAL_DFSDM_FilterConfigRegChannel(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel, uint32_t ContinuousMode); HAL_StatusTypeDef HAL_DFSDM_FilterConfigInjChannel(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel); /** * @} *//* ... */ /** @addtogroup DFSDM_Exported_Functions_Group3_Filter Filter operation functions * @{ *//* ... */ /* Filter operation functions *********************/ HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int32_t *pData, uint32_t Length); HAL_StatusTypeDef HAL_DFSDM_FilterRegularMsbStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int16_t *pData, uint32_t Length); HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int32_t *pData, uint32_t Length); HAL_StatusTypeDef HAL_DFSDM_FilterInjectedMsbStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int16_t *pData, uint32_t Length); HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterAwdStart_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, const DFSDM_Filter_AwdParamTypeDef* awdParam); HAL_StatusTypeDef HAL_DFSDM_FilterAwdStop_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterExdStart(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel); HAL_StatusTypeDef HAL_DFSDM_FilterExdStop(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); int32_t HAL_DFSDM_FilterGetRegularValue(const DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel); int32_t HAL_DFSDM_FilterGetInjectedValue(const DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel); int32_t HAL_DFSDM_FilterGetExdMaxValue(const DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel); int32_t HAL_DFSDM_FilterGetExdMinValue(const DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel); uint32_t HAL_DFSDM_FilterGetConvTimeValue(const DFSDM_Filter_HandleTypeDef *hdfsdm_filter); void HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); HAL_StatusTypeDef HAL_DFSDM_FilterPollForRegConversion(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Timeout); HAL_StatusTypeDef HAL_DFSDM_FilterPollForInjConversion(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Timeout); void HAL_DFSDM_FilterRegConvCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); void HAL_DFSDM_FilterRegConvHalfCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); void HAL_DFSDM_FilterInjConvCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); void HAL_DFSDM_FilterInjConvHalfCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); void HAL_DFSDM_FilterAwdCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel, uint32_t Threshold); void HAL_DFSDM_FilterErrorCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /** * @} *//* ... */ /** @addtogroup DFSDM_Exported_Functions_Group4_Filter Filter state functions * @{ *//* ... */ /* Filter state functions *****************************************************/ HAL_DFSDM_Filter_StateTypeDef HAL_DFSDM_FilterGetState(const DFSDM_Filter_HandleTypeDef *hdfsdm_filter); uint32_t HAL_DFSDM_FilterGetError(const DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /** * @} *//* ... */ /** @addtogroup DFSDM_Exported_Functions_Group5_Filter MultiChannel operation functions * @{ *//* ... */ #if defined(SYSCFG_MCHDLYCR_BSCKSEL) void HAL_DFSDM_ConfigMultiChannelDelay(DFSDM_MultiChannelConfigTypeDef* mchdlystruct); void HAL_DFSDM_BitstreamClock_Start(void); void HAL_DFSDM_BitstreamClock_Stop(void); void HAL_DFSDM_DisableDelayClock(uint32_t MCHDLY); void HAL_DFSDM_EnableDelayClock(uint32_t MCHDLY); void HAL_DFSDM_ClockIn_SourceSelection(uint32_t source); void HAL_DFSDM_ClockOut_SourceSelection(uint32_t source); void HAL_DFSDM_DataIn0_SourceSelection(uint32_t source); void HAL_DFSDM_DataIn2_SourceSelection(uint32_t source); void HAL_DFSDM_DataIn4_SourceSelection(uint32_t source); void HAL_DFSDM_DataIn6_SourceSelection(uint32_t source); void HAL_DFSDM_BitStreamClkDistribution_Config(uint32_t source);/* ... */ #endif /* SYSCFG_MCHDLYCR_BSCKSEL */ /** * @} *//* ... */ /** * @} *//* ... */ Exported functions/* End of exported functions -------------------------------------------------*/ /* Private macros ------------------------------------------------------------*/ /** @defgroup DFSDM_Private_Macros DFSDM Private Macros * @{ *//* ... */ #define IS_DFSDM_CHANNEL_OUTPUT_CLOCK(CLOCK) (((CLOCK) == DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM) || \ ((CLOCK) == DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO))... #define IS_DFSDM_CHANNEL_OUTPUT_CLOCK_DIVIDER(DIVIDER) ((2U <= (DIVIDER)) && ((DIVIDER) <= 256U)) #define IS_DFSDM_CHANNEL_INPUT(INPUT) (((INPUT) == DFSDM_CHANNEL_EXTERNAL_INPUTS) || \ ((INPUT) == DFSDM_CHANNEL_INTERNAL_REGISTER))... #define IS_DFSDM_CHANNEL_DATA_PACKING(MODE) (((MODE) == DFSDM_CHANNEL_STANDARD_MODE) || \ ((MODE) == DFSDM_CHANNEL_INTERLEAVED_MODE) || \ ((MODE) == DFSDM_CHANNEL_DUAL_MODE))... #define IS_DFSDM_CHANNEL_INPUT_PINS(PINS) (((PINS) == DFSDM_CHANNEL_SAME_CHANNEL_PINS) || \ ((PINS) == DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS))... #define IS_DFSDM_CHANNEL_SERIAL_INTERFACE_TYPE(MODE) (((MODE) == DFSDM_CHANNEL_SPI_RISING) || \ ((MODE) == DFSDM_CHANNEL_SPI_FALLING) || \ ((MODE) == DFSDM_CHANNEL_MANCHESTER_RISING) || \ ((MODE) == DFSDM_CHANNEL_MANCHESTER_FALLING))... #define IS_DFSDM_CHANNEL_SPI_CLOCK(TYPE) (((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_EXTERNAL) || \ ((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL) || \ ((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_FALLING) || \ ((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_RISING))... #define IS_DFSDM_CHANNEL_FILTER_ORDER(ORDER) (((ORDER) == DFSDM_CHANNEL_FASTSINC_ORDER) || \ ((ORDER) == DFSDM_CHANNEL_SINC1_ORDER) || \ ((ORDER) == DFSDM_CHANNEL_SINC2_ORDER) || \ ((ORDER) == DFSDM_CHANNEL_SINC3_ORDER))... #define IS_DFSDM_CHANNEL_FILTER_OVS_RATIO(RATIO) ((1U <= (RATIO)) && ((RATIO) <= 32U)) #define IS_DFSDM_CHANNEL_OFFSET(VALUE) ((-8388608 <= (VALUE)) && ((VALUE) <= 8388607)) #define IS_DFSDM_CHANNEL_RIGHT_BIT_SHIFT(VALUE) ((VALUE) <= 0x1FU) #define IS_DFSDM_CHANNEL_SCD_THRESHOLD(VALUE) ((VALUE) <= 0xFFU) #define IS_DFSDM_FILTER_REG_TRIGGER(TRIG) (((TRIG) == DFSDM_FILTER_SW_TRIGGER) || \ ((TRIG) == DFSDM_FILTER_SYNC_TRIGGER))... #define IS_DFSDM_FILTER_INJ_TRIGGER(TRIG) (((TRIG) == DFSDM_FILTER_SW_TRIGGER) || \ ((TRIG) == DFSDM_FILTER_SYNC_TRIGGER) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIGGER))... 14 defines#if defined (STM32F413xx) || defined (STM32F423xx) #define IS_DFSDM_FILTER_EXT_TRIG(TRIG) (((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM3_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM10_OC1) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM2_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM4_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM11_OC1) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM6_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI11) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI15))... #define IS_DFSDM_DELAY_CLOCK(CLOCK) (((CLOCK) == HAL_MCHDLY_CLOCK_DFSDM2) || \ ((CLOCK) == HAL_MCHDLY_CLOCK_DFSDM1))... /* ... */#else #define IS_DFSDM_FILTER_EXT_TRIG(TRIG) (((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM3_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM10_OC1) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM4_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM6_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI11) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI15))... /* ... */#endif #define IS_DFSDM_FILTER_EXT_TRIG_EDGE(EDGE) (((EDGE) == DFSDM_FILTER_EXT_TRIG_RISING_EDGE) || \ ((EDGE) == DFSDM_FILTER_EXT_TRIG_FALLING_EDGE) || \ ((EDGE) == DFSDM_FILTER_EXT_TRIG_BOTH_EDGES))... #define IS_DFSDM_FILTER_SINC_ORDER(ORDER) (((ORDER) == DFSDM_FILTER_FASTSINC_ORDER) || \ ((ORDER) == DFSDM_FILTER_SINC1_ORDER) || \ ((ORDER) == DFSDM_FILTER_SINC2_ORDER) || \ ((ORDER) == DFSDM_FILTER_SINC3_ORDER) || \ ((ORDER) == DFSDM_FILTER_SINC4_ORDER) || \ ((ORDER) == DFSDM_FILTER_SINC5_ORDER))... #define IS_DFSDM_FILTER_OVS_RATIO(RATIO) ((1U <= (RATIO)) && ((RATIO) <= 1024U)) #define IS_DFSDM_FILTER_INTEGRATOR_OVS_RATIO(RATIO) ((1U <= (RATIO)) && ((RATIO) <= 256U)) #define IS_DFSDM_FILTER_AWD_DATA_SOURCE(DATA) (((DATA) == DFSDM_FILTER_AWD_FILTER_DATA) || \ ((DATA) == DFSDM_FILTER_AWD_CHANNEL_DATA))... #define IS_DFSDM_FILTER_AWD_THRESHOLD(VALUE) ((-8388608 <= (VALUE)) && ((VALUE) <= 8388607)) #define IS_DFSDM_BREAK_SIGNALS(VALUE) ((VALUE) <= 0x0FU) 7 defines#if defined(DFSDM2_Channel0) #define IS_DFSDM_REGULAR_CHANNEL(CHANNEL) (((CHANNEL) == DFSDM_CHANNEL_0) || \ ((CHANNEL) == DFSDM_CHANNEL_1) || \ ((CHANNEL) == DFSDM_CHANNEL_2) || \ ((CHANNEL) == DFSDM_CHANNEL_3) || \ ((CHANNEL) == DFSDM_CHANNEL_4) || \ ((CHANNEL) == DFSDM_CHANNEL_5) || \ ((CHANNEL) == DFSDM_CHANNEL_6) || \ ((CHANNEL) == DFSDM_CHANNEL_7))... #define IS_DFSDM_INJECTED_CHANNEL(CHANNEL) (((CHANNEL) != 0U) && ((CHANNEL) <= 0x000F00FFU)) /* ... */#else #define IS_DFSDM_REGULAR_CHANNEL(CHANNEL) (((CHANNEL) == DFSDM_CHANNEL_0) || \ ((CHANNEL) == DFSDM_CHANNEL_1) || \ ((CHANNEL) == DFSDM_CHANNEL_2) || \ ((CHANNEL) == DFSDM_CHANNEL_3))... #define IS_DFSDM_INJECTED_CHANNEL(CHANNEL) (((CHANNEL) != 0U) && ((CHANNEL) <= 0x0003000FU)) /* ... */#endif #define IS_DFSDM_CONTINUOUS_MODE(MODE) (((MODE) == DFSDM_CONTINUOUS_CONV_OFF) || \ ((MODE) == DFSDM_CONTINUOUS_CONV_ON))... #if defined(DFSDM2_Channel0) #define IS_DFSDM1_CHANNEL_INSTANCE(INSTANCE) (((INSTANCE) == DFSDM1_Channel0) || \ ((INSTANCE) == DFSDM1_Channel1) || \ ((INSTANCE) == DFSDM1_Channel2) || \ ((INSTANCE) == DFSDM1_Channel3))... #define IS_DFSDM1_FILTER_INSTANCE(INSTANCE) (((INSTANCE) == DFSDM1_Filter0) || \ ((INSTANCE) == DFSDM1_Filter1))... /* ... */#endif /* DFSDM2_Channel0 */ #if defined(SYSCFG_MCHDLYCR_BSCKSEL) #define IS_DFSDM_CLOCKIN_SELECTION(SELECTION) (((SELECTION) == HAL_DFSDM2_CKIN_PAD) || \ ((SELECTION) == HAL_DFSDM2_CKIN_DM) || \ ((SELECTION) == HAL_DFSDM1_CKIN_PAD) || \ ((SELECTION) == HAL_DFSDM1_CKIN_DM))... #define IS_DFSDM_CLOCKOUT_SELECTION(SELECTION) (((SELECTION) == HAL_DFSDM2_CKOUT_DFSDM2) || \ ((SELECTION) == HAL_DFSDM2_CKOUT_M27) || \ ((SELECTION) == HAL_DFSDM1_CKOUT_DFSDM1) || \ ((SELECTION) == HAL_DFSDM1_CKOUT_M27))... #define IS_DFSDM_DATAIN0_SRC_SELECTION(SELECTION) (((SELECTION) == HAL_DATAIN0_DFSDM2_PAD) || \ ((SELECTION) == HAL_DATAIN0_DFSDM2_DATAIN1) || \ ((SELECTION) == HAL_DATAIN0_DFSDM1_PAD) || \ ((SELECTION) == HAL_DATAIN0_DFSDM1_DATAIN1))... #define IS_DFSDM_DATAIN2_SRC_SELECTION(SELECTION) (((SELECTION) == HAL_DATAIN2_DFSDM2_PAD) || \ ((SELECTION) == HAL_DATAIN2_DFSDM2_DATAIN3) || \ ((SELECTION) == HAL_DATAIN2_DFSDM1_PAD) || \ ((SELECTION) == HAL_DATAIN2_DFSDM1_DATAIN3))... #define IS_DFSDM_DATAIN4_SRC_SELECTION(SELECTION) (((SELECTION) == HAL_DATAIN4_DFSDM2_PAD) || \ ((SELECTION) == HAL_DATAIN4_DFSDM2_DATAIN5))... #define IS_DFSDM_DATAIN6_SRC_SELECTION(SELECTION) (((SELECTION) == HAL_DATAIN6_DFSDM2_PAD) || \ ((SELECTION) == HAL_DATAIN6_DFSDM2_DATAIN7))... #define IS_DFSDM_BITSTREM_CLK_DISTRIBUTION(DISTRIBUTION) (((DISTRIBUTION) == HAL_DFSDM1_CLKIN0_TIM4OC2) || \ ((DISTRIBUTION) == HAL_DFSDM1_CLKIN2_TIM4OC2) || \ ((DISTRIBUTION) == HAL_DFSDM1_CLKIN1_TIM4OC1) || \ ((DISTRIBUTION) == HAL_DFSDM1_CLKIN3_TIM4OC1) || \ ((DISTRIBUTION) == HAL_DFSDM2_CLKIN0_TIM3OC4) || \ ((DISTRIBUTION) == HAL_DFSDM2_CLKIN4_TIM3OC4) || \ ((DISTRIBUTION) == HAL_DFSDM2_CLKIN1_TIM3OC3)|| \ ((DISTRIBUTION) == HAL_DFSDM2_CLKIN5_TIM3OC3) || \ ((DISTRIBUTION) == HAL_DFSDM2_CLKIN2_TIM3OC2) || \ ((DISTRIBUTION) == HAL_DFSDM2_CLKIN6_TIM3OC2) || \ ((DISTRIBUTION) == HAL_DFSDM2_CLKIN3_TIM3OC1)|| \ ((DISTRIBUTION) == HAL_DFSDM2_CLKIN7_TIM3OC1))... #define IS_DFSDM_DFSDM1_CLKOUT(CLKOUT) (((CLKOUT) == DFSDM1_CKOUT_DFSDM2_CKOUT) || \ ((CLKOUT) == DFSDM1_CKOUT_DFSDM1))... #define IS_DFSDM_DFSDM2_CLKOUT(CLKOUT) (((CLKOUT) == DFSDM2_CKOUT_DFSDM2_CKOUT) || \ ((CLKOUT) == DFSDM2_CKOUT_DFSDM2))... #define IS_DFSDM_DFSDM1_CLKIN(CLKIN) (((CLKIN) == DFSDM1_CKIN_DFSDM2_CKOUT) || \ ((CLKIN) == DFSDM1_CKIN_PAD))... #define IS_DFSDM_DFSDM2_CLKIN(CLKIN) (((CLKIN) == DFSDM2_CKIN_DFSDM2_CKOUT) || \ ((CLKIN) == DFSDM2_CKIN_PAD))... #define IS_DFSDM_DFSDM1_BIT_CLK(CLK) (((CLK) == DFSDM1_T4_OC2_BITSTREAM_CKIN0) || \ ((CLK) == DFSDM1_T4_OC2_BITSTREAM_CKIN2) || \ ((CLK) == DFSDM1_T4_OC1_BITSTREAM_CKIN3) || \ ((CLK) == DFSDM1_T4_OC1_BITSTREAM_CKIN1) || \ ((CLK) <= 0x30U))... #define IS_DFSDM_DFSDM2_BIT_CLK(CLK) (((CLK) == DFSDM2_T3_OC4_BITSTREAM_CKIN0) || \ ((CLK) == DFSDM2_T3_OC4_BITSTREAM_CKIN4) || \ ((CLK) == DFSDM2_T3_OC3_BITSTREAM_CKIN5) || \ ((CLK) == DFSDM2_T3_OC3_BITSTREAM_CKIN1) || \ ((CLK) == DFSDM2_T3_OC2_BITSTREAM_CKIN6) || \ ((CLK) == DFSDM2_T3_OC2_BITSTREAM_CKIN2) || \ ((CLK) == DFSDM2_T3_OC1_BITSTREAM_CKIN3) || \ ((CLK) == DFSDM2_T3_OC1_BITSTREAM_CKIN7)|| \ ((CLK) <= 0x1E000U))... #define IS_DFSDM_DFSDM1_DATA_DISTRIBUTION(DISTRIBUTION)(((DISTRIBUTION) == DFSDM1_DATIN0_TO_DATIN0_PAD )|| \ ((DISTRIBUTION) == DFSDM1_DATIN0_TO_DATIN1_PAD) || \ ((DISTRIBUTION) == DFSDM1_DATIN2_TO_DATIN2_PAD) || \ ((DISTRIBUTION) == DFSDM1_DATIN2_TO_DATIN3_PAD)|| \ ((DISTRIBUTION) <= 0xCU))... #define IS_DFSDM_DFSDM2_DATA_DISTRIBUTION(DISTRIBUTION)(((DISTRIBUTION) == DFSDM2_DATIN0_TO_DATIN0_PAD)|| \ ((DISTRIBUTION) == DFSDM2_DATIN0_TO_DATIN1_PAD)|| \ ((DISTRIBUTION) == DFSDM2_DATIN2_TO_DATIN2_PAD)|| \ ((DISTRIBUTION) == DFSDM2_DATIN2_TO_DATIN3_PAD)|| \ ((DISTRIBUTION) == DFSDM2_DATIN4_TO_DATIN4_PAD)|| \ ((DISTRIBUTION) == DFSDM2_DATIN4_TO_DATIN5_PAD)|| \ ((DISTRIBUTION) == DFSDM2_DATIN6_TO_DATIN6_PAD)|| \ ((DISTRIBUTION) == DFSDM2_DATIN6_TO_DATIN7_PAD)|| \ ((DISTRIBUTION) <= 0x1D00U))... /* ... */#endif /* (SYSCFG_MCHDLYCR_BSCKSEL) */ /** * @} *//* ... */ Private macros/* End of private macros -----------------------------------------------------*/ /** * @} *//* ... */ /** * @} *//* ... */ /* ... */#endif /* STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx || STM32F413xx || STM32F423xx */ #ifdef __cplusplus }extern "C" { ... } #endif /* ... */ #endif /* __STM32F4xx_HAL_DFSDM_H */
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.