Go to the documentation of this file.
51 #define ADPD188_REG_STATUS 0x00
52 #define ADPD188_REG_INT_MASK 0x01
53 #define ADPD188_REG_GPIO_DRV 0x02
54 #define ADPD188_REG_BG_STATUS 0x04
55 #define ADPD188_REG_FIFO_THRESH 0x06
56 #define ADPD188_REG_DEVID 0x08
57 #define ADPD188_REG_I2CS_ID 0x09
58 #define ADPD188_REG_CLK_RATIO 0x0A
59 #define ADPD188_REG_GPIO_CTRL 0x0B
60 #define ADPD188_REG_SLAVE_ADDR_KEY 0x0D
61 #define ADPD188_REG_SW_RESET 0x0F
62 #define ADPD188_REG_MODE 0x10
63 #define ADPD188_REG_SLOT_EN 0x11
64 #define ADPD188_REG_FSAMPLE 0x12
65 #define ADPD188_REG_PD_LED_SELECT 0x14
66 #define ADPD188_REG_NUM_AVG 0x15
67 #define ADPD188_REG_BG_MEAS_A 0x16
68 #define ADPD188_REG_INT_SEQ_A 0x17
69 #define ADPD188_REG_SLOTA_CH1_OFFSET 0x18
70 #define ADPD188_REG_SLOTA_CH2_OFFSET 0x19
71 #define ADPD188_REG_SLOTA_CH3_OFFSET 0x1A
72 #define ADPD188_REG_SLOTA_CH4_OFFSET 0x1B
73 #define ADPD188_REG_BG_MEAS_B 0x1C
74 #define ADPD188_REG_INT_SEQ_B 0x1D
75 #define ADPD188_REG_SLOTB_CH1_OFFSET 0x1E
76 #define ADPD188_REG_SLOTB_CH2_OFFSET 0x1F
77 #define ADPD188_REG_SLOTB_CH3_OFFSET 0x20
78 #define ADPD188_REG_SLOTB_CH4_OFFSET 0x21
79 #define ADPD188_REG_ILED3_COARSE 0x22
80 #define ADPD188_REG_ILED1_COARSE 0x23
81 #define ADPD188_REG_ILED2_COARSE 0x24
82 #define ADPD188_REG_ILED_FINE 0x25
83 #define ADPD188_REG_SLOTA_LED_PULSE 0x30
84 #define ADPD188_REG_SLOTA_NUMPULSES 0x31
85 #define ADPD188_REG_LED_DISABLE 0x34
86 #define ADPD188_REG_SLOTB_LED_PULSE 0x35
87 #define ADPD188_REG_SLOTB_NUMPULSES 0x36
88 #define ADPD188_REG_ALT_PWR_DN 0x37
89 #define ADPD188_REG_EXT_SYNC_STARTUP 0x38
90 #define ADPD188_REG_SLOTA_AFE_WINDOW 0x39
91 #define ADPD188_REG_SLOTB_AFE_WINDOW 0x3B
92 #define ADPD188_REG_AFE_PWR_CFG1 0x3C
93 #define ADPD188_REG_SLOTA_FLOAT_LED 0x3E
94 #define ADPD188_REG_SLOTB_FLOAT_LED 0x3F
95 #define ADPD188_REG_SLOTA_TIA_CFG 0x42
96 #define ADPD188_REG_SLOTA_AFE_CFG 0x43
97 #define ADPD188_REG_SLOTB_TIA_CFG 0x44
98 #define ADPD188_REG_SLOTB_AFE_CFG 0x45
99 #define ADPD188_REG_SAMPLE_CLK 0x4B
100 #define ADPD188_REG_CLK32M_ADJUST 0x4D
101 #define ADPD188_REG_EXT_SYNC_SEL 0x4F
102 #define ADPD188_REG_CLK32M_CAL_EN 0x50
103 #define ADPD188_REG_AFE_PWR_CFG2 0x54
104 #define ADPD188_REG_TIA_INDEP_GAIN 0x55
105 #define ADPD188_REG_MATH 0x58
106 #define ADPD188_REG_FLT_CONFIG_B 0x59
107 #define ADPD188_REG_FLT_LED_FIRE 0x5A
108 #define ADPD188_REG_FLT_CONFIG_A 0x5E
109 #define ADPD188_REG_DATA_ACCESS_CTL 0x5F
110 #define ADPD188_REG_FIFO_ACCESS 0x60
111 #define ADPD188_REG_SLOTA_PD1_16BIT 0x64
112 #define ADPD188_REG_SLOTA_PD2_16BIT 0x65
113 #define ADPD188_REG_SLOTA_PD3_16BIT 0x66
114 #define ADPD188_REG_SLOTA_PD4_16BIT 0x67
115 #define ADPD188_REG_SLOTB_PD1_16BIT 0x68
116 #define ADPD188_REG_SLOTB_PD2_16BIT 0x69
117 #define ADPD188_REG_SLOTB_PD3_16BIT 0x6A
118 #define ADPD188_REG_SLOTB_PD4_16BIT 0x6B
119 #define ADPD188_REG_A_PD1_LOW 0x70
120 #define ADPD188_REG_A_PD2_LOW 0x71
121 #define ADPD188_REG_A_PD3_LOW 0x72
122 #define ADPD188_REG_A_PD4_LOW 0x73
123 #define ADPD188_REG_A_PD1_HIGH 0x74
124 #define ADPD188_REG_A_PD2_HIGH 0x75
125 #define ADPD188_REG_A_PD3_HIGH 0x76
126 #define ADPD188_REG_A_PD4_HIGH 0x77
127 #define ADPD188_REG_B_PD1_LOW 0x78
128 #define ADPD188_REG_B_PD2_LOW 0x79
129 #define ADPD188_REG_B_PD3_LOW 0x7A
130 #define ADPD188_REG_B_PD4_LOW 0x7B
131 #define ADPD188_REG_B_PD1_HIGH 0x7C
132 #define ADPD188_REG_B_PD2_HIGH 0x7D
133 #define ADPD188_REG_B_PD3_HIGH 0x7E
134 #define ADPD188_REG_B_PD4_HIGH 0x7F
137 #define ADPD188_STATUS_FIFO_SAMPLES_MASK 0xFF00
138 #define ADPD188_STATUS_SLOTB_INT_MASK 0x0040
139 #define ADPD188_STATUS_SLOTA_INT_MASK 0x0020
140 #define ADPD188_STATUS_FIFO_SAMPLES_POS 8
141 #define ADPD188_STATUS_SLOTB_INT_POS 6
142 #define ADPD188_STATUS_SLOTA_INT_POS 5
145 #define ADPD188_INT_MASK_FIFO_INT_MASK_MASK 0x0100
146 #define ADPD188_INT_MASK_SLOTB_INT_MASK_MASK 0x0040
147 #define ADPD188_INT_MASK_SLOTA_INT_MASK_MASK 0x0020
148 #define ADPD188_INT_MASK_FIFO_INT_MASK_POS 8
149 #define ADPD188_INT_MASK_SLOTB_INT_MASK_POS 6
150 #define ADPD188_INT_MASK_SLOTA_INT_MASK_POS 5
153 #define ADPD188_GPIO_DRV_GPIO1_DRV_MASK 0x0200
154 #define ADPD188_GPIO_DRV_GPIO1_POL_MASK 0x0100
155 #define ADPD188_GPIO_DRV_GPIO0_ENA_MASK 0x0004
156 #define ADPD188_GPIO_DRV_GPIO0_DRV_MASK 0x0002
157 #define ADPD188_GPIO_DRV_GPIO0_POL_MASK 0x0001
158 #define ADPD188_GPIO_DRV_GPIO1_DRV_POS 9
159 #define ADPD188_GPIO_DRV_GPIO1_POL_POS 8
160 #define ADPD188_GPIO_DRV_GPIO0_ENA_POS 2
161 #define ADPD188_GPIO_DRV_GPIO0_DRV_POS 1
162 #define ADPD188_GPIO_DRV_GPIO0_POL_POS 0
165 #define ADPD188_BG_STATUS_BG_STATUS_B_MASK 0x00F0
166 #define ADPD188_BG_STATUS_BG_STATUS_A_MASK 0x000F
167 #define ADPD188_BG_STATUS_BG_STATUS_B_POS 4
168 #define ADPD188_BG_STATUS_BG_STATUS_A_POS 0
171 #define ADPD188_FIFO_THRESH_FIFO_THRESH_MASK 0x3F00
172 #define ADPD188_FIFO_THRESH_FIFO_THRESH_POS 8
173 #define ADPD188_FIFO_THRESH_MAX_THRESHOLD 63
176 #define ADPD188_DEVID_REV_NUM_MASK 0xFF00
177 #define ADPD188_DEVID_DEV_ID_MASK 0x00FF
178 #define ADPD188_DEVID_REV_NUM_POS 8
179 #define ADPD188_DEVID_DEV_ID_POS 0
181 #define ADPD188_DEVICE_ID 0x0916
183 #define ADPD108X_DEVICE_ID 0x0A16
186 #define ADPD188_I2CS_ID_ADDRESS_WRITE_KEY_MASK 0xFF00
187 #define ADPD188_I2CS_ID_SLAVE_ADDRESS_MASK 0x00FE
188 #define ADPD188_I2CS_ID_ADDRESS_WRITE_KEY_POS 8
189 #define ADPD188_I2CS_ID_SLAVE_ADDRESS_POS 1
192 #define ADPD188_CLK_RATIO_CLK_RATIO_MASK 0x0FFF
193 #define ADPD188_CLK_RATIO_CLK_RATIO_POS 0
196 #define ADPD188_GPIO_CTRL_GPIO1_ALT_CFG_MASK 0x1F00
197 #define ADPD188_GPIO_CTRL_GPIO0_ALT_CFG_MASK 0x001F
198 #define ADPD188_GPIO_CTRL_GPIO1_ALT_CFG_POS 8
199 #define ADPD188_GPIO_CTRL_GPIO0_ALT_CFG_POS 0
202 #define ADPD188_SW_RESET_SW_RESET_MASK 0x0001
203 #define ADPD188_SW_RESET_SW_RESET_POS 0
206 #define ADPD188_MODE_MODE_MASK 0x0003
207 #define ADPD188_MODE_MODE_POS 0
210 #define ADPD188_SLOT_EN_RDOUT_MODE_MASK 0x2000
211 #define ADPD188_SLOT_EN_FIFO_OVRN_PREVENT_MASK 0x1000
212 #define ADPD188_SLOT_EN_SLOTB_FIFO_MODE_MASK 0x01C0
213 #define ADPD188_SLOT_EN_SLOTB_EN_MASK 0x0020
214 #define ADPD188_SLOT_EN_SLOTA_FIFO_MODE_MASK 0x001C
215 #define ADPD188_SLOT_EN_SLOTA_EN_MASK 0x0001
216 #define ADPD188_SLOT_EN_RDOUT_MODE_POS 13
217 #define ADPD188_SLOT_EN_FIFO_OVRN_PREVENT_POS 12
218 #define ADPD188_SLOT_EN_SLOTB_FIFO_MODE_POS 6
219 #define ADPD188_SLOT_EN_SLOTB_EN_POS 5
220 #define ADPD188_SLOT_EN_SLOTA_FIFO_MODE_POS 2
221 #define ADPD188_SLOT_EN_SLOTA_EN_POS 0
224 #define ADPD188_PD_LED_SELECT_SLOTB_PD_SEL_MASK 0x0F00
225 #define ADPD188_PD_LED_SELECT_SLOTA_PD_SEL_MASK 0x00F0
226 #define ADPD188_PD_LED_SELECT_SLOTB_LED_SEL_MASK 0x000C
227 #define ADPD188_PD_LED_SELECT_SLOTA_LED_SEL_MASK 0x0003
228 #define ADPD188_PD_LED_SELECT_SLOTB_PD_SEL_POS 8
229 #define ADPD188_PD_LED_SELECT_SLOTA_PD_SEL_POS 4
230 #define ADPD188_PD_LED_SELECT_SLOTB_LED_SEL_POS 2
231 #define ADPD188_PD_LED_SELECT_SLOTA_LED_SEL_POS 0
234 #define ADPD188_NUM_AVG_SLOTB_NUM_AVG_MASK 0x0700
235 #define ADPD188_NUM_AVG_SLOTA_NUM_AVG_MASK 0x0070
236 #define ADPD188_NUM_AVG_SLOTB_NUM_AVG_POS 8
237 #define ADPD188_NUM_AVG_SLOTA_NUM_AVG_POS 4
240 #define ADPD188_BG_MEAS_A_BG_COUNT_A_MASK 0xC000
241 #define ADPD188_BG_MEAS_A_BG_THRESH_A_MASK 0x3FFF
242 #define ADPD188_BG_MEAS_A_BG_COUNT_A_POS 14
243 #define ADPD188_BG_MEAS_A_BG_THRESH_A_POS 0
246 #define ADPD188_INT_SEQ_A_INTEG_ORDER_A_MASK 0x000F
247 #define ADPD188_INT_SEQ_A_INTEG_ORDER_A_POS 0
250 #define ADPD188_BG_MEAS_B_BG_COUNT_B_MASK 0xC000
251 #define ADPD188_BG_MEAS_B_BG_THRESH_B_MASK 0x3FFF
252 #define ADPD188_BG_MEAS_B_BG_COUNT_B_POS 14
253 #define ADPD188_BG_MEAS_B_BG_THRESH_B_POS 0
256 #define ADPD188_INT_SEQ_B_INTEG_ORDER_B_MASK 0x000F
257 #define ADPD188_INT_SEQ_B_INTEG_ORDER_B_POS 0
260 #define ADPD188_ILED3_COARSE_ILED3_SCALE_MASK 0x2000
261 #define ADPD188_ILED3_COARSE_ILED3_SLEW_MASK 0x0070
262 #define ADPD188_ILED3_COARSE_ILED3_COARSE_MASK 0x000F
263 #define ADPD188_ILED3_COARSE_ILED3_SCALE_POS 13
264 #define ADPD188_ILED3_COARSE_ILED3_SLEW_POS 4
265 #define ADPD188_ILED3_COARSE_ILED3_COARSE_POS 0
268 #define ADPD188_ILED1_COARSE_ILED1_SCALE_MASK 0x2000
269 #define ADPD188_ILED1_COARSE_ILED1_SLEW_MASK 0x0070
270 #define ADPD188_ILED1_COARSE_ILED1_COARSE_MASK 0x000F
271 #define ADPD188_ILED1_COARSE_ILED1_SCALE_POS 13
272 #define ADPD188_ILED1_COARSE_ILED1_SLEW_POS 4
273 #define ADPD188_ILED1_COARSE_ILED1_COARSE_POS 0
276 #define ADPD188_ILED2_COARSE_ILED2_SCALE_MASK 0x2000
277 #define ADPD188_ILED2_COARSE_ILED2_SLEW_MASK 0x0070
278 #define ADPD188_ILED2_COARSE_ILED2_COARSE_MASK 0x000F
279 #define ADPD188_ILED2_COARSE_ILED2_SCALE_POS 13
280 #define ADPD188_ILED2_COARSE_ILED2_SLEW_POS 4
281 #define ADPD188_ILED2_COARSE_ILED2_COARSE_POS 0
284 #define ADPD188_ILED_FINE_ILED3_FINE_MASK 0xF800
285 #define ADPD188_ILED_FINE_ILED2_FINE_MASK 0x07C0
286 #define ADPD188_ILED_FINE_ILED1_FINE_MASK 0x001F
287 #define ADPD188_ILED_FINE_ILED3_FINE_POS 11
288 #define ADPD188_ILED_FINE_ILED2_FINE_POS 6
289 #define ADPD188_ILED_FINE_ILED1_FINE_POS 0
292 #define ADPD188_SLOTA_LED_PULSE_SLOTA_LED_WIDTH_MASK 0x1F00
293 #define ADPD188_SLOTA_LED_PULSE_SLOTA_LED_OFFSET_MASK 0x00FF
294 #define ADPD188_SLOTA_LED_PULSE_SLOTA_LED_WIDTH_POS 8
295 #define ADPD188_SLOTA_LED_PULSE_SLOTA_LED_OFFSET_POS 0
298 #define ADPD188_SLOTA_NUMPULSES_SLOTA_PULSES_MASK 0xFF00
299 #define ADPD188_SLOTA_NUMPULSES_SLOTA_PERIOD_MASK 0x00FF
300 #define ADPD188_SLOTA_NUMPULSES_SLOTA_PULSES_POS 8
301 #define ADPD188_SLOTA_NUMPULSES_SLOTA_PERIOD_POS 0
304 #define ADPD188_LED_DISABLE_SLOTB_LED_DIS_MASK 0x0200
305 #define ADPD188_LED_DISABLE_SLOTA_LED_DIS_MASK 0x0100
306 #define ADPD188_LED_DISABLE_SLOTB_LED_DIS_POS 9
307 #define ADPD188_LED_DISABLE_SLOTA_LED_DIS_POS 8
310 #define ADPD188_SLOTB_LED_PULSE_SLOTB_LED_WIDTH_MASK 0x1F00
311 #define ADPD188_SLOTB_LED_PULSE_SLOTB_LED_OFFSET_MASK 0x00FF
312 #define ADPD188_SLOTB_LED_PULSE_SLOTB_LED_WIDTH_POS 8
313 #define ADPD188_SLOTB_LED_PULSE_SLOTB_LED_OFFSET_POS 0
316 #define ADPD188_SLOTB_NUMPULSES_SLOTB_PULSES_MASK 0xFF00
317 #define ADPD188_SLOTB_NUMPULSES_SLOTB_PERIOD_MASK 0x00FF
318 #define ADPD188_SLOTB_NUMPULSES_SLOTB_PULSES_POS 8
319 #define ADPD188_SLOTB_NUMPULSES_SLOTB_PERIOD_POS 0
322 #define ADPD188_ALT_PWR_DN_CH34_DISABLE_MASK 0xE000
323 #define ADPD188_ALT_PWR_DN_CH2_DISABLE_MASK 0x1C00
324 #define ADPD188_ALT_PWR_DN_SLOTB_PERIOD_MASK 0x0300
325 #define ADPD188_ALT_PWR_DN_SLOTA_PERIOD_MASK 0x0003
326 #define ADPD188_ALT_PWR_DN_CH34_DISABLE_POS 13
327 #define ADPD188_ALT_PWR_DN_CH2_DISABLE_POS 10
328 #define ADPD188_ALT_PWR_DN_SLOTB_PERIOD_POS 8
329 #define ADPD188_ALT_PWR_DN_SLOTA_PERIOD_POS 0
332 #define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_WIDTH_MASK 0xF800
333 #define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_OFFSET_MASK 0x07FF
334 #define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_WIDTH_POS 11
335 #define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_OFFSET_POS 0
338 #define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_WIDTH_MASK 0xF800
339 #define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_OFFSET_MASK 0x07FF
340 #define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_WIDTH_POS 11
341 #define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_OFFSET_POS 0
344 #define ADPD188_AFE_PWR_CFG1_V_CATHODE_MASK 0x0200
345 #define ADPD188_AFE_PWR_CFG1_AFE_POWERDOWN_MASK 0x01F8
346 #define ADPD188_AFE_PWR_CFG1_V_CATHODE_POS 9
347 #define ADPD188_AFE_PWR_CFG1_AFE_POWERDOWN_POS 3
350 #define ADPD188_SLOTA_FLOAT_LED_FLT_LED_SELECT_A_MASK 0xC000
351 #define ADPD188_SLOTA_FLOAT_LED_FLT_LED_WIDTH_A_MASK 0x1F00
352 #define ADPD188_SLOTA_FLOAT_LED_FLT_LED_OFFSET_A_MASK 0x00FF
353 #define ADPD188_SLOTA_FLOAT_LED_FLT_LED_SELECT_A_POS 14
354 #define ADPD188_SLOTA_FLOAT_LED_FLT_LED_WIDTH_A_POS 8
355 #define ADPD188_SLOTA_FLOAT_LED_FLT_LED_OFFSET_A_POS 0
358 #define ADPD188_SLOTB_FLOAT_LED_FLT_LED_SELECT_B_MASK 0xC000
359 #define ADPD188_SLOTB_FLOAT_LED_FLT_LED_WIDTH_B_MASK 0x1F00
360 #define ADPD188_SLOTB_FLOAT_LED_FLT_LED_OFFSET_B_MASK 0x00FF
361 #define ADPD188_SLOTB_FLOAT_LED_FLT_LED_SELECT_B_POS 14
362 #define ADPD188_SLOTB_FLOAT_LED_FLT_LED_WIDTH_B_POS 8
363 #define ADPD188_SLOTB_FLOAT_LED_FLT_LED_OFFSET_B_POS 0
367 #define ADPD188_SLOTA_TIA_CFG_SLOTA_BUF_GAIN_MASK 0x0200
368 #define ADPD188_SLOTA_TIA_CFG_SLOTA_BUF_GAIN_POS 9
370 #define ADPD108X_SLOTA_TIA_CFG_SLOTA_BUF_GAIN_MASK 0x0300
371 #define ADPD108X_SLOTA_TIA_CFG_SLOTA_INT_GAIN_POS 8
373 #define ADPD188_SLOTA_TIA_CFG_SLOTA_AFE_MODE_MASK 0xFC00
374 #define ADPD188_SLOTA_TIA_CFG_SLOTA_INT_AS_BUF_MASK 0x0080
375 #define ADPD188_SLOTA_TIA_CFG_SLOTA_TIA_IND_EN_MASK 0x0040
376 #define ADPD188_SLOTA_TIA_CFG_SLOTA_TIA_VREF_MASK 0x0030
377 #define ADPD188_SLOTA_TIA_CFG_SLOTA_TIA_GAIN_MASK 0x0003
378 #define ADPD188_SLOTA_TIA_CFG_SLOTA_AFE_MODE_POS 10
379 #define ADPD188_SLOTA_TIA_CFG_SLOTA_INT_AS_BUF_POS 7
380 #define ADPD188_SLOTA_TIA_CFG_SLOTA_TIA_IND_EN_POS 6
381 #define ADPD188_SLOTA_TIA_CFG_SLOTA_TIA_VREF_POS 4
382 #define ADPD188_SLOTA_TIA_CFG_SLOTA_TIA_GAIN_POS 0
386 #define ADPD188_SLOTB_TIA_CFG_SLOTA_BUF_GAIN_MASK 0x0200
387 #define ADPD188_SLOTB_TIA_CFG_SLOTA_BUF_GAIN_POS 9
389 #define ADPD108X_SLOTB_TIA_CFG_SLOTA_BUF_GAIN_MASK 0x0300
390 #define ADPD108X_SLOTB_TIA_CFG_SLOTA_INT_GAIN_POS 8
392 #define ADPD188_SLOTB_TIA_CFG_SLOTB_AFE_MODE_MASK 0xFC00
393 #define ADPD188_SLOTB_TIA_CFG_SLOTB_INT_AS_BUF_MASK 0x0080
394 #define ADPD188_SLOTB_TIA_CFG_SLOTB_TIA_IND_EN_MASK 0x0040
395 #define ADPD188_SLOTB_TIA_CFG_SLOTB_TIA_VREF_MASK 0x0030
396 #define ADPD188_SLOTB_TIA_CFG_SLOTB_TIA_GAIN_MASK 0x0003
397 #define ADPD188_SLOTB_TIA_CFG_SLOTB_AFE_MODE_POS 10
398 #define ADPD188_SLOTB_TIA_CFG_SLOTB_INT_AS_BUF_POS 7
399 #define ADPD188_SLOTB_TIA_CFG_SLOTB_TIA_IND_EN_POS 6
400 #define ADPD188_SLOTB_TIA_CFG_SLOTB_TIA_VREF_POS 4
401 #define ADPD188_SLOTB_TIA_CFG_SLOTB_TIA_GAIN_POS 0
404 #define ADPD188_SAMPLE_CLK_CLK32K_BYP_MASK 0x0100
405 #define ADPD188_SAMPLE_CLK_CLK32K_EN_MASK 0x0080
406 #define ADPD188_SAMPLE_CLK_CLK32K_ADJUST_MASK 0x003F
407 #define ADPD188_SAMPLE_CLK_CLK32K_BYP_POS 8
408 #define ADPD188_SAMPLE_CLK_CLK32K_EN_POS 7
409 #define ADPD188_SAMPLE_CLK_CLK32K_ADJUST_POS 0
412 #define ADPD188_CLK32M_ADJUST_CLK32M_ADJUST_MASK 0x00FF
413 #define ADPD188_CLK32M_ADJUST_CLK32M_ADJUST_POS 0
416 #define ADPD188_EXT_SYNC_SEL_GPIO1_OE_MASK 0x0040
417 #define ADPD188_EXT_SYNC_SEL_GPIO1_IE_MASK 0x0020
418 #define ADPD188_EXT_SYNC_SEL_EXT_SYNC_SEL_MASK 0x000C
419 #define ADPD188_EXT_SYNC_SEL_GPIO0_IE_MASK 0x0002
420 #define ADPD188_EXT_SYNC_SEL_GPIO1_OE_POS 6
421 #define ADPD188_EXT_SYNC_SEL_GPIO1_IE_POS 5
422 #define ADPD188_EXT_SYNC_SEL_EXT_SYNC_SEL_POS 2
423 #define ADPD188_EXT_SYNC_SEL_GPIO0_IE_POS 1
426 #define ADPD188_CLK32M_CAL_EN_GPIO1_CTRL_MASK 0x0040
427 #define ADPD188_CLK32M_CAL_EN_CLK32M_CAL_EN_MASK 0x0020
428 #define ADPD188_CLK32M_CAL_EN_GPIO1_CTRL_POS 6
429 #define ADPD188_CLK32M_CAL_EN_CLK32M_CAL_EN_POS 5
432 #define ADPD188_AFE_PWR_CFG2_SLEEP_V_CATHODE_MASK 0x3000
433 #define ADPD188_AFE_PWR_CFG2_SLOTB_V_CATHODE_MASK 0x0C00
434 #define ADPD188_AFE_PWR_CFG2_SLOTA_V_CATHODE_MASK 0x0300
435 #define ADPD188_AFE_PWR_CFG2_REG54_VCAT_ENABLE_MASK 0x0080
436 #define ADPD188_AFE_PWR_CFG2_SLEEP_V_CATHODE_POS 12
437 #define ADPD188_AFE_PWR_CFG2_SLOTB_V_CATHODE_POS 10
438 #define ADPD188_AFE_PWR_CFG2_SLOTA_V_CATHODE_POS 8
439 #define ADPD188_AFE_PWR_CFG2_REG54_VCAT_ENABLE_POS 7
442 #define ADPD188_TIA_INDEP_GAIN_SLOTB_TIA_GAIN_4_MASK 0x0C00
443 #define ADPD188_TIA_INDEP_GAIN_SLOTB_TIA_GAIN_3_MASK 0x0300
444 #define ADPD188_TIA_INDEP_GAIN_SLOTB_TIA_GAIN_2_MASK 0x00C0
445 #define ADPD188_TIA_INDEP_GAIN_SLOTA_TIA_GAIN_4_MASK 0x0030
446 #define ADPD188_TIA_INDEP_GAIN_SLOTA_TIA_GAIN_3_MASK 0x000C
447 #define ADPD188_TIA_INDEP_GAIN_SLOTA_TIA_GAIN_2_MASK 0x0003
448 #define ADPD188_TIA_INDEP_GAIN_SLOTB_TIA_GAIN_4_POS 10
449 #define ADPD188_TIA_INDEP_GAIN_SLOTB_TIA_GAIN_3_POS 8
450 #define ADPD188_TIA_INDEP_GAIN_SLOTB_TIA_GAIN_2_POS 6
451 #define ADPD188_TIA_INDEP_GAIN_SLOTA_TIA_GAIN_4_POS 4
452 #define ADPD188_TIA_INDEP_GAIN_SLOTA_TIA_GAIN_3_POS 2
453 #define ADPD188_TIA_INDEP_GAIN_SLOTA_TIA_GAIN_2_POS 0
456 #define ADPD188_MATH_FLT_MATH34_B_MASK 0x0C00
457 #define ADPD188_MATH_FLT_MATH34_A_MASK 0x0300
458 #define ADPD188_MATH_ENA_INT_AS_BUF_MASK 0x0080
459 #define ADPD188_MATH_FLT_MATH12_B_MASK 0x0060
460 #define ADPD188_MATH_FLT_MATH12_A_MASK 0x0006
461 #define ADPD188_MATH_FLT_MATH34_B_POS 10
462 #define ADPD188_MATH_FLT_MATH34_A_POS 8
463 #define ADPD188_MATH_ENA_INT_AS_BUF_POS 7
464 #define ADPD188_MATH_FLT_MATH12_B_POS 5
465 #define ADPD188_MATH_FLT_MATH12_A_POS 1
468 #define ADPD188_FLT_CONFIG_B_FLT_EN_B_MASK 0x6000
469 #define ADPD188_FLT_CONFIG_B_FLT_PRECON_B_MASK 0x1F00
470 #define ADPD188_FLT_CONFIG_B_FLT_EN_B_POS 13
471 #define ADPD188_FLT_CONFIG_B_FLT_PRECON_B_POS 8
474 #define ADPD188_FLT_LED_FIRE_FLT_LED_FIRE_B_MASK 0xF000
475 #define ADPD188_FLT_LED_FIRE_FLT_LED_FIRE_A_MASK 0x0F00
476 #define ADPD188_FLT_LED_FIRE_FLT_LED_FIRE_B_POS 12
477 #define ADPD188_FLT_LED_FIRE_FLT_LED_FIRE_A_POS 8
480 #define ADPD188_FLT_CONFIG_A_FLT_EN_A_MASK 0x6000
481 #define ADPD188_FLT_CONFIG_A_FLT_PRECON_A_MASK 0x1F00
482 #define ADPD188_FLT_CONFIG_A_FLT_EN_A_POS 13
483 #define ADPD188_FLT_CONFIG_A_FLT_PRECON_A_POS 8
486 #define ADPD188_DATA_ACCESS_CTL_SLOTB_DATA_HOLD_MASK 0x0004
487 #define ADPD188_DATA_ACCESS_CTL_SLOTA_DATA_HOLD_MASK 0x0002
488 #define ADPD188_DATA_ACCESS_CTL_DIGITAL_CLOCK_ENA_MASK 0x0001
489 #define ADPD188_DATA_ACCESS_CTL_SLOTB_DATA_HOLD_POS 2
490 #define ADPD188_DATA_ACCESS_CTL_SLOTA_DATA_HOLD_POS 1
491 #define ADPD188_DATA_ACCESS_CTL_DIGITAL_CLOCK_ENA_POS 0
adpd188_interrupt
Interrupt flags of the ADPD188.
Definition: adpd188.h:547
@ ADPD188_SPI
Definition: adpd188.h:525
#define ADPD188_DEVICE_ID
Definition: adpd188.h:181
@ ADPD188_OUT_LOW
Definition: adpd188.h:603
struct no_os_gpio_desc * gpio0
Definition: adpd188.h:663
#define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_WIDTH_MASK
Definition: adpd188.h:332
#define ADPD188_PD_LED_SELECT_SLOTB_PD_SEL_MASK
Definition: adpd188.h:224
int32_t adpd188_adc_fsample_set(struct adpd188_dev *dev, uint16_t freq_hz)
Set sample frequency of the ADC.
Definition: adpd188.c:625
#define ADPD188_REG_DATA_ACCESS_CTL
Definition: adpd188.h:109
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
#define ADPD188_FIFO_THRESH_FIFO_THRESH_POS
Definition: adpd188.h:172
#define ADPD188_INT_MASK_FIFO_INT_MASK_MASK
Definition: adpd188.h:145
#define ADPD188_REG_NUM_AVG
Definition: adpd188.h:66
int32_t adpd188_gpio_alt_setup(struct adpd188_dev *dev, uint8_t gpio_id, enum adpd188_gpio_alt_config config)
Setup the GPIO source.
Definition: adpd188.c:485
adpd188_mode
ADPD188 operation modes.
Definition: adpd188.h:534
#define ADPD188_STATUS_FIFO_SAMPLES_MASK
Definition: adpd188.h:137
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Write data to slave device.
Definition: no_os_i2c.c:159
int32_t adpd188_adc_fsample_set(struct adpd188_dev *dev, uint16_t freq_hz)
Set sample frequency of the ADC.
Definition: adpd188.c:625
#define ADPD188_SLOTB_NUMPULSES_SLOTB_PULSES_MASK
Definition: adpd188.h:316
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: no_os_i2c.c:52
@ ADPD188_SLOTA_PULSE
Definition: adpd188.h:586
int32_t adpd188_interrupt_clear(struct adpd188_dev *dev, uint8_t flags)
Clear the slot and FIFO interrupt flags.
Definition: adpd188.c:378
int32_t adpd188_fifo_clear(struct adpd188_dev *dev)
Empty the FIFO.
Definition: adpd188.c:296
#define ADPD188_GPIO_CTRL_GPIO0_ALT_CFG_POS
Definition: adpd188.h:199
#define ADPD188_ILED3_COARSE_ILED3_COARSE_POS
Definition: adpd188.h:265
#define ADPD188_REG_FSAMPLE
Definition: adpd188.h:64
int32_t adpd188_mode_get(struct adpd188_dev *dev, enum adpd188_mode *mode)
Get the mode of operation of the ADPD188.
Definition: adpd188.c:238
@ ADPD188_FIFO_INT
Definition: adpd188.h:553
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
int32_t adpd188_interrupt_en(struct adpd188_dev *dev, uint8_t flags)
Enable the slot and FIFO interrupt flags.
Definition: adpd188.c:418
@ ADPD188_ANYSLOT_PULSE
Definition: adpd188.h:590
#define ADPD188_REG_ILED3_COARSE
Definition: adpd188.h:79
#define ADPD188_PD_LED_SELECT_SLOTA_LED_SEL_MASK
Definition: adpd188.h:227
int32_t adpd188_mode_set(struct adpd188_dev *dev, enum adpd188_mode new_mode)
Set the mode of operation of the ADPD188.
Definition: adpd188.c:261
int32_t adpd188_init(struct adpd188_dev **device, struct adpd188_init_param *init_param)
Initialize the ADPD188 driver.
Definition: adpd188.c:55
@ ADPD188_NORMAL
Definition: adpd188.h:540
@ ADPD188_ANYSLOT_OUT
Definition: adpd188.h:596
int32_t adpd188_slot_setup(struct adpd188_dev *dev, struct adpd188_slot_config config)
Enable slot and setup its FIFO interaction.
Definition: adpd188.c:588
Header file of SPI Interface.
#define ADPD188_REG_MATH
Definition: adpd188.h:105
#define ADPD188_GPIO_CTRL_GPIO1_ALT_CFG_POS
Definition: adpd188.h:198
enum adpd_supported_devices device
Definition: adpd188.h:657
ADPD188 driver header file.
#define ADPD188_FIFO_THRESH_FIFO_THRESH_MASK
Definition: adpd188.h:171
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: no_os_i2c.c:113
@ ADPD188_SLOTB_OUT
Definition: adpd188.h:594
int32_t adpd188_fifo_thresh_set(struct adpd188_dev *dev, uint8_t word_no)
Set the number of 16 bit words that need to be in the FIFO to trigger an interrupt.
Definition: adpd188.c:319
#define ADPD188_MATH_FLT_MATH12_A_POS
Definition: adpd188.h:465
@ ADPD188_32BIT_4CHAN
Definition: adpd188.h:635
#define ADPD188_REG_INT_MASK
Definition: adpd188.h:52
#define ADPD188_REG_DEVID
Definition: adpd188.h:56
adpd_supported_devices
Devices supported by the driver.
Definition: adpd188.h:501
uint8_t gpio_pol
Definition: adpd188.h:564
#define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_WIDTH_MASK
Definition: adpd188.h:338
Header file of Delay functions.
#define ADPD188_MODE_MODE_MASK
Definition: adpd188.h:206
@ ADPD188_PROGRAM
Definition: adpd188.h:538
union adpd188_phy_init phy_init
Definition: adpd188.h:678
#define ADPD188_MATH_FLT_MATH12_A_MASK
Definition: adpd188.h:460
#define ADPD188_AFE_PWR_CFG1_AFE_POWERDOWN_POS
Definition: adpd188.h:347
int32_t adpd188_smoke_detect_setup(struct adpd188_dev *dev)
Do initial configuration of the device to use as a smoke detector. The configuration is described in ...
Definition: adpd188.c:662
@ ADPD188_SLOTB_INT
Definition: adpd188.h:551
Definition: ad9361_util.h:69
enum adpd188_phy_opt phy_opt
Definition: adpd188.h:676
#define ADPD188_SLOT_EN_SLOTB_EN_POS
Definition: adpd188.h:219
#define ADPD188_REG_INT_SEQ_B
Definition: adpd188.h:74
enum adpd188_slots slot_id
Definition: adpd188.h:644
#define ADPD188_ILED3_COARSE_ILED3_COARSE_MASK
Definition: adpd188.h:262
#define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_OFFSET_MASK
Definition: adpd188.h:339
#define ADPD188_MATH_FLT_MATH34_A_POS
Definition: adpd188.h:462
int32_t adpd188_reg_write(struct adpd188_dev *dev, uint8_t reg_addr, uint16_t reg_val)
Write one 16 bit register of the ADPD188.
Definition: adpd188.c:205
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
#define ADPD188_CLK32M_CAL_EN_CLK32M_CAL_EN_MASK
Definition: adpd188.h:427
int32_t adpd188_sw_reset(struct adpd188_dev *dev)
Do software reset of the device.
Definition: adpd188.c:515
int32_t no_os_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: no_os_gpio.c:124
#define ADPD188_REG_SW_RESET
Definition: adpd188.h:61
enum adpd_supported_devices device
Definition: adpd188.h:674
#define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_WIDTH_POS
Definition: adpd188.h:334
@ ADPD188_SLOTA_INT
Definition: adpd188.h:549
#define ADPD188_REG_GPIO_DRV
Definition: adpd188.h:53
int32_t adpd188_adc_fsample_get(struct adpd188_dev *dev, uint16_t *freq_hz)
Get sample frequency of the ADC.
Definition: adpd188.c:643
#define ADPD188_GPIO_CTRL_GPIO1_ALT_CFG_MASK
Definition: adpd188.h:196
int32_t adpd188_interrupt_get(struct adpd188_dev *dev, uint8_t *flags)
Get the slot and FIFO interrupt flags.
Definition: adpd188.c:348
#define ADPD188_GPIO_DRV_GPIO1_DRV_MASK
Definition: adpd188.h:153
#define ADPD188_SLOT_EN_SLOTB_EN_MASK
Definition: adpd188.h:213
@ ADPD188_NO_FIFO
Definition: adpd188.h:627
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
#define ADPD188_SLOT_EN_FIFO_OVRN_PREVENT_MASK
Definition: adpd188.h:211
#define ADPD188_REG_SLOTA_CH3_OFFSET
Definition: adpd188.h:71
#define ADPD188_REG_AFE_PWR_CFG1
Definition: adpd188.h:92
@ ADPD188_I2C
Definition: adpd188.h:527
#define ADPD188_REG_PD_LED_SELECT
Definition: adpd188.h:65
#define ADPD188_STATUS_SLOTB_INT_MASK
Definition: adpd188.h:138
#define ADPD188_PD_LED_SELECT_SLOTA_LED_SEL_POS
Definition: adpd188.h:231
struct no_os_gpio_init_param gpio0_init
Definition: adpd188.h:680
#define ADPD188_AFE_PWR_CFG1_AFE_POWERDOWN_MASK
Definition: adpd188.h:345
enum adpd188_slot_fifo_mode sot_fifo_mode
Definition: adpd188.h:648
int32_t adpd188_mode_get(struct adpd188_dev *dev, enum adpd188_mode *mode)
Get the mode of operation of the ADPD188.
Definition: adpd188.c:238
@ ADPD188_32BIT_SUM
Definition: adpd188.h:631
int32_t adpd188_reg_write(struct adpd188_dev *dev, uint8_t reg_addr, uint16_t reg_val)
Write one 16 bit register of the ADPD188.
Definition: adpd188.c:205
#define ADPD188_REG_SLOTB_NUMPULSES
Definition: adpd188.h:87
#define ADPD188_SLOT_EN_SLOTA_EN_POS
Definition: adpd188.h:221
#define ADPD188_PD_LED_SELECT_SLOTA_PD_SEL_POS
Definition: adpd188.h:229
#define ADPD188_REG_GPIO_CTRL
Definition: adpd188.h:59
@ ADPD188_OUT_HIGH
Definition: adpd188.h:605
@ ADPD1081
Definition: adpd188.h:504
@ ADPD188_STANDBY
Definition: adpd188.h:536
adpd188_slot_fifo_mode
The way a time slot stores data in the FIFO.
Definition: adpd188.h:625
#define ADPD188_REG_FIFO_THRESH
Definition: adpd188.h:55
#define ADPD188_SLOTA_NUMPULSES_SLOTA_PERIOD_POS
Definition: adpd188.h:301
#define ADPD188_ILED3_COARSE_ILED3_SCALE_MASK
Definition: adpd188.h:260
#define ADPD188_REG_SLOTA_CH4_OFFSET
Definition: adpd188.h:72
@ ADPD188_32KHZ_OSC
Definition: adpd188.h:607
@ ADPD188_SLOTB_PULSE
Definition: adpd188.h:588
int32_t adpd188_reg_read(struct adpd188_dev *dev, uint8_t reg_addr, uint16_t *reg_val)
Read one 16 bit register of the ADPD188.
Definition: adpd188.c:167
#define ADPD188_SLOTB_NUMPULSES_SLOTB_PULSES_POS
Definition: adpd188.h:318
@ ADPD188_ACTIVE_PULSE
Definition: adpd188.h:584
@ ADPD188_16BIT_SUM
Definition: adpd188.h:629
#define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_OFFSET_POS
Definition: adpd188.h:341
#define ADPD188_REG_SLOTA_NUMPULSES
Definition: adpd188.h:84
Slot configuration initialization structure.
Definition: adpd188.h:642
bool slot_en
Definition: adpd188.h:646
int32_t adpd188_reg_read(struct adpd188_dev *dev, uint8_t reg_addr, uint16_t *reg_val)
Read one 16 bit register of the ADPD188.
Definition: adpd188.c:167
#define ADPD188_GPIO_DRV_GPIO0_POL_MASK
Definition: adpd188.h:157
#define ADPD188_STATUS_FIFO_SAMPLES_POS
Definition: adpd188.h:140
int32_t adpd188_mode_set(struct adpd188_dev *dev, enum adpd188_mode new_mode)
Set the mode of operation of the ADPD188.
Definition: adpd188.c:261
#define ADPD188_PD_LED_SELECT_SLOTB_LED_SEL_MASK
Definition: adpd188.h:226
#define ADPD188_GPIO_DRV_GPIO0_ENA_MASK
Definition: adpd188.h:155
#define ADPD188_REG_CLK32M_ADJUST
Definition: adpd188.h:100
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
int32_t adpd188_smoke_detect_setup(struct adpd188_dev *dev)
Do initial configuration of the device to use as a smoke detector. The configuration is described in ...
Definition: adpd188.c:662
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
int32_t adpd188_fifo_thresh_set(struct adpd188_dev *dev, uint8_t word_no)
Set the number of 16 bit words that need to be in the FIFO to trigger an interrupt.
Definition: adpd188.c:319
int32_t adpd188_fifo_clear(struct adpd188_dev *dev)
Empty the FIFO.
Definition: adpd188.c:296
adpd188_phy_opt
Types of physical communication protocol.
Definition: adpd188.h:523
@ ADPD188_SLOTB
Definition: adpd188.h:618
struct no_os_i2c_init_param i2c_phy
Definition: adpd188.h:514
int32_t adpd188_remove(struct adpd188_dev *dev)
Free resources allocated by adpd188_init().
Definition: adpd188.c:135
int32_t adpd188_clk32mhz_cal(struct adpd188_dev *dev)
Do internal 32MHz clock calibration. This calibration requires the 32kHz clock to be calibrated first...
Definition: adpd188.c:527
#define ADPD188_INT_MASK_SLOTA_INT_MASK_MASK
Definition: adpd188.h:147
#define ADPD188_REG_SLOTB_CH4_OFFSET
Definition: adpd188.h:78
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
#define ADPD188_FIFO_THRESH_MAX_THRESHOLD
Definition: adpd188.h:173
int32_t adpd188_sw_reset(struct adpd188_dev *dev)
Do software reset of the device.
Definition: adpd188.c:515
struct no_os_spi_init_param spi_phy
Definition: adpd188.h:516
#define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_WIDTH_POS
Definition: adpd188.h:340
#define ADPD188_SLOT_EN_SLOTA_FIFO_MODE_POS
Definition: adpd188.h:220
int32_t adpd188_remove(struct adpd188_dev *dev)
Free resources allocated by adpd188_init().
Definition: adpd188.c:135
int32_t adpd188_interrupt_en(struct adpd188_dev *dev, uint8_t flags)
Enable the slot and FIFO interrupt flags.
Definition: adpd188.c:418
int32_t adpd188_gpio_setup(struct adpd188_dev *dev, struct adpd188_gpio_config config)
Setup drive and polarity of the GPIOs. Also enable GPIO if necessary.
Definition: adpd188.c:442
@ ADPD1080
Definition: adpd188.h:503
#define ADPD188_GPIO_DRV_GPIO0_DRV_MASK
Definition: adpd188.h:156
#define ADPD188_ILED1_COARSE_ILED1_SLEW_POS
Definition: adpd188.h:272
Communication physical protocol initialization structure. Can be I2C or SPI.
Definition: adpd188.h:512
#define ADPD188_REG_SLOTA_CH2_OFFSET
Definition: adpd188.h:70
int32_t adpd188_adc_fsample_get(struct adpd188_dev *dev, uint16_t *freq_hz)
Get sample frequency of the ADC.
Definition: adpd188.c:643
#define ADPD188_CLK_RATIO_CLK_RATIO_MASK
Definition: adpd188.h:192
int32_t adpd188_clk32mhz_cal(struct adpd188_dev *dev)
Do internal 32MHz clock calibration. This calibration requires the 32kHz clock to be calibrated first...
Definition: adpd188.c:527
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
#define ADPD188_CLK32M_ADJUST_CLK32M_ADJUST_MASK
Definition: adpd188.h:412
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:49
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Read data from slave device.
Definition: no_os_i2c.c:190
int32_t adpd188_gpio_alt_setup(struct adpd188_dev *dev, uint8_t gpio_id, enum adpd188_gpio_alt_config config)
Setup the GPIO source.
Definition: adpd188.c:485
#define ADPD188_MATH_FLT_MATH12_B_MASK
Definition: adpd188.h:459
int32_t adpd188_fifo_status_get(struct adpd188_dev *dev, uint8_t *bytes_no)
Get the number of bytes currently present in FIFO.
Definition: adpd188.c:276
Header file of I2C Interface.
adpd188_slots
ADPD188 time slots.
Definition: adpd188.h:614
#define ADPD188_REG_STATUS
Definition: adpd188.h:51
Driver initialization structure.
Definition: adpd188.h:672
@ ADPD188_SLOTA_OUT
Definition: adpd188.h:592
#define ADPD188_REG_MODE
Definition: adpd188.h:62
@ ADPD188BI
Definition: adpd188.h:502
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
GPIO level configuration.
Definition: adpd188.h:560
#define ADPD188_SLOTA_NUMPULSES_SLOTA_PULSES_POS
Definition: adpd188.h:300
#define ADPD188_REG_SLOTB_CH1_OFFSET
Definition: adpd188.h:75
#define ADPD188_SLOT_EN_SLOTA_FIFO_MODE_MASK
Definition: adpd188.h:214
int32_t adpd188_fifo_status_get(struct adpd188_dev *dev, uint8_t *bytes_no)
Get the number of bytes currently present in FIFO.
Definition: adpd188.c:276
int32_t adpd188_slot_setup(struct adpd188_dev *dev, struct adpd188_slot_config config)
Enable slot and setup its FIFO interaction.
Definition: adpd188.c:588
#define ADPD188_MATH_FLT_MATH34_B_MASK
Definition: adpd188.h:456
@ ADPD188_INT_FUNC
Definition: adpd188.h:579
#define ADPD188_GPIO_CTRL_GPIO0_ALT_CFG_MASK
Definition: adpd188.h:197
#define ADPD188_SLOTB_NUMPULSES_SLOTB_PERIOD_MASK
Definition: adpd188.h:317
#define ADPD188_PD_LED_SELECT_SLOTB_PD_SEL_POS
Definition: adpd188.h:228
void * phy_desc
Definition: adpd188.h:661
int32_t adpd188_interrupt_get(struct adpd188_dev *dev, uint8_t *flags)
Get the slot and FIFO interrupt flags.
Definition: adpd188.c:348
#define ADPD188_REG_SLOTB_AFE_WINDOW
Definition: adpd188.h:91
#define ADPD188_SLOT_EN_SLOTA_EN_MASK
Definition: adpd188.h:215
struct no_os_gpio_init_param gpio1_init
Definition: adpd188.h:682
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
#define ADPD188_INT_MASK_SLOTB_INT_MASK_MASK
Definition: adpd188.h:146
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define ADPD188_REG_SLOT_EN
Definition: adpd188.h:63
#define ADPD188_MATH_FLT_MATH34_A_MASK
Definition: adpd188.h:457
uint8_t gpio_drv
Definition: adpd188.h:566
#define ADPD188_ILED3_COARSE_ILED3_SLEW_MASK
Definition: adpd188.h:261
#define ADPD188_DATA_ACCESS_CTL_DIGITAL_CLOCK_ENA_MASK
Definition: adpd188.h:488
#define ADPD188_ILED1_COARSE_ILED1_SLEW_MASK
Definition: adpd188.h:269
@ ADPD188_HALF_SAMPLING
Definition: adpd188.h:601
#define ADPD188_REG_INT_SEQ_A
Definition: adpd188.h:68
#define ADPD188_MATH_FLT_MATH34_B_POS
Definition: adpd188.h:461
#define ADPD188_REG_SLOTA_AFE_WINDOW
Definition: adpd188.h:90
adpd188_gpio_alt_config
GPIO source configuration.
Definition: adpd188.h:575
@ ADPD188_16BIT_4CHAN
Definition: adpd188.h:633
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
#define ADPD188_INT_SEQ_A_INTEG_ORDER_A_MASK
Definition: adpd188.h:246
#define ADPD188_GPIO_DRV_GPIO1_POL_MASK
Definition: adpd188.h:154
#define ADPD188_SLOT_EN_SLOTB_FIFO_MODE_POS
Definition: adpd188.h:218
Header file of GPIO Interface.
#define ADPD108X_DEVICE_ID
Definition: adpd188.h:183
uint8_t gpio_id
Definition: adpd188.h:562
#define ADPD188_ILED1_COARSE_ILED1_COARSE_MASK
Definition: adpd188.h:270
#define ADPD188_ILED1_COARSE_ILED1_SCALE_MASK
Definition: adpd188.h:268
#define ADPD188_REG_CLK_RATIO
Definition: adpd188.h:58
#define ADPD188_PD_LED_SELECT_SLOTB_LED_SEL_POS
Definition: adpd188.h:230
#define ADPD188_REG_ILED1_COARSE
Definition: adpd188.h:80
uint8_t gpio_en
Definition: adpd188.h:568
#define ADPD188_STATUS_SLOTA_INT_MASK
Definition: adpd188.h:139
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
Driver descriptor structure.
Definition: adpd188.h:655
struct no_os_gpio_desc * gpio1
Definition: adpd188.h:665
#define ADPD188_REG_CLK32M_CAL_EN
Definition: adpd188.h:102
@ ADPD188_SLOTA
Definition: adpd188.h:616
#define ADPD188_REG_SLOTB_CH2_OFFSET
Definition: adpd188.h:76
#define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_OFFSET_POS
Definition: adpd188.h:335
#define ADPD188_REG_SLOTA_CH1_OFFSET
Definition: adpd188.h:69
#define ADPD188_ILED1_COARSE_ILED1_COARSE_POS
Definition: adpd188.h:273
#define ADPD188_PD_LED_SELECT_SLOTA_PD_SEL_MASK
Definition: adpd188.h:225
#define ADPD188_SLOT_EN_SLOTB_FIFO_MODE_MASK
Definition: adpd188.h:212
int32_t adpd188_interrupt_clear(struct adpd188_dev *dev, uint8_t flags)
Clear the slot and FIFO interrupt flags.
Definition: adpd188.c:378
#define ADPD188_INT_SEQ_B_INTEG_ORDER_B_MASK
Definition: adpd188.h:256
@ ADPD188_ADPD103
Definition: adpd188.h:577
#define ADPD188_SLOT_EN_RDOUT_MODE_MASK
Definition: adpd188.h:210
int32_t adpd188_gpio_setup(struct adpd188_dev *dev, struct adpd188_gpio_config config)
Setup drive and polarity of the GPIOs. Also enable GPIO if necessary.
Definition: adpd188.c:442
#define ADPD188_ILED3_COARSE_ILED3_SLEW_POS
Definition: adpd188.h:264
#define ADPD188_SLOTA_NUMPULSES_SLOTA_PERIOD_MASK
Definition: adpd188.h:299
#define ADPD188_SLOTB_NUMPULSES_SLOTB_PERIOD_POS
Definition: adpd188.h:319
#define ADPD188_REG_SLOTB_CH3_OFFSET
Definition: adpd188.h:77
#define ADPD188_MATH_FLT_MATH12_B_POS
Definition: adpd188.h:464
#define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_OFFSET_MASK
Definition: adpd188.h:333
int32_t adpd188_init(struct adpd188_dev **device, struct adpd188_init_param *init_param)
Initialize the ADPD188 driver.
Definition: adpd188.c:55
#define ADPD188_SLOTA_NUMPULSES_SLOTA_PULSES_MASK
Definition: adpd188.h:298
enum adpd188_phy_opt phy_opt
Definition: adpd188.h:659
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140