Go to the documentation of this file.
51 #define ADAS1000_COMM_WRITE 0x80
52 #define ADAS1000_RDY_MASK 0x40
53 #define ADAS1000_ALL_CH_MASK 0x00
54 #define ADAS1000_WD_CNT_MASK 0x01
56 #define ADAS1000_NOP 0x00
57 #define ADAS1000_ECGCTL 0x01
58 #define ADAS1000_LOFFCTL 0x02
59 #define ADAS1000_RESPCTL 0x03
60 #define ADAS1000_PACECTL 0x04
61 #define ADAS1000_CMREFCTL 0x05
62 #define ADAS1000_GPIOCTL 0x06
63 #define ADAS1000_PACEAMPTH 0x07
64 #define ADAS1000_TESTTONE 0x08
65 #define ADAS1000_CALDAC 0x09
66 #define ADAS1000_FRMCTL 0x0A
67 #define ADAS1000_FILTCTL 0x0B
68 #define ADAS1000_LOFFUTH 0x0C
69 #define ADAS1000_LOFFLTH 0x0D
70 #define ADAS1000_PACEEDGETH 0x0E
71 #define ADAS1000_PACELVLTH 0x0F
72 #define ADAS1000_LADATA 0x11
73 #define ADAS1000_LLDATA 0x12
74 #define ADAS1000_RADATA 0x13
75 #define ADAS1000_V1DATA 0x14
76 #define ADAS1000_V2DATA 0x15
77 #define ADAS1000_PACEDATA 0x1A
78 #define ADAS1000_RESPMAG 0x1B
79 #define ADAS1000_RESPPH 0x1C
80 #define ADAS1000_LOFF 0x1D
81 #define ADAS1000_DCLEADSOFF 0x1E
82 #define ADAS1000_EXTENDSW 0x20
83 #define ADAS1000_CALLA 0x21
84 #define ADAS1000_CALLL 0x22
85 #define ADAS1000_CALRA 0x23
86 #define ADAS1000_CALV1 0x24
87 #define ADAS1000_CALV2 0x25
88 #define ADAS1000_LOAMLA 0x31
89 #define ADAS1000_LOAMLL 0x32
90 #define ADAS1000_LOAMRA 0x33
91 #define ADAS1000_LOAMV1 0x34
92 #define ADAS1000_LOAMV2 0x35
93 #define ADAS1000_PACE1_DATA 0x3A
94 #define ADAS1000_PACE2_DATA 0x3B
95 #define ADAS1000_PACE3_DATA 0x3C
96 #define ADAS1000_FRAMES 0x40
97 #define ADAS1000_CRC 0x41
104 #define ADAS1000_ECGCTL_LAEN (1ul << 23)
107 #define ADAS1000_ECGCTL_LLEN (1ul << 22)
110 #define ADAS1000_ECGCTL_RAEN (1ul << 21)
113 #define ADAS1000_ECGCTL_V1EN (1ul << 20)
116 #define ADAS1000_ECGCTL_V2EN (1ul << 19)
120 #define ADAS1000_ECGCTL_CHCONFIG (1ul << 10)
124 #define ADAS1000_ECGCTL_GAIN (1ul << 8)
127 #define ADAS1000_ECGCTL_VREFBUF (1ul << 7)
132 #define ADAS1000_ECGCTL_CLKEXT (1ul << 6)
136 #define ADAS1000_ECGCTL_MASTER (1ul << 5)
139 #define ADAS1000_ECGCTL_GANG (1ul << 4)
143 #define ADAS1000_ECGCTL_HP (1ul << 3)
146 #define ADAS1000_ECGCTL_CNVEN (1ul << 2)
150 #define ADAS1000_ECGCTL_PWREN (1ul << 1)
155 #define ADAS1000_ECGCTL_SWRST (1ul << 0)
160 #define ADAS1000_LOFFCTL_LAPH (1ul << 23)
162 #define ADAS1000_LOFFCTL_LLPH (1ul << 22)
164 #define ADAS1000_LOFFCTL_RAPH (1ul << 21)
166 #define ADAS1000_LOFFCTL_V1PH (1ul << 20)
168 #define ADAS1000_LOFFCTL_V2PH (1ul << 19)
170 #define ADAS1000_LOFFCTL_CEPH (1ul << 18)
174 #define ADAS1000_LOFFCTL_LAACLOEN (1ul << 17)
178 #define ADAS1000_LOFFCTL_LLACLOEN (1ul << 16)
182 #define ADAS1000_LOFFCTL_RAACLOEN (1ul << 15)
186 #define ADAS1000_LOFFCTL_V1ACLOEN (1ul << 14)
190 #define ADAS1000_LOFFCTL_V2ACLOEN (1ul << 13)
194 #define ADAS1000_LOFFCTL_CEACLOEN (1ul << 12)
198 #define ADAS1000_LOFFCTL_ACCURREN (1ul << 7)
202 #define ADAS1000_LOFFCTL_DCCURRENT (1ul << 2)
208 #define ADAS1000_LOFFCTL_ACSEL (1ul << 1)
211 #define ADAS1000_LOFFCTL_LOFFEN (1ul << 0)
220 #define ADAS1000_RESPCTL_RESPEXTSYNC (1ul << 15)
224 #define ADAS1000_RESPCTL_RESPEXTAMP (1ul << 14)
227 #define ADAS1000_RESPCTL_RESPOUT (1ul << 13)
230 #define ADAS1000_RESPCTL_RESPCAP (1ul << 12)
235 #define ADAS1000_RESPCTL_RESPGAIN (1ul << 8)
239 #define ADAS1000_RESPCTL_RESPEXTSEL (1ul << 7)
243 #define ADAS1000_RESPCTL_RESPSEL (1ul << 5)
247 #define ADAS1000_RESPCTL_RESPAMP (1ul << 3)
250 #define ADAS1000_RESPCTL_RESPFREQ (1ul << 1)
253 #define ADAS1000_RESPCTL_RESPEN (1ul << 0)
255 #define ADAS1000_RESPCTL_RESPGAIN_MASK (0x0000000Ful << 8)
256 #define ADAS1000_RESPCTL_RESPSEL_MASK (0x00000003ul << 5)
263 #define ADAS1000_PACECTL_PACEFILTW (1ul << 11)
266 #define ADAS1000_PACECTL_PACETFILT2 (1ul << 10)
269 #define ADAS1000_PACECTL_PACETFILT1 (1ul << 9)
272 #define ADAS1000_PACECTL_PACE3SEL (1ul << 7)
275 #define ADAS1000_PACECTL_PACE2SEL (1ul << 5)
278 #define ADAS1000_PACECTL_PACE1SEL (1ul << 3)
281 #define ADAS1000_PACECTL_PACE3EN (1ul << 2)
284 #define ADAS1000_PACECTL_PACE2EN (1ul << 1)
287 #define ADAS1000_PACECTL_PACE1EN (1ul << 0)
288 #define ADAS1000_PACECTL_PACE3SEL_MASK (0x00000003ul << 7)
289 #define ADAS1000_PACECTL_PACE2SEL_MASK (0x00000003ul << 5)
290 #define ADAS1000_PACECTL_PACE1SEL_MASK (0x00000003ul << 3)
296 #define ADAS1000_CMREFCTL_LACM (1ul << 23)
298 #define ADAS1000_CMREFCTL_LLCM (1ul << 22)
300 #define ADAS1000_CMREFCTL_RACM (1ul << 21)
302 #define ADAS1000_CMREFCTL_V1CM (1ul << 20)
308 #define ADAS1000_CMREFCTL_V2CM (1ul << 19)
312 #define ADAS1000_CMREFCTL_LARLD (1ul << 14)
316 #define ADAS1000_CMREFCTL_LLRLD (1ul << 13)
320 #define ADAS1000_CMREFCTL_RARLD (1ul << 12)
324 #define ADAS1000_CMREFCTL_V1RLD (1ul << 11)
328 #define ADAS1000_CMREFCTL_V2RLD (1ul << 10)
332 #define ADAS1000_CMREFCTL_CERLD (1ul << 9)
336 #define ADAS1000_CMREFCTL_CEREFEN (1ul << 8)
341 #define ADAS1000_CMREFCTL_RLDSEL (1ul << 4)
347 #define ADAS1000_CMREFCTL_DRVCM (1ul << 3)
352 #define ADAS1000_CMREFCTL_EXTCM (1ul << 2)
356 #define ADAS1000_CMREFCTL_RLD_EN (1ul << 1)
360 #define ADAS1000_CMREFCTL_SHLDEN (1ul << 0)
362 #define ADAS1000_CMREFCTL_RLDSEL_MASK (0x0000000Ful << 4)
370 #define ADAS1000_GPIOCTL_SPIFW (1ul << 18)
377 #define ADAS1000_GPIOCTL_SPIEN (1ul << 16)
381 #define ADAS1000_GPIOCTL_G3CTL (1ul << 14)
386 #define ADAS1000_GPIOCTL_G3OUT (1ul << 13)
390 #define ADAS1000_GPIOCTL_G3IN (1ul << 12)
394 #define ADAS1000_GPIOCTL_G2CTL (1ul << 10)
399 #define ADAS1000_GPIOCTL_G2OUT (1ul << 9)
403 #define ADAS1000_GPIOCTL_G2IN (1ul << 8)
407 #define ADAS1000_GPIOCTL_G1CTL (1ul << 6)
412 #define ADAS1000_GPIOCTL_G1OUT (1ul << 5)
416 #define ADAS1000_GPIOCTL_G1IN (1ul << 4)
420 #define ADAS1000_GPIOCTL_G0CTL (1ul << 2)
425 #define ADAS1000_GPIOCTL_G0OUT (1ul << 1)
430 #define ADAS1000_GPIOCTL_G0IN (1ul << 0)
431 #define ADAS1000_GPIOCTL_G3CTL_MASK (0x00000003ul << 14)
432 #define ADAS1000_GPIOCTL_G2CTL_MASK (0x00000003ul << 10)
433 #define ADAS1000_GPIOCTL_G1CTL_MASK (0x00000003ul << 6)
434 #define ADAS1000_GPIOCTL_G0CTL_MASK (0x00000003ul << 2)
440 #define ADAS1000_PACEAMPTH_PACE3AMPTH (1ul << 16)
442 #define ADAS1000_PACEAMPTH_PACE2AMPTH (1ul << 8)
443 #define ADAS1000_PACEAMPTH_PACE1AMPTH (1ul << 0)
445 #define ADAS1000_PACEAMPTH_PACE3AMPTH_MASK (0x000000FFul << 16)
446 #define ADAS1000_PACEAMPTH_PACE2AMPTH_MASK (0x000000FFul << 8)
447 #define ADAS1000_PACEAMPTH_PACE1AMPTH_MASK (0x000000FFul << 0)
453 #define ADAS1000_TESTTONE_TONLA (1ul << 23)
455 #define ADAS1000_TESTTONE_TONLL (1ul << 22)
457 #define ADAS1000_TESTTONE_TONRA (1ul << 21)
458 #define ADAS1000_TESTTONE_TONV1 (1ul << 20)
459 #define ADAS1000_TESTTONE_TONV2 (1ul << 19)
463 #define ADAS1000_TESTTONE_TONTYPE (1ul << 3)
467 #define ADAS1000_TESTTONE_TONINT (1ul << 2)
471 #define ADAS1000_TESTTONE_TONOUT (1ul << 1)
478 #define ADAS1000_TESTTONE_TONEN (1ul << 0)
480 #define ADAS1000_TESTTONE_TONTYPE_MASK (0x00000003ul << 3)
489 #define ADAS1000_CALDAC_CALCHPEN (1ul << 13)
494 #define ADAS1000_CALDAC_CALMODEEN (1ul << 12)
500 #define ADAS1000_CALDAC_CALINT (1ul << 11)
508 #define ADAS1000_CALDAC_CALDACEN (1ul << 10)
510 #define ADAS1000_CALDAC_CALDATA (1ul << 0)
512 #define ADAS1000_CALDAC_CALDATA_MASK (0x000003FFul << 0)
522 #define ADAS1000_FRMCTL_LEAD_I_LADIS (1ul << 23)
523 #define ADAS1000_FRMCTL_LEAD_II_LLDIS (1ul << 22)
524 #define ADAS1000_FRMCTL_LEAD_III_RADIS (1ul << 21)
525 #define ADAS1000_FRMCTL_V1DIS (1ul << 20)
526 #define ADAS1000_FRMCTL_V2DIS (1ul << 19)
530 #define ADAS1000_FRMCTL_PACEDIS (1ul << 14)
534 #define ADAS1000_FRMCTL_RESPMDIS (1ul << 13)
538 #define ADAS1000_FRMCTL_RESPPHDIS (1ul << 12)
542 #define ADAS1000_FRMCTL_LOFFDIS (1ul << 11)
546 #define ADAS1000_FRMCTL_GPIODIS (1ul << 10)
550 #define ADAS1000_FRMCTL_CRCDIS (1ul << 9)
557 #define ADAS1000_FRMCTL_SIGNEDEN (1ul << 8)
562 #define ADAS1000_FRMCTL_ADIS (1ul << 7)
568 #define ADAS1000_FRMCTL_RDYRPT (1ul << 6)
573 #define ADAS1000_FRMCTL_DATAFMT (1ul << 4)
578 #define ADAS1000_FRMCTL_SKIP (1ul << 2)
580 #define ADAS1000_FRMCTL_FRMRATE_2KHZ 0x00
582 #define ADAS1000_FRMCTL_FRMRATE_16KHZ 0x01
584 #define ADAS1000_FRMCTL_FRMRATE_128KHZ 0x10
586 #define ADAS1000_FRMCTL_FRMRATE_31_25HZ 0x11
588 #define ADAS1000_FRMCTL_WORD_MASK (ADAS1000_FRMCTL_LEAD_I_LADIS | \
589 ADAS1000_FRMCTL_LEAD_II_LLDIS | \
590 ADAS1000_FRMCTL_LEAD_III_RADIS | \
591 ADAS1000_FRMCTL_V1DIS | \
592 ADAS1000_FRMCTL_V2DIS | \
593 ADAS1000_FRMCTL_PACEDIS | \
594 ADAS1000_FRMCTL_RESPMDIS | \
595 ADAS1000_FRMCTL_RESPPHDIS | \
596 ADAS1000_FRMCTL_LOFFDIS | \
597 ADAS1000_FRMCTL_GPIODIS | \
598 ADAS1000_FRMCTL_CRCDIS)
599 #define ADAS1000_FRMCTL_SKIP_MASK (0x00000003ul << 2)
600 #define ADAS1000_FRMCTL_FRMRATE_MASK (0x00000003ul << 0)
608 #define ADAS1000_FILTCTL_MN2K (1ul << 5)
612 #define ADAS1000_FILTCTL_N2KBP (1ul << 4)
617 #define ADAS1000_FILTCTL_LPF (1ul << 2)
619 #define ADAS1000_FILTCTL_LPF_MASK (0x00000003ul << 2)
633 #define ADAS1000_LOFFUTH_ADCOVER (1ul << 16)
636 #define ADAS1000_LOFFUTH_LOFFUTH (1ul << 0)
638 #define ADAS1000_LOFFUTH_ADCOVER_MASK (0x0000000Ful << 16)
639 #define ADAS1000_LOFFUTH_LOFFUTH_MASK (0x0000FFFFul << 0)
652 #define ADAS1000_LOFFLTH_ADCUNDR (1ul << 16)
655 #define ADAS1000_LOFFLTH_LOFFLTH (1ul << 0)
657 #define ADAS1000_LOFFLTH_ADCUNDR_MASK (0x0000000Ful << 16)
658 #define ADAS1000_LOFFLTH_LOFFLTH_MASK (0x0000FFFFul << 0)
664 #define ADAS1000_PACEEDGETH_PACE3EDGTH (1ul << 16)
666 #define ADAS1000_PACEEDGETH_PACE2EDGTH (1ul << 8)
668 #define ADAS1000_PACEEDGETH_PACE1EDGTH (1ul << 0)
671 #define ADAS1000_PACEEDGETH_PACE3EDGTH_MASK (0x000000FFul << 16)
672 #define ADAS1000_PACEEDGETH_PACE2EDGTH_MASK (0x000000FFul << 8)
673 #define ADAS1000_PACEEDGETH_PACE1EDGTH_MASK (0x000000FFul << 0)
679 #define ADAS1000_PACELVLTH_PACE3LVLTH (1ul << 16)
681 #define ADAS1000_PACELVLTH_PACE2LVLTH (1ul << 8)
683 #define ADAS1000_PACELVLTH_PACE1LVLTH (1ul << 0)
687 #define ADAS1000_PACELVLTH_PACE3LVLTH_MASK (0x000000FFul << 16)
688 #define ADAS1000_PACELVLTH_PACE2LVLTH_MASK (0x000000FFul << 8)
689 #define ADAS1000_PACELVLTH_PACE1LVLTH_MASK (0x000000FFul << 0)
699 #define ADAS1000_LADATA_ADDRESS (1ul << 24)
716 #define ADAS1000_LADATA_ECG_DATA (1ul << 0)
717 #define ADAS1000_LADATA_ADDRESS_MASK (0x000000FFul << 24)
718 #define ADAS1000_LADATA_ECG_DATA_MASK (0x00FFFFFFul << 0)
724 #define ADAS1000_PACEDATA_ADDRESS (1ul << 24)
729 #define ADAS1000_PACEDATA_PACE3_DETECTED (1ul << 23)
732 #define ADAS1000_PACEDATA_PACE_CH3_HEIGHT (1ul << 16)
735 #define ADAS1000_PACEDATA_PACE_CH3_WIDTH (1ul << 20)
740 #define ADAS1000_PACEDATA_PACE2_DETECTED (1ul << 15)
743 #define ADAS1000_PACEDATA_PACE_CH2_WIDTH (1ul << 12)
746 #define ADAS1000_PACEDATA_PACE_CH2_HEIGHT (1ul << 8)
751 #define ADAS1000_PACEDATA_PACE1_DETECTED (1ul << 7)
754 #define ADAS1000_PACEDATA_PACE_CH1_WIDTH (1ul << 4)
757 #define ADAS1000_PACEDATA_CH1_HEIGHT (1ul << 0)
759 #define ADAS1000_PACEDATA_ADDRESS_MASK (0x000000FFul << 24)
760 #define ADAS1000_PACEDATA_PACE_CH3_WIDTH_MASK (0x00000007ul << 20)
761 #define ADAS1000_PACEDATA_PACE_CH3_HEIGHT_MASK (0x0000000Ful << 16)
762 #define ADAS1000_PACEDATA_PACE_CH2_WIDTH_MASK (0x00000007ul << 12)
763 #define ADAS1000_PACEDATA_PACE_CH2_HEIGHT_MASK (0x0000000Ful << 8)
764 #define ADAS1000_PACEDATA_PACE_CH1_WIDTH_MASK (0x00000007ul << 4)
765 #define ADAS1000_PACEDATA_PACE_CH1_HEIGHT_MASK (0x0000000Ful << 0)
771 #define ADAS1000_RESPMAG_ADDRESS (1ul << 24)
773 #define ADAS1000_RESPMAG_MAGNITUDE (1ul << 0)
775 #define ADAS1000_RESPMAG_ADDRESS_MASK (0x000000FFul << 24)
776 #define ADAS1000_RESPMAG_MAGNITUDE_MASK (0x00FFFFFFul << 0)
782 #define ADAS1000_RESPPH_ADDRESS (1ul << 24)
792 #define ADAS1000_RESPPH_PHASE (1ul << 0)
794 #define ADAS1000_RESPPH_ADDRESS_MASK (0x000000FFul << 24)
795 #define ADAS1000_RESPPH_PHASE_MASK (0x00FFFFFFul << 0)
801 #define ADAS1000_LOFF_ADDRESS (1ul << 24)
814 #define ADAS1000_LOFF_RL_LEADS_OFF_STATUS (1ul << 23)
815 #define ADAS1000_LOFF_LA_LEADS_OFF_STATUS (1ul << 22)
816 #define ADAS1000_LOFF_LL_LEADS_OFF_STATUS (1ul << 21)
817 #define ADAS1000_LOFF_RA_LEADS_OFF_STATUS (1ul << 20)
818 #define ADAS1000_LOFF_V1_LEADS_OFF_STATUS (1ul << 19)
819 #define ADAS1000_LOFF_V2_LEADS_OFF_STATUS (1ul << 18)
820 #define ADAS1000_LOFF_CELO (1ul << 13)
825 #define ADAS1000_LOFF_LAADCOR (1ul << 12)
826 #define ADAS1000_LOFF_LLADCOR (1ul << 11)
827 #define ADAS1000_LOFF_RAADCOR (1ul << 10)
828 #define ADAS1000_LOFF_V1ADCOR (1ul << 9)
829 #define ADAS1000_LOFF_V2ADCOR (1ul << 8)
831 #define ADAS1000_LOFF_ADDRESS_MASK (0x000000FFul << 24)
837 #define ADAS1000_DCLEADSOFF_ADDRESS (1ul << 24)
843 #define ADAS1000_DCLEADSOFF_RL_INPUT_OVERRANGE (1ul << 23)
844 #define ADAS1000_DCLEADSOFF_LA_INPUT_OVERRANGE (1ul << 22)
845 #define ADAS1000_DCLEADSOFF_LL_INPUT_OVERRANGE (1ul << 21)
846 #define ADAS1000_DCLEADSOFF_RA_INPUT_OVERRANGE (1ul << 20)
847 #define ADAS1000_DCLEADSOFF_CE_INPUT_OVERRANGE (1ul << 13)
854 #define ADAS1000_DCLEADSOFF_RL_INPUT_UNDERRANGE (1ul << 12)
855 #define ADAS1000_DCLEADSOFF_LA_INPUT_UNDERRANGE (1ul << 11)
856 #define ADAS1000_DCLEADSOFF_LL_INPUT_UNDERRANGE (1ul << 10)
857 #define ADAS1000_DCLEADSOFF_RA_INPUT_UNDERRANGE (1ul << 9)
858 #define ADAS1000_DCLEADSOFF_CE_INPUT_UNDERRANGE (1ul << 2)
860 #define ADAS1000_DCLEADSOFF_ADDRESS_MASK (0x000000FFul << 24)
869 #define ADAS1000_EXTENDSW_EXTRESP_RA_LA (1ul << 23)
870 #define ADAS1000_EXTENDSW_EXTRESP_RA_LL (1ul << 22)
871 #define ADAS1000_EXTENDSW_EXTRESP_RA_RA (1ul << 21)
872 #define ADAS1000_EXTENDSW_EXTRESP_RA_V1 (1ul << 20)
873 #define ADAS1000_EXTENDSW_EXTRESP_RA_V2 (1ul << 19)
874 #define ADAS1000_EXTENDSW_EXTRESP_LL_LA (1ul << 18)
875 #define ADAS1000_EXTENDSW_EXTRESP_LL_LL (1ul << 17)
876 #define ADAS1000_EXTENDSW_EXTRESP_LL_RA (1ul << 16)
877 #define ADAS1000_EXTENDSW_EXTRESP_LL_V1 (1ul << 15)
878 #define ADAS1000_EXTENDSW_EXTRESP_LL_V2 (1ul << 14)
879 #define ADAS1000_EXTENDSW_EXTRESP_LA_LA (1ul << 13)
880 #define ADAS1000_EXTENDSW_EXTRESP_LA_LL (1ul << 12)
881 #define ADAS1000_EXTENDSW_EXTRESP_LA_RA (1ul << 11)
882 #define ADAS1000_EXTENDSW_EXTRESP_LA_V1 (1ul << 10)
883 #define ADAS1000_EXTENDSW_EXTRESP_LA_V2 (1ul << 9)
894 #define ADAS1000_EXTENDSW_FREE_V1 (1ul << 8)
895 #define ADAS1000_EXTENDSW_FREE_V2 (1ul << 7)
903 #define ADAS1000_EXTENDSW_NOMATH_V1 (1ul << 6)
904 #define ADAS1000_EXTENDSW_NOMATH_V2 (1ul << 5)
914 #define ADAS1000_CAL_ADDRESS (1ul << 24)
918 #define ADAS1000_CAL_USRCAL (1ul << 23)
929 #define ADAS1000_CAL_CALVALUE (1ul << 0)
931 #define ADAS1000_CAL_ADDRESS_MASK (0x000000FFul << 24)
932 #define ADAS1000_CAL_CALVALUE_MASK (0x00000FFFul << 0)
942 #define ADAS1000_LOAM_ADDRESS (1ul << 24)
953 #define ADAS1000_LOAM_LOFFAM (1ul << 0)
955 #define ADAS1000_LOAM_ADDRESS_MASK (0x000000FFul << 24)
956 #define ADAS1000_LOAM_LOFFAM_MASK (0x0000FFFFul << 0)
964 #define ADAS1000_PACE_DATA_ADDRESS (1ul << 24)
969 #define ADAS1000_PACE_DATA_HEIGHT (1ul << 8)
974 #define ADAS1000_PACE_DATA_WIDTH (1ul << 0)
976 #define ADAS1000_PACE_DATA_ADDRESS_MASK (0x000000FFul << 24)
977 #define ADAS1000_PACE_DATA_HEIGHT_MASK (0x0000FFFFul << 8)
978 #define ADAS1000_PACE_DATA_WIDTH_MASK (0x000000FFul << 0)
984 #define ADAS1000_FRAMES_MARKER (1ul << 31)
989 #define ADAS1000_FRAMES_READY_BIT (1ul << 30)
1001 #define ADAS1000_FRAMES_OVERFLOW (1ul << 28)
1005 #define ADAS1000_FRAMES_FAULT (1ul << 27)
1010 #define ADAS1000_FRAMES_PACE3_DETECTED (1ul << 26)
1015 #define ADAS1000_FRAMES_PACE2_DETECTED (1ul << 25)
1020 #define ADAS1000_FRAMES_PACE1_DETECTED (1ul << 24)
1023 #define ADAS1000_FRAMES_RESPIRATION (1ul << 23)
1030 #define ADAS1000_FRAMES_LEADS_OFF_DETECTED (1ul << 22)
1033 #define ADAS1000_FRAMES_DC_LEADS_OFF_DETECTED (1ul << 21)
1036 #define ADAS1000_FRAMES_ADC_OUT_OF_RANGE (1ul << 20)
1041 #define ADAS1000_CRC_MASK (0x00FFFFFF << 0)
1046 #define ADAS1000_31_25HZ_FRAME_RATE 3125
1047 #define ADAS1000_2KHZ_FRAME_RATE 2000
1048 #define ADAS1000_16KHZ_FRAME_RATE 16000
1049 #define ADAS1000_128KHZ_FRAME_RATE 128000
1051 #define ADAS1000_31_25HZ_WORD_SIZE 32
1052 #define ADAS1000_2KHZ_WORD_SIZE 32
1053 #define ADAS1000_16KHZ_WORD_SIZE 32
1054 #define ADAS1000_128KHZ_WORD_SIZE 16
1056 #define ADAS1000_31_25HZ_FRAME_SIZE 12
1057 #define ADAS1000_2KHZ_FRAME_SIZE 12
1058 #define ADAS1000_16KHZ_FRAME_SIZE 12
1059 #define ADAS1000_128KHZ_FRAME_SIZE 15
1064 #define CRC_POLY_2KHZ_16KHZ 0x005D6DCBul
1065 #define CRC_CHECK_CONST_2KHZ_16KHZ 0x0015A0BAul
1067 #define CRC_POLY_128KHZ 0x00001021ul
1068 #define CRC_CHECK_CONST_128KHz 0x00001D0Ful
1108 uint32_t *spi_freq);
1116 uint32_t *reg_data);
1130 uint32_t words_mask);
1137 uint32_t frame_cnt,
struct read_param *read_data_param);
int32_t adas1000_init(struct adas1000_dev **device, const struct adas1000_init_param *init_param)
Initializes the SPI communication with ADAS1000. The ADAS1000 is configured with the specified frame ...
Definition: adas1000.c:94
#define ADAS1000_31_25HZ_FRAME_SIZE
Definition: adas1000.h:1056
int32_t adas1000_read_data(struct adas1000_dev *device, uint8_t *data_buff, uint32_t frame_cnt, struct read_param *read_data_param)
Reads the specified number of frames.
Definition: adas1000.c:325
int32_t adas1000_soft_reset(struct adas1000_dev *device)
Software reset of the device.
Definition: adas1000.c:189
uint32_t inactive_words_no
Definition: adas1000.h:1078
#define ADAS1000_ALL_CH_MASK
Definition: adas1000.h:53
int32_t adas1000_write(struct adas1000_dev *device, uint8_t reg_addr, uint32_t reg_data)
Write device register.
Definition: adas1000.c:170
#define ADAS1000_128KHZ_WORD_SIZE
Definition: adas1000.h:1054
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
Header file of SPI Interface.
#define CRC_POLY_128KHZ
Definition: adas1000.h:1067
#define ADAS1000_2KHZ_FRAME_RATE
Definition: adas1000.h:1047
#define ADAS1000_31_25HZ_FRAME_RATE
Definition: adas1000.h:1046
int32_t adas1000_read_data(struct adas1000_dev *device, uint8_t *data_buff, uint32_t frame_cnt, struct read_param *read_data_param)
Reads the specified number of frames.
Definition: adas1000.c:325
bool start_read
Definition: adas1000.h:1090
#define ADAS1000_NOP
Definition: adas1000.h:56
void no_os_crc24_populate_msb(uint32_t *table, const uint32_t polynomial)
Definition: adas1000.h:1081
#define ADAS1000_WD_CNT_MASK
Definition: adas1000.h:54
uint32_t frame_rate
Definition: adas1000.h:1085
#define ADAS1000_128KHZ_FRAME_SIZE
Definition: adas1000.h:1059
Definition: ad9361_util.h:69
#define ADAS1000_FRMCTL_FRMRATE_2KHZ
Definition: adas1000.h:580
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
struct no_os_spi_init_param spi_init
Definition: adas1000.h:1083
#define ADAS1000_FRMCTL_FRMRATE_31_25HZ
Definition: adas1000.h:586
#define ADAS1000_FRMCTL_FRMRATE_MASK
Definition: adas1000.h:600
#define ADAS1000_16KHZ_WORD_SIZE
Definition: adas1000.h:1053
#define ADAS1000_16KHZ_FRAME_SIZE
Definition: adas1000.h:1058
#define ADAS1000_ECGCTL_SWRST
Definition: adas1000.h:155
uint32_t frame_size
Definition: adas1000.h:1074
uint32_t adas1000_compute_frame_crc(struct adas1000_dev *device, uint8_t *buff)
Computes the CRC for a frame.
Definition: adas1000.c:402
#define ADAS1000_FRMCTL_WORD_MASK
Definition: adas1000.h:588
int32_t adas1000_compute_frame_size(struct adas1000_dev *device)
Compute frame size.
Definition: adas1000.c:206
#define ADAS1000_16KHZ_FRAME_RATE
Definition: adas1000.h:1048
bool ready_repeat
Definition: adas1000.h:1099
int32_t adas1000_set_inactive_framewords(struct adas1000_dev *device, uint32_t words_mask)
Selects which words are not included in a data frame.
Definition: adas1000.c:239
int32_t adas1000_compute_frame_size(struct adas1000_dev *device)
Compute frame size.
Definition: adas1000.c:206
#define ADAS1000_ECGCTL
Definition: adas1000.h:57
bool stop_read
Definition: adas1000.h:1093
#define ADAS1000_2KHZ_FRAME_SIZE
Definition: adas1000.h:1057
#define ADAS1000_FRMCTL
Definition: adas1000.h:66
int32_t adas1000_set_frame_rate(struct adas1000_dev *device, uint32_t rate)
Sets the frame rate.
Definition: adas1000.c:277
int32_t adas1000_read(struct adas1000_dev *device, uint8_t reg_addr, uint32_t *reg_data)
Read device register.
Definition: adas1000.c:141
int32_t adas1000_set_frame_rate(struct adas1000_dev *device, uint32_t rate)
Sets the frame rate.
Definition: adas1000.c:277
bool wait_for_ready
Definition: adas1000.h:1096
int32_t adas1000_init(struct adas1000_dev **device, const struct adas1000_init_param *init_param)
Initializes the SPI communication with ADAS1000. The ADAS1000 is configured with the specified frame ...
Definition: adas1000.c:94
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
int32_t adas1000_write(struct adas1000_dev *device, uint8_t reg_addr, uint32_t reg_data)
Write device register.
Definition: adas1000.c:170
Generic header file for all CRC computation algorithms.
#define ADAS1000_128KHZ_FRAME_RATE
Definition: adas1000.h:1049
#define ADAS1000_FRAMES
Definition: adas1000.h:96
Definition: adas1000.h:1070
int32_t adas1000_set_inactive_framewords(struct adas1000_dev *device, uint32_t words_mask)
Selects which words are not included in a data frame.
Definition: adas1000.c:239
int32_t adas1000_read(struct adas1000_dev *device, uint8_t reg_addr, uint32_t *reg_data)
Read device register.
Definition: adas1000.c:141
uint32_t no_os_crc24(const uint32_t *table, const uint8_t *pdata, size_t nbytes, uint32_t crc)
uint16_t no_os_crc16(const uint16_t *table, const uint8_t *pdata, size_t nbytes, uint16_t crc)
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
struct no_os_spi_desc * spi_desc
Definition: adas1000.h:1072
#define ADAS1000_FRMCTL_FRMRATE_16KHZ
Definition: adas1000.h:582
#define ADAS1000_COMM_WRITE
Definition: adas1000.h:51
Definition: adas1000.h:1088
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define NO_OS_DECLARE_CRC16_TABLE(_table)
Definition: no_os_crc16.h:41
uint32_t adas1000_compute_frame_crc(struct adas1000_dev *device, uint8_t *buff)
Computes the CRC for a frame.
Definition: adas1000.c:402
#define ADAS1000_31_25HZ_WORD_SIZE
Definition: adas1000.h:1051
#define NO_OS_DECLARE_CRC24_TABLE(_table)
Definition: no_os_crc24.h:41
int32_t adas1000_compute_spi_freq(struct adas1000_init_param *init_param, uint32_t *spi_freq)
Preliminary function which computes the spi frequency based on the frame rate value passed input para...
Definition: adas1000.c:56
#define ADAS1000_RDY_MASK
Definition: adas1000.h:52
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
void no_os_crc16_populate_msb(uint16_t *table, const uint16_t polynomial)
Header file of ADAS1000 Driver.
#define ADAS1000_2KHZ_WORD_SIZE
Definition: adas1000.h:1052
#define CRC_POLY_2KHZ_16KHZ
Definition: adas1000.h:1064
#define ADAS1000_FRMCTL_FRMRATE_128KHZ
Definition: adas1000.h:584
uint32_t frame_rate
Definition: adas1000.h:1076
int32_t adas1000_compute_spi_freq(struct adas1000_init_param *init_param, uint32_t *spi_freq)
Preliminary function which computes the spi frequency based on the frame rate value passed input para...
Definition: adas1000.c:56
int32_t adas1000_soft_reset(struct adas1000_dev *device)
Software reset of the device.
Definition: adas1000.c:189
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140