no-OS
adpd188.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef ADPD188_H_
35 #define ADPD188_H_
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 
41 #include <stdint.h>
42 #include <stdbool.h>
43 #include "no_os_i2c.h"
44 #include "no_os_spi.h"
45 #include "no_os_gpio.h"
46 
47 /******************************************************************************/
48 /********************** Macros and Constants Definitions **********************/
49 /******************************************************************************/
50 
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
135 
136 /* ADPD188_REG_STATUS */
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
143 
144 /* ADPD188_REG_INT_MASK */
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
151 
152 /* ADPD188_REG_GPIO_DRV */
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
163 
164 /* ADPD188_REG_BG_STATUS */
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
169 
170 /* ADPD188_REG_FIFO_THRESH */
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
174 
175 /* ADPD188_REG_DEVID */
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
180 /* ADPD188BI specific */
181 #define ADPD188_DEVICE_ID 0x0916
182 /* ADPD108X specific */
183 #define ADPD108X_DEVICE_ID 0x0A16
184 
185 /* ADPD188_REG_I2CS_ID */
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
190 
191 /* ADPD188_REG_CLK_RATIO */
192 #define ADPD188_CLK_RATIO_CLK_RATIO_MASK 0x0FFF
193 #define ADPD188_CLK_RATIO_CLK_RATIO_POS 0
194 
195 /* ADPD188_REG_GPIO_CTRL */
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
200 
201 /* ADPD188_REG_SW_RESET */
202 #define ADPD188_SW_RESET_SW_RESET_MASK 0x0001
203 #define ADPD188_SW_RESET_SW_RESET_POS 0
204 
205 /* ADPD188_REG_MODE */
206 #define ADPD188_MODE_MODE_MASK 0x0003
207 #define ADPD188_MODE_MODE_POS 0
208 
209 /* ADPD188_REG_SLOT_EN */
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
222 
223 /* ADPD188_REG_PD_LED_SELECT */
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
232 
233 /* ADPD188_REG_NUM_AVG */
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
238 
239 /* ADPD188_REG_BG_MEAS_A */
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
244 
245 /* ADPD188_REG_INT_SEQ_A */
246 #define ADPD188_INT_SEQ_A_INTEG_ORDER_A_MASK 0x000F
247 #define ADPD188_INT_SEQ_A_INTEG_ORDER_A_POS 0
248 
249 /* ADPD188_REG_BG_MEAS_B */
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
254 
255 /* ADPD188_REG_INT_SEQ_B */
256 #define ADPD188_INT_SEQ_B_INTEG_ORDER_B_MASK 0x000F
257 #define ADPD188_INT_SEQ_B_INTEG_ORDER_B_POS 0
258 
259 /* ADPD188_REG_ILED3_COARSE */
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
266 
267 /* ADPD188_REG_ILED1_COARSE */
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
274 
275 /* ADPD188_REG_ILED2_COARSE */
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
282 
283 /* ADPD188_REG_ILED_FINE */
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
290 
291 /* ADPD188_REG_SLOTA_LED_PULSE */
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
296 
297 /* ADPD188_REG_SLOTA_NUMPULSES */
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
302 
303 /* ADPD188_REG_LED_DISABLE */
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
308 
309 /* ADPD188_REG_SLOTB_LED_PULSE */
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
314 
315 /* ADPD188_REG_SLOTB_NUMPULSES */
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
320 
321 /* ADPD188_REG_ALT_PWR_DN */
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
330 
331 /* ADPD188_REG_SLOTA_AFE_WINDOW */
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
336 
337 /* ADPD188_REG_SLOTB_AFE_WINDOW */
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
342 
343 /* ADPD188_REG_AFE_PWR_CFG1 */
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
348 
349 /* ADPD188_REG_SLOTA_FLOAT_LED */
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
356 
357 /* ADPD188_REG_SLOTB_FLOAT_LED */
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
364 
365 /* ADPD188_REG_SLOTA_TIA_CFG */
366 /* ADPD188BI specific registers */
367 #define ADPD188_SLOTA_TIA_CFG_SLOTA_BUF_GAIN_MASK 0x0200
368 #define ADPD188_SLOTA_TIA_CFG_SLOTA_BUF_GAIN_POS 9
369 /* ADPD108X specific registers */
370 #define ADPD108X_SLOTA_TIA_CFG_SLOTA_BUF_GAIN_MASK 0x0300
371 #define ADPD108X_SLOTA_TIA_CFG_SLOTA_INT_GAIN_POS 8
372 /* ADPD188_REG_SLOTA_TIA_CFG common registers */
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
383 
384 /* ADPD188_REG_SLOTB_TIA_CFG */
385 /* ADPD188BI specific registers */
386 #define ADPD188_SLOTB_TIA_CFG_SLOTA_BUF_GAIN_MASK 0x0200
387 #define ADPD188_SLOTB_TIA_CFG_SLOTA_BUF_GAIN_POS 9
388 /* ADPD108X specific registers */
389 #define ADPD108X_SLOTB_TIA_CFG_SLOTA_BUF_GAIN_MASK 0x0300
390 #define ADPD108X_SLOTB_TIA_CFG_SLOTA_INT_GAIN_POS 8
391 /* ADPD188_REG_SLOTA_TIA_CFG common registers */
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
402 
403 /* ADPD188_REG_SAMPLE_CLK */
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
410 
411 /* ADPD188_REG_CLK32M_ADJUST */
412 #define ADPD188_CLK32M_ADJUST_CLK32M_ADJUST_MASK 0x00FF
413 #define ADPD188_CLK32M_ADJUST_CLK32M_ADJUST_POS 0
414 
415 /* ADPD188_REG_EXT_SYNC_SEL */
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
424 
425 /* ADPD188_REG_CLK32M_CAL_EN */
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
430 
431 /* ADPD188_REG_AFE_PWR_CFG2 */
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
440 
441 /* ADPD188_REG_TIA_INDEP_GAIN */
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
454 
455 /* ADPD188_REG_MATH */
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
466 
467 /* ADPD188_REG_FLT_CONFIG_B */
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
472 
473 /* ADPD188_REG_FLT_LED_FIRE */
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
478 
479 /* ADPD188_REG_FLT_CONFIG_A */
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
484 
485 /* ADPD188_REG_DATA_ACCESS_CTL */
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
492 
493 /******************************************************************************/
494 /*************************** Types Declarations *******************************/
495 /******************************************************************************/
496 
505 };
506 
517 };
518 
528 };
529 
541 };
542 
554 };
555 
562  uint8_t gpio_id;
564  uint8_t gpio_pol;
566  uint8_t gpio_drv;
568  uint8_t gpio_en;
569 };
570 
608 };
609 
619 };
620 
636 };
637 
646  bool slot_en;
649 };
650 
655 struct adpd188_dev {
661  void *phy_desc;
666 };
667 
683 };
684 
685 /******************************************************************************/
686 /************************ Functions Declarations ******************************/
687 /******************************************************************************/
688 
689 /* Initialize the ADPD188 driver. */
690 int32_t adpd188_init(struct adpd188_dev **device,
692 
693 /* Free resources allocated by adpd188_init(). */
694 int32_t adpd188_remove(struct adpd188_dev *dev);
695 
696 /* Read one 16 bit register of the ADPD188. */
697 int32_t adpd188_reg_read(struct adpd188_dev *dev, uint8_t reg_addr,
698  uint16_t *reg_val);
699 
700 /* Write one 16 bit register of the ADPD188. */
701 int32_t adpd188_reg_write(struct adpd188_dev *dev, uint8_t reg_addr,
702  uint16_t reg_val);
703 
704 /* Get the mode of operation of the ADPD188. */
705 int32_t adpd188_mode_get(struct adpd188_dev *dev, enum adpd188_mode *mode);
706 
707 /* Set the mode of operation of the ADPD188. */
708 int32_t adpd188_mode_set(struct adpd188_dev *dev, enum adpd188_mode new_mode);
709 
710 /* Get the number of bytes currently present in FIFO. */
711 int32_t adpd188_fifo_status_get(struct adpd188_dev *dev, uint8_t *bytes_no);
712 
713 /* Empty the FIFO. */
714 int32_t adpd188_fifo_clear(struct adpd188_dev *dev);
715 
716 /*
717  * Set the number of 16 bit words that need to be in the FIFO to trigger an
718  * interrupt.
719  */
720 int32_t adpd188_fifo_thresh_set(struct adpd188_dev *dev, uint8_t word_no);
721 
722 /* Get the slot and FIFO interrupt flags. */
723 int32_t adpd188_interrupt_get(struct adpd188_dev *dev, uint8_t *flags);
724 
725 /* Clear the slot and FIFO interrupt flags. */
726 int32_t adpd188_interrupt_clear(struct adpd188_dev *dev, uint8_t flags);
727 
728 /* Enable the slot and FIFO interrupt flags. */
729 int32_t adpd188_interrupt_en(struct adpd188_dev *dev, uint8_t flags);
730 
731 /* Setup drive and polarity of the GPIOs. */
732 int32_t adpd188_gpio_setup(struct adpd188_dev *dev,
733  struct adpd188_gpio_config config);
734 
735 /* Setup the GPIO source. */
736 int32_t adpd188_gpio_alt_setup(struct adpd188_dev *dev, uint8_t gpio_id,
737  enum adpd188_gpio_alt_config config);
738 
739 /* Do software reset of the device. */
740 int32_t adpd188_sw_reset(struct adpd188_dev *dev);
741 
742 /* Do internal 32MHz clock calibration. */
743 int32_t adpd188_clk32mhz_cal(struct adpd188_dev *dev);
744 
745 /* Enable slot and setup its FIFO interaction. */
746 int32_t adpd188_slot_setup(struct adpd188_dev *dev,
747  struct adpd188_slot_config config);
748 
749 /* Set sample frequency of the ADC. */
750 int32_t adpd188_adc_fsample_set(struct adpd188_dev *dev, uint16_t freq_hz);
751 
752 /* Get sample frequency of the ADC. */
753 int32_t adpd188_adc_fsample_get(struct adpd188_dev *dev, uint16_t *freq_hz);
754 
755 /* Do initial configuration of the device to use as a smoke detector. */
756 int32_t adpd188_smoke_detect_setup(struct adpd188_dev *dev);
757 
758 #endif /* ADPD188_H_ */
adpd188_interrupt
adpd188_interrupt
Interrupt flags of the ADPD188.
Definition: adpd188.h:547
ADPD188_SPI
@ ADPD188_SPI
Definition: adpd188.h:525
ADPD188_DEVICE_ID
#define ADPD188_DEVICE_ID
Definition: adpd188.h:181
ADPD188_OUT_LOW
@ ADPD188_OUT_LOW
Definition: adpd188.h:603
adpd188_dev::gpio0
struct no_os_gpio_desc * gpio0
Definition: adpd188.h:663
ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_WIDTH_MASK
#define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_WIDTH_MASK
Definition: adpd188.h:332
ADPD188_PD_LED_SELECT_SLOTB_PD_SEL_MASK
#define ADPD188_PD_LED_SELECT_SLOTB_PD_SEL_MASK
Definition: adpd188.h:224
adpd188_adc_fsample_set
int32_t adpd188_adc_fsample_set(struct adpd188_dev *dev, uint16_t freq_hz)
Set sample frequency of the ADC.
Definition: adpd188.c:625
ADPD188_REG_DATA_ACCESS_CTL
#define ADPD188_REG_DATA_ACCESS_CTL
Definition: adpd188.h:109
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
ADPD188_FIFO_THRESH_FIFO_THRESH_POS
#define ADPD188_FIFO_THRESH_FIFO_THRESH_POS
Definition: adpd188.h:172
ADPD188_INT_MASK_FIFO_INT_MASK_MASK
#define ADPD188_INT_MASK_FIFO_INT_MASK_MASK
Definition: adpd188.h:145
ADPD188_REG_NUM_AVG
#define ADPD188_REG_NUM_AVG
Definition: adpd188.h:66
adpd188_gpio_alt_setup
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_mode
ADPD188 operation modes.
Definition: adpd188.h:534
ADPD188_STATUS_FIFO_SAMPLES_MASK
#define ADPD188_STATUS_FIFO_SAMPLES_MASK
Definition: adpd188.h:137
no_os_i2c_write
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
adpd188_adc_fsample_set
int32_t adpd188_adc_fsample_set(struct adpd188_dev *dev, uint16_t freq_hz)
Set sample frequency of the ADC.
Definition: adpd188.c:625
ADPD188_SLOTB_NUMPULSES_SLOTB_PULSES_MASK
#define ADPD188_SLOTB_NUMPULSES_SLOTB_PULSES_MASK
Definition: adpd188.h:316
no_os_i2c_init
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
@ ADPD188_SLOTA_PULSE
Definition: adpd188.h:586
adpd188_interrupt_clear
int32_t adpd188_interrupt_clear(struct adpd188_dev *dev, uint8_t flags)
Clear the slot and FIFO interrupt flags.
Definition: adpd188.c:378
adpd188_fifo_clear
int32_t adpd188_fifo_clear(struct adpd188_dev *dev)
Empty the FIFO.
Definition: adpd188.c:296
ADPD188_GPIO_CTRL_GPIO0_ALT_CFG_POS
#define ADPD188_GPIO_CTRL_GPIO0_ALT_CFG_POS
Definition: adpd188.h:199
ADPD188_ILED3_COARSE_ILED3_COARSE_POS
#define ADPD188_ILED3_COARSE_ILED3_COARSE_POS
Definition: adpd188.h:265
ADPD188_REG_FSAMPLE
#define ADPD188_REG_FSAMPLE
Definition: adpd188.h:64
adpd188_mode_get
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
@ ADPD188_FIFO_INT
Definition: adpd188.h:553
no_os_spi_write_and_read
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
adpd188_interrupt_en
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
@ ADPD188_ANYSLOT_PULSE
Definition: adpd188.h:590
ADPD188_REG_ILED3_COARSE
#define ADPD188_REG_ILED3_COARSE
Definition: adpd188.h:79
ADPD188_PD_LED_SELECT_SLOTA_LED_SEL_MASK
#define ADPD188_PD_LED_SELECT_SLOTA_LED_SEL_MASK
Definition: adpd188.h:227
adpd188_mode_set
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
adpd188_init
int32_t adpd188_init(struct adpd188_dev **device, struct adpd188_init_param *init_param)
Initialize the ADPD188 driver.
Definition: adpd188.c:55
ADPD188_NORMAL
@ ADPD188_NORMAL
Definition: adpd188.h:540
ADPD188_ANYSLOT_OUT
@ ADPD188_ANYSLOT_OUT
Definition: adpd188.h:596
adpd188_slot_setup
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
no_os_spi.h
Header file of SPI Interface.
ADPD188_REG_MATH
#define ADPD188_REG_MATH
Definition: adpd188.h:105
ADPD188_GPIO_CTRL_GPIO1_ALT_CFG_POS
#define ADPD188_GPIO_CTRL_GPIO1_ALT_CFG_POS
Definition: adpd188.h:198
adpd188_dev::device
enum adpd_supported_devices device
Definition: adpd188.h:657
adpd188.h
ADPD188 driver header file.
ADPD188_FIFO_THRESH_FIFO_THRESH_MASK
#define ADPD188_FIFO_THRESH_FIFO_THRESH_MASK
Definition: adpd188.h:171
no_os_i2c_remove
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
@ ADPD188_SLOTB_OUT
Definition: adpd188.h:594
adpd188_fifo_thresh_set
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
ADPD188_MATH_FLT_MATH12_A_POS
#define ADPD188_MATH_FLT_MATH12_A_POS
Definition: adpd188.h:465
ADPD188_32BIT_4CHAN
@ ADPD188_32BIT_4CHAN
Definition: adpd188.h:635
ADPD188_REG_INT_MASK
#define ADPD188_REG_INT_MASK
Definition: adpd188.h:52
ADPD188_REG_DEVID
#define ADPD188_REG_DEVID
Definition: adpd188.h:56
adpd_supported_devices
adpd_supported_devices
Devices supported by the driver.
Definition: adpd188.h:501
adpd188_gpio_config::gpio_pol
uint8_t gpio_pol
Definition: adpd188.h:564
ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_WIDTH_MASK
#define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_WIDTH_MASK
Definition: adpd188.h:338
no_os_delay.h
Header file of Delay functions.
ADPD188_MODE_MODE_MASK
#define ADPD188_MODE_MODE_MASK
Definition: adpd188.h:206
ADPD188_PROGRAM
@ ADPD188_PROGRAM
Definition: adpd188.h:538
adpd188_init_param::phy_init
union adpd188_phy_init phy_init
Definition: adpd188.h:678
ADPD188_MATH_FLT_MATH12_A_MASK
#define ADPD188_MATH_FLT_MATH12_A_MASK
Definition: adpd188.h:460
ADPD188_AFE_PWR_CFG1_AFE_POWERDOWN_POS
#define ADPD188_AFE_PWR_CFG1_AFE_POWERDOWN_POS
Definition: adpd188.h:347
adpd188_smoke_detect_setup
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
@ ADPD188_SLOTB_INT
Definition: adpd188.h:551
device
Definition: ad9361_util.h:69
adpd188_init_param::phy_opt
enum adpd188_phy_opt phy_opt
Definition: adpd188.h:676
ADPD188_SLOT_EN_SLOTB_EN_POS
#define ADPD188_SLOT_EN_SLOTB_EN_POS
Definition: adpd188.h:219
ADPD188_REG_INT_SEQ_B
#define ADPD188_REG_INT_SEQ_B
Definition: adpd188.h:74
adpd188_slot_config::slot_id
enum adpd188_slots slot_id
Definition: adpd188.h:644
ADPD188_ILED3_COARSE_ILED3_COARSE_MASK
#define ADPD188_ILED3_COARSE_ILED3_COARSE_MASK
Definition: adpd188.h:262
ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_OFFSET_MASK
#define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_OFFSET_MASK
Definition: adpd188.h:339
ADPD188_MATH_FLT_MATH34_A_POS
#define ADPD188_MATH_FLT_MATH34_A_POS
Definition: adpd188.h:462
adpd188_reg_write
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
no_os_calloc
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
ADPD188_CLK32M_CAL_EN_CLK32M_CAL_EN_MASK
#define ADPD188_CLK32M_CAL_EN_CLK32M_CAL_EN_MASK
Definition: adpd188.h:427
adpd188_sw_reset
int32_t adpd188_sw_reset(struct adpd188_dev *dev)
Do software reset of the device.
Definition: adpd188.c:515
no_os_gpio_direction_input
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
ADPD188_REG_SW_RESET
#define ADPD188_REG_SW_RESET
Definition: adpd188.h:61
adpd188_init_param::device
enum adpd_supported_devices device
Definition: adpd188.h:674
ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_WIDTH_POS
#define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_WIDTH_POS
Definition: adpd188.h:334
ADPD188_SLOTA_INT
@ ADPD188_SLOTA_INT
Definition: adpd188.h:549
ADPD188_REG_GPIO_DRV
#define ADPD188_REG_GPIO_DRV
Definition: adpd188.h:53
adpd188_adc_fsample_get
int32_t adpd188_adc_fsample_get(struct adpd188_dev *dev, uint16_t *freq_hz)
Get sample frequency of the ADC.
Definition: adpd188.c:643
ADPD188_GPIO_CTRL_GPIO1_ALT_CFG_MASK
#define ADPD188_GPIO_CTRL_GPIO1_ALT_CFG_MASK
Definition: adpd188.h:196
adpd188_interrupt_get
int32_t adpd188_interrupt_get(struct adpd188_dev *dev, uint8_t *flags)
Get the slot and FIFO interrupt flags.
Definition: adpd188.c:348
ADPD188_GPIO_DRV_GPIO1_DRV_MASK
#define ADPD188_GPIO_DRV_GPIO1_DRV_MASK
Definition: adpd188.h:153
ADPD188_SLOT_EN_SLOTB_EN_MASK
#define ADPD188_SLOT_EN_SLOTB_EN_MASK
Definition: adpd188.h:213
ADPD188_NO_FIFO
@ ADPD188_NO_FIFO
Definition: adpd188.h:627
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
ADPD188_SLOT_EN_FIFO_OVRN_PREVENT_MASK
#define ADPD188_SLOT_EN_FIFO_OVRN_PREVENT_MASK
Definition: adpd188.h:211
ADPD188_REG_SLOTA_CH3_OFFSET
#define ADPD188_REG_SLOTA_CH3_OFFSET
Definition: adpd188.h:71
ADPD188_REG_AFE_PWR_CFG1
#define ADPD188_REG_AFE_PWR_CFG1
Definition: adpd188.h:92
ADPD188_I2C
@ ADPD188_I2C
Definition: adpd188.h:527
ADPD188_REG_PD_LED_SELECT
#define ADPD188_REG_PD_LED_SELECT
Definition: adpd188.h:65
no_os_error.h
Error codes definition.
ADPD188_STATUS_SLOTB_INT_MASK
#define ADPD188_STATUS_SLOTB_INT_MASK
Definition: adpd188.h:138
ADPD188_PD_LED_SELECT_SLOTA_LED_SEL_POS
#define ADPD188_PD_LED_SELECT_SLOTA_LED_SEL_POS
Definition: adpd188.h:231
adpd188_init_param::gpio0_init
struct no_os_gpio_init_param gpio0_init
Definition: adpd188.h:680
ADPD188_AFE_PWR_CFG1_AFE_POWERDOWN_MASK
#define ADPD188_AFE_PWR_CFG1_AFE_POWERDOWN_MASK
Definition: adpd188.h:345
adpd188_slot_config::sot_fifo_mode
enum adpd188_slot_fifo_mode sot_fifo_mode
Definition: adpd188.h:648
adpd188_mode_get
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
@ ADPD188_32BIT_SUM
Definition: adpd188.h:631
adpd188_reg_write
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
ADPD188_REG_SLOTB_NUMPULSES
#define ADPD188_REG_SLOTB_NUMPULSES
Definition: adpd188.h:87
ADPD188_SLOT_EN_SLOTA_EN_POS
#define ADPD188_SLOT_EN_SLOTA_EN_POS
Definition: adpd188.h:221
ADPD188_PD_LED_SELECT_SLOTA_PD_SEL_POS
#define ADPD188_PD_LED_SELECT_SLOTA_PD_SEL_POS
Definition: adpd188.h:229
ADPD188_REG_GPIO_CTRL
#define ADPD188_REG_GPIO_CTRL
Definition: adpd188.h:59
ADPD188_OUT_HIGH
@ ADPD188_OUT_HIGH
Definition: adpd188.h:605
ADPD1081
@ ADPD1081
Definition: adpd188.h:504
ADPD188_STANDBY
@ ADPD188_STANDBY
Definition: adpd188.h:536
adpd188_slot_fifo_mode
adpd188_slot_fifo_mode
The way a time slot stores data in the FIFO.
Definition: adpd188.h:625
ADPD188_REG_FIFO_THRESH
#define ADPD188_REG_FIFO_THRESH
Definition: adpd188.h:55
ADPD188_SLOTA_NUMPULSES_SLOTA_PERIOD_POS
#define ADPD188_SLOTA_NUMPULSES_SLOTA_PERIOD_POS
Definition: adpd188.h:301
ADPD188_ILED3_COARSE_ILED3_SCALE_MASK
#define ADPD188_ILED3_COARSE_ILED3_SCALE_MASK
Definition: adpd188.h:260
ADPD188_REG_SLOTA_CH4_OFFSET
#define ADPD188_REG_SLOTA_CH4_OFFSET
Definition: adpd188.h:72
ADPD188_32KHZ_OSC
@ ADPD188_32KHZ_OSC
Definition: adpd188.h:607
ADPD188_SLOTB_PULSE
@ ADPD188_SLOTB_PULSE
Definition: adpd188.h:588
adpd188_reg_read
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
ADPD188_SLOTB_NUMPULSES_SLOTB_PULSES_POS
#define ADPD188_SLOTB_NUMPULSES_SLOTB_PULSES_POS
Definition: adpd188.h:318
ADPD188_ACTIVE_PULSE
@ ADPD188_ACTIVE_PULSE
Definition: adpd188.h:584
ADPD188_16BIT_SUM
@ ADPD188_16BIT_SUM
Definition: adpd188.h:629
ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_OFFSET_POS
#define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_OFFSET_POS
Definition: adpd188.h:341
ADPD188_REG_SLOTA_NUMPULSES
#define ADPD188_REG_SLOTA_NUMPULSES
Definition: adpd188.h:84
adpd188_slot_config
Slot configuration initialization structure.
Definition: adpd188.h:642
adpd188_slot_config::slot_en
bool slot_en
Definition: adpd188.h:646
adpd188_reg_read
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
ADPD188_GPIO_DRV_GPIO0_POL_MASK
#define ADPD188_GPIO_DRV_GPIO0_POL_MASK
Definition: adpd188.h:157
ADPD188_STATUS_FIFO_SAMPLES_POS
#define ADPD188_STATUS_FIFO_SAMPLES_POS
Definition: adpd188.h:140
adpd188_mode_set
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
ADPD188_PD_LED_SELECT_SLOTB_LED_SEL_MASK
#define ADPD188_PD_LED_SELECT_SLOTB_LED_SEL_MASK
Definition: adpd188.h:226
ADPD188_GPIO_DRV_GPIO0_ENA_MASK
#define ADPD188_GPIO_DRV_GPIO0_ENA_MASK
Definition: adpd188.h:155
ADPD188_REG_CLK32M_ADJUST
#define ADPD188_REG_CLK32M_ADJUST
Definition: adpd188.h:100
no_os_gpio_remove
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
adpd188_smoke_detect_setup
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
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
adpd188_fifo_thresh_set
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
adpd188_fifo_clear
int32_t adpd188_fifo_clear(struct adpd188_dev *dev)
Empty the FIFO.
Definition: adpd188.c:296
adpd188_phy_opt
adpd188_phy_opt
Types of physical communication protocol.
Definition: adpd188.h:523
ADPD188_SLOTB
@ ADPD188_SLOTB
Definition: adpd188.h:618
adpd188_phy_init::i2c_phy
struct no_os_i2c_init_param i2c_phy
Definition: adpd188.h:514
adpd188_remove
int32_t adpd188_remove(struct adpd188_dev *dev)
Free resources allocated by adpd188_init().
Definition: adpd188.c:135
adpd188_clk32mhz_cal
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
ADPD188_INT_MASK_SLOTA_INT_MASK_MASK
#define ADPD188_INT_MASK_SLOTA_INT_MASK_MASK
Definition: adpd188.h:147
ADPD188_REG_SLOTB_CH4_OFFSET
#define ADPD188_REG_SLOTB_CH4_OFFSET
Definition: adpd188.h:78
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
ADPD188_FIFO_THRESH_MAX_THRESHOLD
#define ADPD188_FIFO_THRESH_MAX_THRESHOLD
Definition: adpd188.h:173
adpd188_sw_reset
int32_t adpd188_sw_reset(struct adpd188_dev *dev)
Do software reset of the device.
Definition: adpd188.c:515
adpd188_phy_init::spi_phy
struct no_os_spi_init_param spi_phy
Definition: adpd188.h:516
ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_WIDTH_POS
#define ADPD188_SLOTB_AFE_WINDOW_SLOTB_AFE_WIDTH_POS
Definition: adpd188.h:340
ADPD188_SLOT_EN_SLOTA_FIFO_MODE_POS
#define ADPD188_SLOT_EN_SLOTA_FIFO_MODE_POS
Definition: adpd188.h:220
adpd188_remove
int32_t adpd188_remove(struct adpd188_dev *dev)
Free resources allocated by adpd188_init().
Definition: adpd188.c:135
adpd188_interrupt_en
int32_t adpd188_interrupt_en(struct adpd188_dev *dev, uint8_t flags)
Enable the slot and FIFO interrupt flags.
Definition: adpd188.c:418
adpd188_gpio_setup
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
@ ADPD1080
Definition: adpd188.h:503
ADPD188_GPIO_DRV_GPIO0_DRV_MASK
#define ADPD188_GPIO_DRV_GPIO0_DRV_MASK
Definition: adpd188.h:156
ADPD188_ILED1_COARSE_ILED1_SLEW_POS
#define ADPD188_ILED1_COARSE_ILED1_SLEW_POS
Definition: adpd188.h:272
adpd188_phy_init
Communication physical protocol initialization structure. Can be I2C or SPI.
Definition: adpd188.h:512
ADPD188_REG_SLOTA_CH2_OFFSET
#define ADPD188_REG_SLOTA_CH2_OFFSET
Definition: adpd188.h:70
adpd188_adc_fsample_get
int32_t adpd188_adc_fsample_get(struct adpd188_dev *dev, uint16_t *freq_hz)
Get sample frequency of the ADC.
Definition: adpd188.c:643
ADPD188_CLK_RATIO_CLK_RATIO_MASK
#define ADPD188_CLK_RATIO_CLK_RATIO_MASK
Definition: adpd188.h:192
adpd188_clk32mhz_cal
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
no_os_i2c_desc
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
ADPD188_CLK32M_ADJUST_CLK32M_ADJUST_MASK
#define ADPD188_CLK32M_ADJUST_CLK32M_ADJUST_MASK
Definition: adpd188.h:412
no_os_gpio_get
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
no_os_i2c_read
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
adpd188_gpio_alt_setup
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_MATH_FLT_MATH12_B_MASK
#define ADPD188_MATH_FLT_MATH12_B_MASK
Definition: adpd188.h:459
adpd188_fifo_status_get
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
no_os_i2c.h
Header file of I2C Interface.
adpd188_slots
adpd188_slots
ADPD188 time slots.
Definition: adpd188.h:614
ADPD188_REG_STATUS
#define ADPD188_REG_STATUS
Definition: adpd188.h:51
adpd188_init_param
Driver initialization structure.
Definition: adpd188.h:672
ADPD188_SLOTA_OUT
@ ADPD188_SLOTA_OUT
Definition: adpd188.h:592
ADPD188_REG_MODE
#define ADPD188_REG_MODE
Definition: adpd188.h:62
ADPD188BI
@ ADPD188BI
Definition: adpd188.h:502
no_os_free
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
adpd188_gpio_config
GPIO level configuration.
Definition: adpd188.h:560
ADPD188_SLOTA_NUMPULSES_SLOTA_PULSES_POS
#define ADPD188_SLOTA_NUMPULSES_SLOTA_PULSES_POS
Definition: adpd188.h:300
ADPD188_REG_SLOTB_CH1_OFFSET
#define ADPD188_REG_SLOTB_CH1_OFFSET
Definition: adpd188.h:75
ADPD188_SLOT_EN_SLOTA_FIFO_MODE_MASK
#define ADPD188_SLOT_EN_SLOTA_FIFO_MODE_MASK
Definition: adpd188.h:214
adpd188_fifo_status_get
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
adpd188_slot_setup
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
ADPD188_MATH_FLT_MATH34_B_MASK
#define ADPD188_MATH_FLT_MATH34_B_MASK
Definition: adpd188.h:456
ADPD188_INT_FUNC
@ ADPD188_INT_FUNC
Definition: adpd188.h:579
ADPD188_GPIO_CTRL_GPIO0_ALT_CFG_MASK
#define ADPD188_GPIO_CTRL_GPIO0_ALT_CFG_MASK
Definition: adpd188.h:197
ADPD188_SLOTB_NUMPULSES_SLOTB_PERIOD_MASK
#define ADPD188_SLOTB_NUMPULSES_SLOTB_PERIOD_MASK
Definition: adpd188.h:317
ADPD188_PD_LED_SELECT_SLOTB_PD_SEL_POS
#define ADPD188_PD_LED_SELECT_SLOTB_PD_SEL_POS
Definition: adpd188.h:228
adpd188_dev::phy_desc
void * phy_desc
Definition: adpd188.h:661
adpd188_interrupt_get
int32_t adpd188_interrupt_get(struct adpd188_dev *dev, uint8_t *flags)
Get the slot and FIFO interrupt flags.
Definition: adpd188.c:348
ADPD188_REG_SLOTB_AFE_WINDOW
#define ADPD188_REG_SLOTB_AFE_WINDOW
Definition: adpd188.h:91
ADPD188_SLOT_EN_SLOTA_EN_MASK
#define ADPD188_SLOT_EN_SLOTA_EN_MASK
Definition: adpd188.h:215
adpd188_init_param::gpio1_init
struct no_os_gpio_init_param gpio1_init
Definition: adpd188.h:682
no_os_i2c_init_param
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
ADPD188_INT_MASK_SLOTB_INT_MASK_MASK
#define ADPD188_INT_MASK_SLOTB_INT_MASK_MASK
Definition: adpd188.h:146
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
ADPD188_REG_SLOT_EN
#define ADPD188_REG_SLOT_EN
Definition: adpd188.h:63
ADPD188_MATH_FLT_MATH34_A_MASK
#define ADPD188_MATH_FLT_MATH34_A_MASK
Definition: adpd188.h:457
adpd188_gpio_config::gpio_drv
uint8_t gpio_drv
Definition: adpd188.h:566
ADPD188_ILED3_COARSE_ILED3_SLEW_MASK
#define ADPD188_ILED3_COARSE_ILED3_SLEW_MASK
Definition: adpd188.h:261
ADPD188_DATA_ACCESS_CTL_DIGITAL_CLOCK_ENA_MASK
#define ADPD188_DATA_ACCESS_CTL_DIGITAL_CLOCK_ENA_MASK
Definition: adpd188.h:488
ADPD188_ILED1_COARSE_ILED1_SLEW_MASK
#define ADPD188_ILED1_COARSE_ILED1_SLEW_MASK
Definition: adpd188.h:269
ADPD188_HALF_SAMPLING
@ ADPD188_HALF_SAMPLING
Definition: adpd188.h:601
ADPD188_REG_INT_SEQ_A
#define ADPD188_REG_INT_SEQ_A
Definition: adpd188.h:68
ADPD188_MATH_FLT_MATH34_B_POS
#define ADPD188_MATH_FLT_MATH34_B_POS
Definition: adpd188.h:461
ADPD188_REG_SLOTA_AFE_WINDOW
#define ADPD188_REG_SLOTA_AFE_WINDOW
Definition: adpd188.h:90
adpd188_gpio_alt_config
adpd188_gpio_alt_config
GPIO source configuration.
Definition: adpd188.h:575
ADPD188_16BIT_4CHAN
@ ADPD188_16BIT_4CHAN
Definition: adpd188.h:633
no_os_spi_remove
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
ADPD188_INT_SEQ_A_INTEG_ORDER_A_MASK
#define ADPD188_INT_SEQ_A_INTEG_ORDER_A_MASK
Definition: adpd188.h:246
ADPD188_GPIO_DRV_GPIO1_POL_MASK
#define ADPD188_GPIO_DRV_GPIO1_POL_MASK
Definition: adpd188.h:154
ADPD188_SLOT_EN_SLOTB_FIFO_MODE_POS
#define ADPD188_SLOT_EN_SLOTB_FIFO_MODE_POS
Definition: adpd188.h:218
no_os_gpio.h
Header file of GPIO Interface.
ADPD108X_DEVICE_ID
#define ADPD108X_DEVICE_ID
Definition: adpd188.h:183
adpd188_gpio_config::gpio_id
uint8_t gpio_id
Definition: adpd188.h:562
ADPD188_ILED1_COARSE_ILED1_COARSE_MASK
#define ADPD188_ILED1_COARSE_ILED1_COARSE_MASK
Definition: adpd188.h:270
ADPD188_ILED1_COARSE_ILED1_SCALE_MASK
#define ADPD188_ILED1_COARSE_ILED1_SCALE_MASK
Definition: adpd188.h:268
ADPD188_REG_CLK_RATIO
#define ADPD188_REG_CLK_RATIO
Definition: adpd188.h:58
ADPD188_PD_LED_SELECT_SLOTB_LED_SEL_POS
#define ADPD188_PD_LED_SELECT_SLOTB_LED_SEL_POS
Definition: adpd188.h:230
ADPD188_REG_ILED1_COARSE
#define ADPD188_REG_ILED1_COARSE
Definition: adpd188.h:80
adpd188_gpio_config::gpio_en
uint8_t gpio_en
Definition: adpd188.h:568
ADPD188_STATUS_SLOTA_INT_MASK
#define ADPD188_STATUS_SLOTA_INT_MASK
Definition: adpd188.h:139
no_os_spi_init
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
adpd188_dev
Driver descriptor structure.
Definition: adpd188.h:655
adpd188_dev::gpio1
struct no_os_gpio_desc * gpio1
Definition: adpd188.h:665
ADPD188_REG_CLK32M_CAL_EN
#define ADPD188_REG_CLK32M_CAL_EN
Definition: adpd188.h:102
ADPD188_SLOTA
@ ADPD188_SLOTA
Definition: adpd188.h:616
ADPD188_REG_SLOTB_CH2_OFFSET
#define ADPD188_REG_SLOTB_CH2_OFFSET
Definition: adpd188.h:76
ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_OFFSET_POS
#define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_OFFSET_POS
Definition: adpd188.h:335
ADPD188_REG_SLOTA_CH1_OFFSET
#define ADPD188_REG_SLOTA_CH1_OFFSET
Definition: adpd188.h:69
ADPD188_ILED1_COARSE_ILED1_COARSE_POS
#define ADPD188_ILED1_COARSE_ILED1_COARSE_POS
Definition: adpd188.h:273
ADPD188_PD_LED_SELECT_SLOTA_PD_SEL_MASK
#define ADPD188_PD_LED_SELECT_SLOTA_PD_SEL_MASK
Definition: adpd188.h:225
ADPD188_SLOT_EN_SLOTB_FIFO_MODE_MASK
#define ADPD188_SLOT_EN_SLOTB_FIFO_MODE_MASK
Definition: adpd188.h:212
adpd188_interrupt_clear
int32_t adpd188_interrupt_clear(struct adpd188_dev *dev, uint8_t flags)
Clear the slot and FIFO interrupt flags.
Definition: adpd188.c:378
ADPD188_INT_SEQ_B_INTEG_ORDER_B_MASK
#define ADPD188_INT_SEQ_B_INTEG_ORDER_B_MASK
Definition: adpd188.h:256
ADPD188_ADPD103
@ ADPD188_ADPD103
Definition: adpd188.h:577
ADPD188_SLOT_EN_RDOUT_MODE_MASK
#define ADPD188_SLOT_EN_RDOUT_MODE_MASK
Definition: adpd188.h:210
adpd188_gpio_setup
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
ADPD188_ILED3_COARSE_ILED3_SLEW_POS
#define ADPD188_ILED3_COARSE_ILED3_SLEW_POS
Definition: adpd188.h:264
ADPD188_SLOTA_NUMPULSES_SLOTA_PERIOD_MASK
#define ADPD188_SLOTA_NUMPULSES_SLOTA_PERIOD_MASK
Definition: adpd188.h:299
ADPD188_SLOTB_NUMPULSES_SLOTB_PERIOD_POS
#define ADPD188_SLOTB_NUMPULSES_SLOTB_PERIOD_POS
Definition: adpd188.h:319
ADPD188_REG_SLOTB_CH3_OFFSET
#define ADPD188_REG_SLOTB_CH3_OFFSET
Definition: adpd188.h:77
ADPD188_MATH_FLT_MATH12_B_POS
#define ADPD188_MATH_FLT_MATH12_B_POS
Definition: adpd188.h:464
ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_OFFSET_MASK
#define ADPD188_SLOTA_AFE_WINDOW_SLOTA_AFE_OFFSET_MASK
Definition: adpd188.h:333
adpd188_init
int32_t adpd188_init(struct adpd188_dev **device, struct adpd188_init_param *init_param)
Initialize the ADPD188 driver.
Definition: adpd188.c:55
ADPD188_SLOTA_NUMPULSES_SLOTA_PULSES_MASK
#define ADPD188_SLOTA_NUMPULSES_SLOTA_PULSES_MASK
Definition: adpd188.h:298
adpd188_dev::phy_opt
enum adpd188_phy_opt phy_opt
Definition: adpd188.h:659
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140