no-OS
ad74416h.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef _AD74416H_H
40 #define _AD74416H_H
41 
42 /******************************************************************************/
43 /***************************** Include Files **********************************/
44 /******************************************************************************/
45 
46 #include "stdint.h"
47 #include "stdbool.h"
48 #include "no_os_spi.h"
49 #include "no_os_gpio.h"
50 
51 /******************************************************************************/
52 /********************** Macros and Constants Definitions **********************/
53 /******************************************************************************/
54 
55 #define AD74416H_N_CHANNELS 4
56 
57 #define AD74416H_CH_A 0
58 #define AD74416H_CH_B 1
59 #define AD74416H_CH_C 2
60 #define AD74416H_CH_D 3
61 
63 #define AD74416H_RSENSE 12
64 
65 #define AD74416H_ADC_MAX_VALUE 16777215
66 
68 #define AD74416H_NOP 0x00
69 #define AD74416H_CH_FUNC_SETUP(x) (0x01 + (x * 12))
70 #define AD74416H_ADC_CONFIG(x) (0x02 + (x * 12))
71 #define AD74416H_DIN_CONFIG0(x) (0x03 + (x * 12))
72 #define AD74416H_DIN_CONFIG1(x) (0x04 + (x * 12))
73 #define AD74416H_OUTPUT_CONFIG(x) (0x05 + (x * 12))
74 #define AD74416H_RTD_CONFIG(x) (0x06 + (x * 12))
75 #define AD74416H_FET_LKG_COMP(x) (0x07 + (x * 12))
76 #define AD74416H_DO_EXT_CONFIG(x) (0x08 + (x * 12))
77 #define AD74416H_I_BURNOUT_CONFIG(x) (0x09 + (x * 12))
78 #define AD74416H_DAC_CODE(x) (0x0A + (x * 12))
79 #define AD74416H_DAC_ACTIVE(x) (0x0C + (x * 12))
80 #define AD74416H_GPIO_CONFIG(x) (0x32 + x)
81 #define AD74416H_PWR_OPTIM_CONFIG 0x38
82 #define AD74416H_ADC_CONV_CTRL 0x39
83 #define AD74416H_DIAG_ASSIGN 0x3A
84 #define AD74416H_WTD_CONFIG 0x3B
85 #define AD74416H_DIN_COMP_OUT 0x3E
86 #define AD74416H_ALERT_STATUS 0x3F
87 #define AD74416H_LIVE_STATUS 0x40
88 #define AD74416H_ADC_RESULT_UPR(x) (0x41 + (x * 2))
89 #define AD74416H_ADC_RESULT(x) (0x42 + (x * 2))
90 #define AD74416H_ADC_DIAG_RESULT(x) (0x49 + x)
91 #define AD74416H_LAST_ADC_RESULT_UPR 0x4D
92 #define AD74416H_LAST_ADC_RESULT 0x4E
93 #define AD74416H_DIN_COUNTER(x) (0x50 + (x * 2))
94 #define AD74416H_SUPPLY_ALERT_STATUS 0x57
95 #define AD74416H_CHANNEL_ALERT_STATUS(x) (0x58 + x)
96 #define AD74416H_ALERT_MASK 0x5C
97 #define AD74416H_SUPPLY_ALERT_MASK 0x5D
98 #define AD74416H_CHANNEL_ALERT_MASK(x) (0x5E + x)
99 #define AD74416H_READ_SELECT 0x6E
100 #define AD74416H_BURST_READ_SEL 0x6F
101 #define AD74416H_THERM_RST 0x73
102 #define AD74416H_CMD_KEY 0x74
103 #define AD74416H_BORADCAST_CMD_KEY 0x75
104 #define AD74416H_SCRATCH(x) (0x76 + x)
105 #define AD74416H_GENERIC_ID 0x7A
106 #define AD74416H_SILICON_REV 0x7B
107 #define AD74416H_SILICON_ID0 0x7D
108 #define AD74416H_SILICON_ID1 0x7E
109 #define AD74416H_HART_ALERT_STATUS(x) (0x80 + (x * 16))
110 #define AD74416H_HART_RX(x) (0x81 + (x * 16))
111 #define AD74416H_HART_TX(x) (0x82 + (x * 16))
112 #define AD74416H_HART_FCR(x) (0x83 + (x * 16))
113 #define AD74416H_HART_MCR(x) (0x84 + (x * 16))
114 #define AD74416H_HART_RFC(x) (0x85 + (x * 16))
115 #define AD74416H_HART_TFC(x) (0x86 + (x * 16))
116 #define AD74416H_HART_ALERT_MASK(x) (0x87 + (x * 16))
117 #define AD74416H_HART_CONFIG(x) (0x88 + (x * 16))
118 #define AD74416H_HART_TX_PREM(x) (0x89 + (x * 16))
119 #define AD74416H_HART_EVDET(x) (0x8A + (x * 16))
120 #define AD74416H_HART_TX_GAIN(x) (0x8B + (x * 16))
121 #define AD74416H_HART_GPIO_IF_CONFIG 0xC0
122 #define AD74416H_HART_GPIO_MON_CONFIG(x) (0xC1 + x)
123 
125 #define AD74416H_CMD_KEY_RESET_1 0x15FA
126 #define AD74416H_CMD_KEY_RESET_2 0xAF51
127 
128 #define AD74416H_SPI_RD_RET_INFO_MSK NO_OS_BIT(8)
129 #define AD74416H_ERR_CLR_MSK NO_OS_GENMASK(15, 0)
130 #define AD74416H_SPI_CRC_ERR_MSK NO_OS_BIT(13)
131 
132 /* AD74416H_CH_FUNC_SETUP */
133 #define AD74416H_CH_FUNC_SETUP_MSK NO_OS_GENMASK(3, 0)
134 
135 /* AD74416H_ADC_CONFIG */
136 #define AD74416H_ADC_CONV_RATE_MSK NO_OS_GENMASK(10, 8)
137 #define AD74416H_ADC_CONV_RANGE_MSK NO_OS_GENMASK(6, 4)
138 #define AD74416H_CONV_MUX_MSK NO_OS_GENMASK(2, 0)
139 
140 /* AD74416H_DIN_CONFIG0 */
141 #define AD74416H_COUNT_EN_MSK NO_OS_BIT(15)
142 #define AD74416H_DIN_INV_COMP_OUT_MSK NO_OS_BIT(14)
143 #define AD74416H_COMPARATOR_EN_MSK NO_OS_BIT(13)
144 #define AD74416H_DIN_SINK_RANGE_MSK NO_OS_BIT(12)
145 #define AD74416H_DIN_SINK_MSK NO_OS_GENMASK(11, 7)
146 #define AD74416H_DEBOUNCE_MODE_MSK NO_OS_BIT(6)
147 #define AD74416H_DEBOUNCE_TIME_MSK NO_OS_GENMASK(4, 0)
148 
149 /* AD74416H_DIN_CONFIG1 Register */
150 #define AD74416H_DIN_INPUT_SELECT_MSK NO_OS_BIT(10)
151 #define AD74416H_DIN_SC_DET_EN_MSK NO_OS_BIT(9)
152 #define AD74416H_DIN_OC_DET_EN_MSK NO_OS_BIT(8)
153 #define AD74416H_DIN_THRESH_MODE_MSK NO_OS_BIT(7)
154 #define AD74416H_COMP_THRESH_MSK NO_OS_GENMASK(6, 0)
155 
157 #define AD74416H_AVDD_SELECT_MSK NO_OS_GENMASK(15, 14)
158 #define AD74416H_ALARM_DEG_PERIOD_MSK NO_OS_BIT(12)
159 #define AD74VOUT_4W_EN_MSK NO_OS_BIT(11)
160 #define AD74416H_WAIT_LDAC_CMD_MSK NO_OS_BIT(10)
161 #define AD74416H_VOUT_RANGE_MSK NO_OS_BIT(7)
162 #define AD74416H_SLEW_EN_MSK NO_OS_GENMASK(6, 5)
163 #define AD74416H_SLEW_LIN_STEP_MSK NO_OS_GENMASK(4, 3)
164 #define AD74416H_SLEW_LIN_RATE_MSK NO_OS_GENMASK(2, 1)
165 #define AD74416H_I_LIMIT_MSK NO_OS_BIT(0)
166 
168 #define AD74416H_RTD_ADC_REF_MSK NO_OS_BIT(3)
169 #define AD74416H_RTD_MODE_SEL_MSK NO_OS_BIT(2)
170 #define AD74416H_RTD_EXC_SWAP_MSK NO_OS_BIT(1)
171 #define AD74416H_RTD_CURRENT_MSK NO_OS_BIT(0)
172 
174 #define AD74416H_FET_SRC_LKG_COMP_EN_MSK NO_OS_BIT(0)
175 
177 #define AD74416H_DO_T2_MSK NO_OS_GENMASK(12, 8)
178 #define AD74416H_DO_DATA_MSK NO_OS_BIT(7)
179 #define AD74416H_DO_T1_MSK NO_OS_GENMASK(6, 2)
180 #define AD74416H_DO_SRC_SEL_MSK NO_OS_BIT(1)
181 #define AD74416H_DO_MODE_MSK NO_OS_BIT(0)
182 
184 #define AD74416H_BRN_SEN_VSENSEN_CURR_MSK NO_OS_GENMASK(6, 5)
185 #define AD74416H_BRN_SEN_VSENSEN_POL_MSK NO_OS_BIT(4)
186 #define AD74416H_BRN_VIOUT_CURR_MSK NO_OS_GENAMSK(2, 1)
187 #define AD74416H_BRN_VIOUT_POL_MSK NO_OS_BIT(0)
188 
190 #define AD74416H_DAC_CODE_MSK NO_OS_GENMASK(15, 0)
191 
193 #define AD74416H_DAC_ACTIVE_MSK NO_OS_GENMASK(15, 0)
194 
196 #define AD74416H_ADC_RDY_CTRL_MSK NO_OS_BIT(12)
197 #define AD74416H_CONV_RATE_DIAG_MSK NO_OS_GENMASK(11, 10)
198 #define AD74416H_CONV_SEQ_MSK NO_OS_GENMASK(9, 8)
199 #define AD74416H_DIAG_EN_MSK(x) (NO_OS_BIT(x) << 4)
200 #define AD74416H_CH_EN_MSK(x) NO_OS_BIT(x)
201 
203 #define AD74416H_DIAG_ASSIGN_MSK(x) (NO_OS_GENMASK(3, 0) << ((x) * 4))
204 
206 #define AD74416H_DIN_DO_MSK NO_OS_BIT(7, 6)
207 #define AD74416H_GPI_DATA_MSK NO_OS_BIT(5)
208 #define AD74416H_GPO_DATA_MSK NO_OS_BIT(4)
209 #define AD74416H_GP_WK_PD_EN_MSK NO_OS_BIT(3)
210 #define AD74416H_GPIO_SELECT_MSK NO_OS_GENMASK(2, 0)
211 
213 #define AD74416H_REF_EN_MSK NO_OS_BIT(13)
214 #define AD74416H_SENSE_AGND_OPT_MSK NO_OS_BIT(12)
215 #define AD74416H_SENSE_HF_OPT_D_MSK NO_OS_BIT(11)
216 #define AD74416H_SENSE_HF_OPT_C_MSK NO_OS_BIT(10)
217 #define AD74416H_SENSE_HF_OPT_B_MSK NO_OS_BIT(9)
218 #define AD74416H_SENSE_HF_OPT_A_MSK NO_OS_BIT(8)
219 #define AD74416H_SENSE_LF_OPT_D_MSK NO_OS_BIT(7)
220 #define AD74416H_SENSE_LF_OPT_C_MSK NO_OS_BIT(6)
221 #define AD74416H_SENSE_LF_OPT_B_MSK NO_OS_BIT(5)
222 #define AD74416H_SENSE_LF_OPT_A_MSK NO_OS_BIT(4)
223 #define AD74416H_VSENSEN_OPT_D_MSK NO_OS_BIT(3)
224 #define AD74416H_VSENSEN_OPT_C_MSK NO_OS_BIT(2)
225 #define AD74416H_VSENSEN_OPT_B_MSK NO_OS_BIT(1)
226 #define AD74416H_VSENSEN_OPT_A_MSK NO_OS_BIT(0)
227 
229 #define AD74416H_WDT_EN_MSK NO_OS_BIT(4)
230 #define AD74416H_WDT_TIMEOUT_MSK NO_OS_GENMASK(3, 0)
231 
233 #define AD74416H_DIN_COMP_OUT_D_MSK NO_OS_BIT(3)
234 #define AD74416H_DIN_COMP_OUT_C_MSK NO_OS_BIT(2)
235 #define AD74416H_DIN_COMP_OUT_B_MSK NO_OS_BIT(1)
236 #define AD74416H_DIN_COMP_OUT_A_MSK NO_OS_BIT(0)
237 
239 #define AD74416H_HART_ALERT_D_MSK NO_OS_BIT(15)
240 #define AD74416H_HART_ALERT_C_MSK NO_OS_BIT(14)
241 #define AD74416H_HART_ALERT_B_MSK NO_OS_BIT(13)
242 #define AD74416H_HART_ALERT_A_MSK NO_OS_BIT(12)
243 #define AD74416H_CHANNEL_ALERT_D_MSK NO_OS_BIT(11)
244 #define AD74416H_CHANNEL_ALERT_C_MSK NO_OS_BIT(10)
245 #define AD74416H_CHANNEL_ALERT_B_MSK NO_OS_BIT(9)
246 #define AD74416H_CHANNEL_ALERT_A_MSK NO_OS_BIT(8)
247 #define AD74416H_ADC_ERR_MSK NO_OS_BIT(5)
248 #define AD74416H_TEMP_ALERT_MSK NO_OS_BIT(4)
249 #define AD74416H_SPI_ERR_MSK NO_OS_BIT(3)
250 #define AD74416H_SUPPLY_ERR_MSK NO_OS_BIT(2)
251 #define AD74416H_WDT_RESET_OCCURRED_MSK NO_OS_BIT(1)
252 #define AD74416H_RESET_OCCURRED_MSK NO_OS_BIT(0)
253 
255 #define AD74416H_ANALOG_IO_STATUS_D_MSK NO_OS_BIT(15)
256 #define AD74416H_ANALOG_IO_STATUS_C_MSK NO_OS_BIT(14)
257 #define AD74416H_ANALOG_IO_STATUS_B_MSK NO_OS_BIT(13)
258 #define AD74416H_ANALOG_IO_STATUS_A_MSK NO_OS_BIT(12)
259 #define AD74416H_DO_STATUS_D_MSK NO_OS_BIT(11)
260 #define AD74416H_DO_STATUS_C_MSK NO_OS_BIT(10)
261 #define AD74416H_DO_STATUS_B_MSK NO_OS_BIT(9)
262 #define AD74416H_DO_STATUS_A_MSK NO_OS_BIT(8)
263 #define AD74416H_DIN_STATUS_D_MSK NO_OS_BIT(7)
264 #define AD74416H_DIN_STATUS_C_MSK NO_OS_BIT(6)
265 #define AD74416H_DIN_STATUS_B_MSK NO_OS_BIT(5)
266 #define AD74416H_DIN_STATUS_A_MSK NO_OS_BIT(4)
267 #define AD74416H_TEMP_ALERT_STATUS_MSK NO_OS_BIT(3)
268 #define AD74416H_ADC_DATA_RDY_MSK NO_OS_BIT(2)
269 #define AD74416H_ADC_BUSY_MSK NO_OS_BIT(1)
270 #define AD74416H_SUPPLY_STATUS_MSK NO_OS_BIT(0)
271 
272 /* AD74416H_ADC_RESULT_UPRn Register */
273 #define AD74416H_CONV_RES_MUX_MSK NO_OS_GENMASK(15, 13)
274 #define AD74416H_CONV_RES_RANGE_MSK NO_OS_GENMASK(12, 10)
275 #define AD74416H_CONV_SEQ_COUNT_MSK NO_OS_GENAMSK(9. 8)
276 #define AD74416H_CONV_RES_UPR_MSK NO_OS_GENMASK(7, 0)
277 
278 /* AD74416H_ADC_RESULTn Register */
279 #define AD74416H_CONV_RESULT_MSK NO_OS_GENMASK(15, 0)
280 
281 /* AD74416H_ADC_DIAG_RESULTn */
282 #define AD74416H_DIAG_RESULT_MSK NO_OS_GENMASK(15, 0)
283 
284 /* AD74416H_LAST_ADC_RESULT_UPRn Register */
285 #define AD74416H_LAST_CONV_CH_MSK NO_OS_GENAMSK(10 8)
286 #define AD74416H_LAST_CONV_RES_UPR_MSK NO_OS_GENMASK(7, 0)
287 
288 /* AD74416H_ADC_RESULTn Register */
289 #define AD74416H_LAST_CONV_RES_MSK NO_OS_GENMASK(15, 0)
290 
291 /* AD74416H_DIN_COUNTER_UPRn Register */
292 #define AD74416H_DIN_CNT_UPR_MSK NO_OS_GENMASK(15, 0)
293 
294 /* AD74416H_DIN_COUNTERn Register */
295 #define AD74416H_DIN_CNT_MSK NO_OS_GENMASK(15, 0)
296 
297 /* AD74416H SUPPLY_ALERT_STATUS Register */
298 #define AD74416H_AVDD_HI_ERR_MSK NO_OS_BIT(6)
299 #define AD74416H_AVDD_LO_ERR_MSK NO_OS_BIT(5)
300 #define AD74416H_DO_VDD_ERR_MSK NO_OS_BIT(4)
301 #define AD74416H_AVCC_ERR_MSK NO_OS_BIT(3)
302 #define AD74416H_DVCC_ERR_MSK NO_OS_BIT(2)
303 #define AD74416H_AVSS_ERR_MSK NO_OS_BIT(1)
304 #define AD74416H_CAL_MEM_ERR_MSK NO_OS_BIT(0)
305 
306 /* AD74416H CHANNEL_ALERT_STATUS Register */
307 #define AD74416H_ANALOG_IO_OC_MSK NO_OS_BIT(5)
308 #define AD74416H_ANALOG_IO_SC_MSK NO_OS_BIT(4)
309 #define AD74416H_DO_TIMEOUT_MSK NO_OS_BIT(3)
310 #define AD74416H_DO_SC_MSK NO_OS_BIT(2)
311 #define AD74416H_DIN_OC_MSK NO_OS_BIT(1)
312 #define AD74416H_DIN_SC_MSK NO_OS_BIT(0)
313 
314 /* AD74416H READ_SELECT Register */
315 #define AD74416H_READBACK_ADDR_MSK NO_OS_GENMASK(8, 0)
316 
317 /* AD74416H BURST_READ_SEL Register */
318 #define AD74416H_BURST_READ_SEL_MSK NO_OS_GENMASK(15, 0)
319 
320 /* AD74416H THERM_RST Register */
321 #define AD74416H_THERM_RST_EN_MSK NO_OS_BIT(0)
322 
323 /* AD74416H CMD_KEY Register */
324 #define AD74416H_CMD_KEY_MSK NO_OS_GENMASK(15, 0)
325 
326 /* AD74416H BROADCAST_CMD_KEY Register */
327 #define AD74416H_BROADCAST_CMD_KEY_MSK NO_OS_GENMASK(15, 0)
328 
329 /* AD74416H SCRATCHn Register */
330 #define AD74416H_SCRATCH_BITS_MSK NO_OS_GENMASK(15, 0)
331 
332 /* AD74416H GENERIC_ID Register */
333 #define AD74416H_GENERIC_ID_MSK NO_OS_GENMASK(2, 0)
334 
335 /* AD74416H SILICON_REV Register */
336 #define AD74416H_SILICON_REV_ID_MSK NO_OS_GENMASK(7, 0)
337 
338 /* AD74416H SILICON_ID0 Register */
339 #define AD74416H_UID0_MSK NO_OS_GENMASK(6, 0)
340 
341 /* AD74416H SILICON_ID1 Register */
342 #define AD74416H_UID2_MSK NO_OS_GENMASK(11, 6)
343 #define AD74416H_UID1_MSK NO_OS_GENMASK(5, 0)
344 
345 /* AD74416H HART_ALERT_STATUSn Register */
346 #define AD74416H_FRM_MON_STATE_MSK NO_OS_GENMASK(15, 13)
347 #define AD74416H_EOM_MSK NO_OS_BIT(12)
348 #define AD74416H_RX_BCNT_MSK NO_OS_BIT(11)
349 #define AD74416H_RX_CMD_MSK NO_OS_BIT(10)
350 #define AD74416H_SOM_MSK NO_OS_BIT(9)
351 #define AD74416H_CD_MSK NO_OS_BIT(8)
352 #define AD74416H_CD_EDGE_DET_MSK NO_OS_BIT(7)
353 #define AD74416H_TX_COMPLETE_MSK NO_OS_BIT(6)
354 #define AD74416H_TX_FIFO_ALERT_MSK NO_OS_BIT(5)
355 #define AD74416H_RX_FIFO_ALERT_MSK NO_OS_BIT(4)
356 #define AD74416H_RX_OVERFLOW_ERR_MSK NO_OS_BIT(3)
357 #define AD74416H_FRAME_ERR_MSK NO_OS_BIT(2)
358 #define AD74416H_PARITY_ERR_MSK NO_OS_BIT(1)
359 #define AD74416H_GAP_ERR_MSK NO_OS_BIT(0)
360 
361 /* AD74416H HART_RXn Register */
362 #define AD74416H_RFGI_MSK NO_OS_BIT(11)
363 #define AD74416H_RFFE_MSK NO_OS_BIT(10)
364 #define AD74416H_RFPE_MSK NO_OS_BIT(9)
365 #define AD74416H_RFBI_MSK NO_OS_BIT(8)
366 #define AD74416H_RBR_MSK NO_OS_GENMASK(7, 0)
367 
368 /* AD74416H HART_TXn Register */
369 #define AD74416H_TDR_MSK NO_OS_GENMASK(7, 0)
370 
371 /* AD74416H HART_FCRn Register */
372 #define AD74416H_TFTRIG_MSK NO_OS_GENMASK(11, 8)
373 #define AD74416H_RFTRIG_MSK NO_OS_GENMASK(6, 3)
374 #define AD74416H_TFCLR_MSK NO_OS_BIT(2)
375 #define AD74416H_RFCLR_MSK NO_OS_BIT(1)
376 #define AD74416H_FIFOEN_MSK NO_OS_BIT(0)
377 
378 /* AD74416H HART_MCRn Register */
379 #define AD74416H_RTS_MSK NO_OS_BIT(0)
380 
381 /* AD74416H HART_RFCn Register */
382 #define AD74416H_RFC_MSK NO_OS_GENMASK(4, 0)
383 
384 /* AD74416H HART_TFCn Register */
385 #define AD74416H_TFC_MSK NO_OS_GENMASK(4, 0)
386 
387 /* AD74416H HART_CONFIGn Register */
388 #define AD74416H_CD_EXTD_QUAL_MSK NO_OS_BIT(13)
389 #define AD74416H_FRM_MON_RX_PREMX2_MSK NO_OS_BIT(12)
390 #define AD74416H_FRM_MON_RST_GAP_MSK NO_OS_BIT(11)
391 #define AD74416H_FRM_MON_RST_CD_MSK NO_OS_BIT(10)
392 #define AD74416H_RX_ALL_CHARS_MSK NO_OS_BIT(9)
393 #define AD74416H_FRM_MON_EN_MSK NO_OS_BIT(8)
394 #define AD74416H_EVENT_DET_SEL_MSK NO_OS_GENMASK(7, 6)
395 #define AD74416H_TX_1B_AFTER_RST_MSK NO_OS_BIT(5)
396 #define AD74416H_AUTO_CLR_RST_MSK NO_OS_BIT(4)
397 #define AD74416H_CD_EDGE_SEL_MSK NO_OS_GENAMSK(3, 2)
398 #define AD74416H_MODEM_DUPLEX_MSK NO_OS_BIT(1)
399 #define AD74416H_MODEM_PWRUP_MSK NO_OS_BIT(0)
400 
401 /* AD74416H HART_TX_PREMn Register */
402 #define AD74416H_TX_PREM_CNT_MSK NO_OS_GENMASK(4, 0)
403 
404 /* AD74416H HART_EVDETn Register */
405 #define AD74416H_EVENT_DET_TIME_MSK NO_OS_GENMASK(15, 0)
406 
407 /* AD74416H HART_TX_GAINn Register */
408 #define AD74416H_TX_GAIN_MSK NO_OS_GENMASK(3, 0)
409 
410 /* AD74416H HART_GPIO_IF_CONFIG Register */
411 #define AD74416H_HART_GPIO_IF_CH_MSK NO_OS_GENMASK(3, 2)
412 #define AD74416H_HART_GPIO_IF_SEL_MSK NO_OS_GENMASK(1, 0)
413 
414 /* AD74416H HART_GPIO_MON_CONFIG Register */
415 #define AD74416H_HART_GPIO_MON_CH_MSK NO_OS_GENMASK(4, 3)
416 #define AD74416H_HART_GPIO_MON_SEL_MSK NO_OS_GENMASK(2, 0)
417 
418 #define AD74416H_TEMP_OFFSET -2392
419 #define AD74416H_TEMP_SCALE 8950
420 #define AD74416H_TEMP_SCALE_DIV 1000
421 
422 #define AD74416H_FRAME_SIZE 5
423 #define AD74416H_THRESHOLD_DAC_RANGE 98
424 #define AD74416H_THRESHOLD_RANGE 30000
425 #define AD74416H_DAC_RANGE 12000
426 #define AD74416H_DAC_CURRENT_RANGE 25000
427 #define AD74416H_DAC_RESOLUTION 16
428 #define AD74414H_DAC_RESOLUTION 14
429 #define AD74116H_CONV_TIME_US 1000000
430 
431 /******************************************************************************/
432 /*************************** Types Declarations *******************************/
433 /******************************************************************************/
434 
441 };
442 
459 };
460 
470 };
471 
484 };
485 
497 };
498 
508 };
509 
516 };
517 
526 };
527 
546 };
547 
556 };
557 
566 };
567 
574 };
575 
582 };
583 
588  uint8_t SUPPLY_STATUS: 1;
589  uint8_t ADC_BUSY: 1;
590  uint8_t ADC_DATA_RDY: 1;
591  uint8_t TEMP_ALERT_STATUS: 1;
592  uint8_t DIN_STATUS_A: 1;
593  uint8_t DIN_STATUS_B: 1;
594  uint8_t DIN_STATUS_C: 1;
595  uint8_t DIN_STATUD_D: 1;
596  uint8_t DO_STATUS_A: 1;
597  uint8_t DO_STATUS_B: 1;
598  uint8_t DO_STATUS_C: 3;
599  uint8_t DO_STATUS_D: 1;
600  uint8_t ANALOG_IO_STATUS_A: 1;
601  uint8_t ANALOG_IO_STATUS_B: 1;
602  uint8_t ANALOG_IO_STATUS_C: 1;
603  uint8_t ANALOG_IO_STATUS_D: 1;
604 };
605 
611  uint16_t value;
612 };
613 
616  uint8_t dev_addr;
619 };
620 
626  bool enabled;
627  enum ad74416h_op_mode function;
630 };
631 
637  uint8_t dev_addr;
642 };
643 
644 /******************************************************************************/
645 /************************ Functions Declarations ******************************/
646 /******************************************************************************/
647 
649 int ad74416h_dac_voltage_to_code(struct ad74416h_desc *, int32_t,
650  uint16_t *, uint32_t);
651 
653 int ad74416h_dac_current_to_code(struct ad74416h_desc *, uint32_t, uint16_t *);
654 
656 int ad74416h_reg_write(struct ad74416h_desc *, uint32_t, uint16_t);
657 
659 int ad74416h_reg_read_raw(struct ad74416h_desc *, uint32_t, uint8_t *);
660 
662 int ad74416h_reg_read(struct ad74416h_desc *, uint32_t, uint16_t *);
663 
665 int ad74416h_reg_update(struct ad74416h_desc *, uint32_t, uint16_t,
666  uint16_t);
667 
669 int ad74416h_nb_active_channels(struct ad74416h_desc *, uint8_t *);
670 
675 int ad74416h_set_info(struct ad74416h_desc *desc, uint16_t mode);
676 
679  uint32_t, enum ad74416h_op_mode);
680 
682 int ad74416h_set_channel_vout_range(struct ad74416h_desc *desc, uint32_t ch,
683  enum ad74416h_vout_range vout_range);
684 
686 int ad74416h_set_channel_i_limit(struct ad74416h_desc *, uint32_t,
687  enum ad74416h_i_limit);
688 
690 int ad74416h_get_raw_adc_result(struct ad74416h_desc *, uint32_t,
691  uint32_t *);
692 
694 int ad74416h_set_adc_channel_enable(struct ad74416h_desc *, uint32_t,
695  bool);
696 
698 int ad74416h_set_diag_channel_enable(struct ad74416h_desc *, uint32_t, bool);
699 
701 int ad74416h_get_adc_range(struct ad74416h_desc *, uint32_t, uint16_t *);
702 
704 int ad74416h_set_adc_range(struct ad74416h_desc *, uint32_t,
705  enum ad74416h_adc_range);
706 
708 int ad74416h_get_adc_rate(struct ad74416h_desc *, uint32_t,
709  enum ad74416h_adc_rate *);
710 
712 int ad74416h_set_adc_rate(struct ad74416h_desc *, uint32_t,
713  enum ad74416h_adc_rate);
714 
716 int ad74416h_get_adc_conv_mux(struct ad74416h_desc *, uint32_t,
717  enum ad74416h_adc_conv_mux *);
718 
720 int ad74416h_set_adc_conv_mux(struct ad74416h_desc *, uint32_t,
721  enum ad74416h_adc_conv_mux);
722 
725 
727 int ad74416h_get_adc_single(struct ad74416h_desc *, uint32_t, uint16_t *);
728 
730 int ad74416h_get_temp(struct ad74416h_desc *, uint32_t, uint16_t *);
731 
733 int ad74416h_set_channel_dac_code(struct ad74416h_desc *, uint32_t, uint16_t);
734 
736 int ad74416h_set_diag(struct ad74416h_desc *, uint32_t,
737  enum ad74416h_diag_mode);
738 
740 int ad74416h_get_diag(struct ad74416h_desc *, uint32_t, uint16_t *);
741 
746 int ad74416h_set_debounce_mode(struct ad74416h_desc *, uint32_t,
748 
753 int ad74416h_set_debounce_time(struct ad74416h_desc *, uint32_t, uint32_t);
754 
756 int ad74416h_gpio_get(struct ad74416h_desc *, uint32_t, uint8_t *);
757 
759 int ad74416h_set_gpio_config(struct ad74416h_desc *, uint32_t,
760  enum ad74416h_gpio_select);
761 
766 int ad74416h_set_threshold(struct ad74416h_desc *, uint32_t, uint32_t);
767 
769 int ad74416h_do_set(struct ad74416h_desc *, uint32_t, uint8_t);
770 
772 int ad74416h_gpio_set(struct ad74416h_desc *, uint32_t, uint8_t);
773 
775 int ad74416h_get_live(struct ad74416h_desc *,
776  union ad74416h_live_status *);
777 
779 int ad74416h_dac_slew_enable(struct ad74416h_desc *, uint32_t,
781  enum ad74416h_lin_rate);
782 
784 int ad74416h_dac_slew_disable(struct ad74416h_desc *, uint32_t);
785 
787 int ad74416h_set_therm_rst(struct ad74416h_desc *, bool);
788 
790 int ad74416h_reset(struct ad74416h_desc *);
791 
793 int ad74416h_init(struct ad74416h_desc **, struct ad74416h_init_param *);
794 
796 int ad74416h_remove(struct ad74416h_desc *desc);
797 
798 #endif // _AD74416H_H
_ad74416h_live_status::DO_STATUS_D
uint8_t DO_STATUS_D
Definition: ad74416h.h:599
AD74416H_DIAG_ASSIGN
#define AD74416H_DIAG_ASSIGN
Definition: ad74416h.h:83
ad74416h_set_gpio_config
int ad74416h_set_gpio_config(struct ad74416h_desc *, uint32_t, enum ad74416h_gpio_select)
Set the GPIO operation mode.
Definition: ad74416h.c:797
ad74416h_set_therm_rst
int ad74416h_set_therm_rst(struct ad74416h_desc *desc, bool enable)
Enable or disable the higher thermal reset.
Definition: ad74416h.c:926
AD74416H_START_CONT
@ AD74416H_START_CONT
Definition: ad74416h.h:524
AD74416H_STEP_1_5_PERCENT
@ AD74416H_STEP_1_5_PERCENT
Definition: ad74416h.h:553
AD74416H_START_SINGLE
@ AD74416H_START_SINGLE
Definition: ad74416h.h:523
AD74416H_DIN_COMP_OUT
#define AD74416H_DIN_COMP_OUT
Definition: ad74416h.h:85
no_os_put_unaligned_be16
void no_os_put_unaligned_be16(uint16_t val, uint8_t *buf)
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
_ad74416h_live_status::ANALOG_IO_STATUS_B
uint8_t ANALOG_IO_STATUS_B
Definition: ad74416h.h:601
ad74416h_set_gpio_config
int ad74416h_set_gpio_config(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_gpio_select config)
Set the GPIO operation mode.
Definition: ad74416h.c:797
AD74416H_LIN_RATE_230KHZ4
@ AD74416H_LIN_RATE_230KHZ4
Definition: ad74416h.h:565
ad74416h_gpio_select
ad74416h_gpio_select
GPO operation modes.
Definition: ad74416h.h:464
ad74416h_get_diag
int ad74416h_get_diag(struct ad74416h_desc *, uint32_t, uint16_t *)
Get the diagnostic value for a specific channel.
Definition: ad74416h.c:717
ad74416h_channel_config::vout_range
enum ad74416h_vout_range vout_range
Definition: ad74416h.h:628
AD74416H_DIAG_DVCC
@ AD74416H_DIAG_DVCC
Definition: ad74416h.h:534
ad74416h_set_debounce_mode
int ad74416h_set_debounce_mode(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_debounce_mode mode)
Set the debounce mode for the IOx inputs when the ADC is running in digital input mode.
Definition: ad74416h.c:739
AD74416H_4K8SPS
@ AD74416H_4K8SPS
Definition: ad74416h.h:493
AD74416H_THERM_RST
#define AD74416H_THERM_RST
Definition: ad74416h.h:101
NO_OS_GENMASK
#define NO_OS_GENMASK(h, l)
Definition: no_os_util.h:86
ad74416h_reg_read
int ad74416h_reg_read(struct ad74416h_desc *desc, uint32_t addr, uint16_t *val)
Read a register's value.
Definition: ad74416h.c:222
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:165
AD74416H_DIGITAL_INPUT_LOOP
@ AD74416H_DIGITAL_INPUT_LOOP
Definition: ad74416h.h:455
ad74416h_dac_current_to_code
int ad74416h_dac_current_to_code(struct ad74416h_desc *, uint32_t, uint16_t *)
Convers a microamp value in the corresponding DAC 16 bit code.
Definition: ad74416h.c:131
ad74416h_vout_range
ad74416h_vout_range
Possible voltage output ranges for the DAC.
Definition: ad74416h.h:571
AD77416H_DEV_ADDRESS_MSK
#define AD77416H_DEV_ADDRESS_MSK
Definition: ad74416h.c:55
AD74416H_RNG_NEG104_104MV
@ AD74416H_RNG_NEG104_104MV
Definition: ad74416h.h:482
no_os_spi.h
Header file of SPI Interface.
ad74416h.h
Header file of AD74416h Driver.
ad74416h_set_diag
int ad74416h_set_diag(struct ad74416h_desc *, uint32_t, enum ad74416h_diag_mode)
Set which diagnostic value to be loaded in the DIAG_RESULT register.
Definition: ad74416h.c:693
AD74416H_FRAME_SIZE
#define AD74416H_FRAME_SIZE
Definition: ad74416h.h:422
_ad74416h_live_status::SUPPLY_STATUS
uint8_t SUPPLY_STATUS
Definition: ad74416h.h:588
ad74416h_get_adc_single
int ad74416h_get_adc_single(struct ad74416h_desc *desc, uint32_t ch, uint16_t *val)
Get a single ADC raw value for a specific channel, then power down the ADC.
Definition: ad74416h.c:514
ad74416h_set_channel_vout_range
int ad74416h_set_channel_vout_range(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_vout_range vout_range)
Set the voltage range for a specific channel.
Definition: ad74416h.c:637
AD74416H_AVDD_C
@ AD74416H_AVDD_C
Definition: ad74416h.h:545
AD74416H_VOLTAGE_IN
@ AD74416H_VOLTAGE_IN
Definition: ad74416h.h:450
AD74416H_DIAG_LDO1V8
@ AD74416H_DIAG_LDO1V8
Definition: ad74416h.h:536
_ad74416h_live_status::ADC_DATA_RDY
uint8_t ADC_DATA_RDY
Definition: ad74416h.h:590
ID_AD74416H
@ ID_AD74416H
Definition: ad74416h.h:439
ad74416h_set_debounce_time
int ad74416h_set_debounce_time(struct ad74416h_desc *, uint32_t, uint32_t)
Set the debounce settle time for the IOx inputs when the ADC is running in digital input mode.
Definition: ad74416h.c:754
ad74416h_channel_config::enabled
bool enabled
Definition: ad74416h.h:626
AD74416H_10SPS_50_60HZ_HART_REJECTION
@ AD74416H_10SPS_50_60HZ_HART_REJECTION
Definition: ad74416h.h:490
ad74416h_reg_write
int ad74416h_reg_write(struct ad74416h_desc *desc, uint32_t addr, uint16_t val)
Write a register's value.
Definition: ad74416h.c:207
no_os_delay.h
Header file of Delay functions.
_ad74416h_live_status::DIN_STATUS_B
uint8_t DIN_STATUS_B
Definition: ad74416h.h:593
AD74416H_DIAG_AVDD_HI
@ AD74416H_DIAG_AVDD_HI
Definition: ad74416h.h:537
ad74416h_reset
int ad74416h_reset(struct ad74416h_desc *)
Perform software or hardware reset and wait for device reset time.
Definition: ad74416h.c:936
AD74416H_DIN_DEBOUNCE_LEN
#define AD74416H_DIN_DEBOUNCE_LEN
Definition: ad74416h.c:54
AD74416H_GPIO_SELECT_MSK
#define AD74416H_GPIO_SELECT_MSK
Definition: ad74416h.h:210
ad74416h_get_adc_conv_mux
int ad74416h_get_adc_conv_mux(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_adc_conv_mux *val)
Get the ADC Input Node for conversion.
Definition: ad74416h.c:445
ad74416h_set_adc_conv_mux
int ad74416h_set_adc_conv_mux(struct ad74416h_desc *, uint32_t, enum ad74416h_adc_conv_mux)
Set the ADC Input Node for conversion.
Definition: ad74416h.c:466
AD74416H_CONV_SEQ_MSK
#define AD74416H_CONV_SEQ_MSK
Definition: ad74416h.h:198
_ad74416h_live_status::DIN_STATUS_C
uint8_t DIN_STATUS_C
Definition: ad74416h.h:594
ad74416h_set_threshold
int ad74416h_set_threshold(struct ad74416h_desc *desc, uint32_t ch, uint32_t threshold)
Set the threshold, for which a signal would be considered high, when the ADC is running in digital in...
Definition: ad74416h.c:812
ad74416h_debounce_mode
ad74416h_debounce_mode
Debounce modes for the IOx inputs when using the digital input op mode.
Definition: ad74416h.h:513
AD74416H_I_LIMIT_MSK
#define AD74416H_I_LIMIT_MSK
Definition: ad74416h.h:165
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:123
ad74416h_desc::spi_desc
struct no_os_spi_desc * spi_desc
Definition: ad74416h.h:638
ad74416h_init_param::reset_gpio_param
struct no_os_gpio_init_param * reset_gpio_param
Definition: ad74416h.h:618
ad74416h_init_param::id
enum ad74416h_dev_id id
Definition: ad74416h.h:615
ad74416h_adc_range
ad74416h_adc_range
Conversion range configuration values.
Definition: ad74416h.h:475
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:60
AD74416H_STEP_22_2_PERCENT
@ AD74416H_STEP_22_2_PERCENT
Definition: ad74416h.h:555
AD74416H_GPIO_CONFIG_DATA
@ AD74416H_GPIO_CONFIG_DATA
Definition: ad74416h.h:466
AD74414H_DAC_RESOLUTION
#define AD74414H_DAC_RESOLUTION
Definition: ad74416h.h:428
ad74416h_set_channel_function
int ad74416h_set_channel_function(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_op_mode ch_func)
Set the operation mode for a specific channel.
Definition: ad74416h.c:582
AD74416H_COMP_THRESH_MSK
#define AD74416H_COMP_THRESH_MSK
Definition: ad74416h.h:154
AD74416H_RNG_NEG2P5_2P5V
@ AD74416H_RNG_NEG2P5_2P5V
Definition: ad74416h.h:483
AD74416H_CURRENT_IN_LOOP
@ AD74416H_CURRENT_IN_LOOP
Definition: ad74416h.h:452
ad74416h_dac_voltage_to_code
int ad74416h_dac_voltage_to_code(struct ad74416h_desc *desc, int32_t mvolts, uint16_t *code, uint32_t ch)
Converts a millivolt value in the corresponding DAC 16 bit code.
Definition: ad74416h.c:86
AD74416H_CMD_KEY_RESET_1
#define AD74416H_CMD_KEY_RESET_1
Definition: ad74416h.h:125
AD74416H_RNG_NEG0P3125_0V
@ AD74416H_RNG_NEG0P3125_0V
Definition: ad74416h.h:479
ad74416h_init
int ad74416h_init(struct ad74416h_desc **desc, struct ad74416h_init_param *init_param)
Initialize the device structure.
Definition: ad74416h.c:997
_ad74416h_live_status::TEMP_ALERT_STATUS
uint8_t TEMP_ALERT_STATUS
Definition: ad74416h.h:591
AD74416H_GPO_DATA_MSK
#define AD74416H_GPO_DATA_MSK
Definition: ad74416h.h:208
AD74416H_DAC_RESOLUTION
#define AD74416H_DAC_RESOLUTION
Definition: ad74416h.h:427
AD74416H_DO_C
@ AD74416H_DO_C
Definition: ad74416h.h:544
ad74416h_lin_rate
ad74416h_lin_rate
Possible update rates for a DAC when slew control is enabled.
Definition: ad74416h.h:561
ad74416h_adc_rate
ad74416h_adc_rate
Conversion configuration values.
Definition: ad74416h.h:489
ad74416h_live_status::value
uint16_t value
Definition: ad74416h.h:611
NO_OS_GPIO_LOW
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:121
ad74416h_dac_voltage_to_code
int ad74416h_dac_voltage_to_code(struct ad74416h_desc *, int32_t, uint16_t *, uint32_t)
Converts a millivolt value in the corresponding DAC 16 bit code.
Definition: ad74416h.c:86
AD74416H_SLEW_LIN_STEP_MSK
#define AD74416H_SLEW_LIN_STEP_MSK
Definition: ad74416h.h:163
ad74416h_get_adc_rate
int ad74416h_get_adc_rate(struct ad74416h_desc *, uint32_t, enum ad74416h_adc_rate *)
Get the ADC Conversion Rate for a specific channel.
Definition: ad74416h.c:410
AD74416H_DIAG_TEMP
@ AD74416H_DIAG_TEMP
Definition: ad74416h.h:533
AD74416H_RNG_0_0P625V
@ AD74416H_RNG_0_0P625V
Definition: ad74416h.h:481
ad74416h_gpio_set
int ad74416h_gpio_set(struct ad74416h_desc *desc, uint32_t ch, uint8_t val)
Set the logic value of a GPO pin.
Definition: ad74416h.c:854
AD74416H_I_LIMIT0
@ AD74416H_I_LIMIT0
Definition: ad74416h.h:580
_ad74416h_live_status::ANALOG_IO_STATUS_A
uint8_t ANALOG_IO_STATUS_A
Definition: ad74416h.h:600
ad74416h_get_adc_conv_mux
int ad74416h_get_adc_conv_mux(struct ad74416h_desc *, uint32_t, enum ad74416h_adc_conv_mux *)
Get the ADC Input Node for conversion.
Definition: ad74416h.c:445
_ad74416h_live_status::DIN_STATUS_A
uint8_t DIN_STATUS_A
Definition: ad74416h.h:592
ad74416h_desc::comm_buff
uint8_t comm_buff[AD74416H_FRAME_SIZE]
Definition: ad74416h.h:639
AD74416H_DIAG_EN_MSK
#define AD74416H_DIAG_EN_MSK(x)
Definition: ad74416h.h:199
ad74416h_live_status
Used to store the live status bit fields.
Definition: ad74416h.h:609
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:132
no_os_field_prep
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
AD74416H_LIN_RATE_4KHZ8
@ AD74416H_LIN_RATE_4KHZ8
Definition: ad74416h.h:562
AD74416H_ADC_RESULT_UPR
#define AD74416H_ADC_RESULT_UPR(x)
Definition: ad74416h.h:88
ad74416h_get_adc_rate
int ad74416h_get_adc_rate(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_adc_rate *val)
Get the ADC Conversion Rate for a specific channel.
Definition: ad74416h.c:410
AD74416H_DIAG_AVCC
@ AD74416H_DIAG_AVCC
Definition: ad74416h.h:535
AD74416H_CMD_KEY
#define AD74416H_CMD_KEY
Definition: ad74416h.h:102
AD74416H_N_CHANNELS
#define AD74416H_N_CHANNELS
Definition: ad74416h.h:55
AD74416H_DEBOUNCE_MODE_1
@ AD74416H_DEBOUNCE_MODE_1
Definition: ad74416h.h:515
AD74416H_DEBOUNCE_MODE_MSK
#define AD74416H_DEBOUNCE_MODE_MSK
Definition: ad74416h.h:146
ad74416h_set_threshold
int ad74416h_set_threshold(struct ad74416h_desc *, uint32_t, uint32_t)
Set the threshold, for which a signal would be considered high, when the ADC is running in digital in...
Definition: ad74416h.c:812
no_os_error.h
Error codes definition.
_ad74416h_live_status::DO_STATUS_A
uint8_t DO_STATUS_A
Definition: ad74416h.h:596
ad74416h_get_adc_range
int ad74416h_get_adc_range(struct ad74416h_desc *, uint32_t, uint16_t *)
Get the ADC measurement range for a specific channel.
Definition: ad74416h.c:363
ad74416h_set_channel_i_limit
int ad74416h_set_channel_i_limit(struct ad74416h_desc *, uint32_t, enum ad74416h_i_limit)
Set the current limit for a specific DAC channel in vout mode.
Definition: ad74416h.c:659
AD74416H_OUTPUT_CONFIG
#define AD74416H_OUTPUT_CONFIG(x)
Definition: ad74416h.h:73
AD74416H_DIN_CONFIG0
#define AD74416H_DIN_CONFIG0(x)
Definition: ad74416h.h:71
AD74416H_DAC_RANGE
#define AD74416H_DAC_RANGE
Definition: ad74416h.h:425
ad74416h_desc::id
enum ad74416h_dev_id id
Definition: ad74416h.h:636
AD74416H_ADC_RESULT
#define AD74416H_ADC_RESULT(x)
Definition: ad74416h.h:89
ad74416h_set_diag
int ad74416h_set_diag(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_diag_mode diag_code)
Set which diagnostic value to be loaded in the DIAG_RESULT register.
Definition: ad74416h.c:693
AD74416H_CONV_RES_UPR_MSK
#define AD74416H_CONV_RES_UPR_MSK
Definition: ad74416h.h:276
_ad74416h_live_status
Bitfield struct which maps on the LIVE_STATUS register.
Definition: ad74416h.h:587
AD74416H_DIAG_AGND
@ AD74416H_DIAG_AGND
Definition: ad74416h.h:532
AD74416H_200SPS_HART_REJECTION
@ AD74416H_200SPS_HART_REJECTION
Definition: ad74416h.h:496
AD74416H_DIAG_RESULT_MSK
#define AD74416H_DIAG_RESULT_MSK
Definition: ad74416h.h:282
AD74416H_1K2SPS
@ AD74416H_1K2SPS
Definition: ad74416h.h:492
no_os_crc8_populate_msb
void no_os_crc8_populate_msb(uint8_t *table, const uint8_t polynomial)
AD74416H_STEP_0_8_PERCENT
@ AD74416H_STEP_0_8_PERCENT
Definition: ad74416h.h:552
AD74416H_TEMP_SCALE
#define AD74416H_TEMP_SCALE
Definition: ad74416h.h:419
ad74416h_desc::dev_addr
uint8_t dev_addr
Definition: ad74416h.h:637
AD74416H_SCRATCH
#define AD74416H_SCRATCH(x)
Definition: ad74416h.h:104
ad74416h_gpio_set
int ad74416h_gpio_set(struct ad74416h_desc *, uint32_t, uint8_t)
Set the logic value of a GPO pin.
Definition: ad74416h.c:854
AD74416H_LIN_RATE_76KHZ8
@ AD74416H_LIN_RATE_76KHZ8
Definition: ad74416h.h:563
AD74416H_CURRENT_OUT
@ AD74416H_CURRENT_OUT
Definition: ad74416h.h:449
AD74416H_GPIO_CONFIG
#define AD74416H_GPIO_CONFIG(x)
Definition: ad74416h.h:80
AD74416H_MUX_HF_TO_LF
@ AD74416H_MUX_HF_TO_LF
Definition: ad74416h.h:504
AD74416H_CH_FUNC_SETUP
#define AD74416H_CH_FUNC_SETUP(x)
Definition: ad74416h.h:69
AD74416H_CH_FUNC_SETUP_MSK
#define AD74416H_CH_FUNC_SETUP_MSK
Definition: ad74416h.h:133
AD74416H_MUX_AGND_TO_AGND
@ AD74416H_MUX_AGND_TO_AGND
Definition: ad74416h.h:507
AD74416H_DIAG_DO_VDD
@ AD74416H_DIAG_DO_VDD
Definition: ad74416h.h:541
AD74416H_STOP_PWR_UP
@ AD74416H_STOP_PWR_UP
Definition: ad74416h.h:522
AD74416H_THRESHOLD_RANGE
#define AD74416H_THRESHOLD_RANGE
Definition: ad74416h.h:424
AD74416H_ADC_CONFIG
#define AD74416H_ADC_CONFIG(x)
Definition: ad74416h.h:70
ad74416h_get_live
int ad74416h_get_live(struct ad74416h_desc *desc, union ad74416h_live_status *status)
Read the live status bits.
Definition: ad74416h.c:872
AD74416H_READ_SELECT
#define AD74416H_READ_SELECT
Definition: ad74416h.h:99
AD74416H_STEP_6_1_PERCENT
@ AD74416H_STEP_6_1_PERCENT
Definition: ad74416h.h:554
AD74416H_ADC_DIAG_RESULT
#define AD74416H_ADC_DIAG_RESULT(x)
Definition: ad74416h.h:90
ad74416h_set_adc_range
int ad74416h_set_adc_range(struct ad74416h_desc *, uint32_t, enum ad74416h_adc_range)
Set the ADC measurement range for a specific channel.
Definition: ad74416h.c:384
AD74416H_DIAG_ASSIGN_MSK
#define AD74416H_DIAG_ASSIGN_MSK(x)
Definition: ad74416h.h:203
AD74416H_DO_EXT_CONFIG
#define AD74416H_DO_EXT_CONFIG(x)
Definition: ad74416h.h:76
ad74416h_dac_slew_disable
int ad74416h_dac_slew_disable(struct ad74416h_desc *desc, uint32_t ch)
Disable the slew rate control.
Definition: ad74416h.c:912
AD74416H_GPIO_CONFIG_HIGH_Z
@ AD74416H_GPIO_CONFIG_HIGH_Z
Definition: ad74416h.h:465
ad74416h_gpio_get
int ad74416h_gpio_get(struct ad74416h_desc *, uint32_t, uint8_t *)
Get the GPO value for a specific channel.
Definition: ad74416h.c:776
AD74416H_DAC_CURRENT_RANGE
#define AD74416H_DAC_CURRENT_RANGE
Definition: ad74416h.h:426
_ad74416h_live_status::ANALOG_IO_STATUS_C
uint8_t ANALOG_IO_STATUS_C
Definition: ad74416h.h:602
ad74416h_set_diag_channel_enable
int ad74416h_set_diag_channel_enable(struct ad74416h_desc *desc, uint32_t ch, bool status)
Enable conversions on a diagnostic register.
Definition: ad74416h.c:349
ad74416h_do_set
int ad74416h_do_set(struct ad74416h_desc *, uint32_t, uint8_t)
Set the DO value of a channel.
Definition: ad74416h.c:841
ad74416h_reg_update
int ad74416h_reg_update(struct ad74416h_desc *desc, uint32_t addr, uint16_t mask, uint16_t val)
Update a register's field.
Definition: ad74416h.c:248
AD74416H_CH_EN_MSK
#define AD74416H_CH_EN_MSK(x)
Definition: ad74416h.h:200
AD74416H_CURRENT_IN_EXT
@ AD74416H_CURRENT_IN_EXT
Definition: ad74416h.h:451
ad74416h_dev_id
ad74416h_dev_id
Supported device ids.
Definition: ad74416h.h:438
ad74416h_set_info
int ad74416h_set_info(struct ad74416h_desc *desc, uint16_t mode)
ad74416h_reg_update
int ad74416h_reg_update(struct ad74416h_desc *, uint32_t, uint16_t, uint16_t)
Update a register's field.
Definition: ad74416h.c:248
AD74416H_LIVE_STATUS
#define AD74416H_LIVE_STATUS
Definition: ad74416h.h:87
ad74416h_get_raw_adc_result
int ad74416h_get_raw_adc_result(struct ad74416h_desc *desc, uint32_t ch, uint32_t *val)
Read the raw ADC raw conversion value.
Definition: ad74416h.c:294
AD74416H_CRC_POLYNOMIAL
#define AD74416H_CRC_POLYNOMIAL
Definition: ad74416h.c:53
_ad74416h_live_status::DO_STATUS_C
uint8_t DO_STATUS_C
Definition: ad74416h.h:598
AD74416H_TEMP_OFFSET
#define AD74416H_TEMP_OFFSET
Definition: ad74416h.h:418
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:110
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:177
ad74416h_adc_conv_mux
ad74416h_adc_conv_mux
ADC input configuration values.
Definition: ad74416h.h:502
ad74416h_i_limit
ad74416h_i_limit
DAC Current limits in Vout mode.
Definition: ad74416h.h:579
ad74416h_get_raw_adc_result
int ad74416h_get_raw_adc_result(struct ad74416h_desc *, uint32_t, uint32_t *)
Read the raw ADC raw conversion value.
Definition: ad74416h.c:294
AD74416H_GPIO_CONFIG_IN
@ AD74416H_GPIO_CONFIG_IN
Definition: ad74416h.h:467
AD74416H_HIGH_Z
@ AD74416H_HIGH_Z
Definition: ad74416h.h:447
AD74416H_MUX_LF_TO_VSENSEN
@ AD74416H_MUX_LF_TO_VSENSEN
Definition: ad74416h.h:506
AD74416H_CURRENT_OUT_HART
@ AD74416H_CURRENT_OUT_HART
Definition: ad74416h.h:456
AD74416H_RNG_NEG12_12_V
@ AD74416H_RNG_NEG12_12_V
Definition: ad74416h.h:477
ad74416h_set_adc_channel_enable
int ad74416h_set_adc_channel_enable(struct ad74416h_desc *, uint32_t, bool)
Enable/disable a specific ADC channel.
Definition: ad74416h.c:327
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
ad74416h_init_param
Definition: ad74416h.h:614
_ad74416h_live_status::ANALOG_IO_STATUS_D
uint8_t ANALOG_IO_STATUS_D
Definition: ad74416h.h:603
ad74416h_set_debounce_time
int ad74416h_set_debounce_time(struct ad74416h_desc *desc, uint32_t ch, uint32_t time)
Set the debounce settle time for the IOx inputs when the ADC is running in digital input mode.
Definition: ad74416h.c:754
ad74416h_reg_write
int ad74416h_reg_write(struct ad74416h_desc *, uint32_t, uint16_t)
Write a register's value.
Definition: ad74416h.c:207
ad74416h_set_channel_i_limit
int ad74416h_set_channel_i_limit(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_i_limit i_limit)
Set the current limit for a specific DAC channel in vout mode.
Definition: ad74416h.c:659
_ad74416h_live_status::DO_STATUS_B
uint8_t DO_STATUS_B
Definition: ad74416h.h:597
AD74416H_NOP
#define AD74416H_NOP
Definition: ad74416h.h:68
_ad74416h_live_status::ADC_BUSY
uint8_t ADC_BUSY
Definition: ad74416h.h:589
ad74416h_reg_read_raw
int ad74416h_reg_read_raw(struct ad74416h_desc *desc, uint32_t addr, uint8_t *val)
Read a raw communication frame.
Definition: ad74416h.c:176
ad74416h_set_therm_rst
int ad74416h_set_therm_rst(struct ad74416h_desc *, bool)
Enable or disable the higher thermal reset.
Definition: ad74416h.c:926
AD74416H_DIAG_AVSS
@ AD74416H_DIAG_AVSS
Definition: ad74416h.h:539
ad74416h_set_channel_function
int ad74416h_set_channel_function(struct ad74416h_desc *, uint32_t, enum ad74416h_op_mode)
Set the operation mode for a specific channel.
Definition: ad74416h.c:582
AD74416H_THRESHOLD_DAC_RANGE
#define AD74416H_THRESHOLD_DAC_RANGE
Definition: ad74416h.h:423
ad74416h_get_temp
int ad74416h_get_temp(struct ad74416h_desc *, uint32_t, uint16_t *)
Read the die's temperature from the diagnostic register.
Definition: ad74416h.c:561
ad74416h_gpio_get
int ad74416h_gpio_get(struct ad74416h_desc *desc, uint32_t ch, uint8_t *val)
Get the GPO value for a specific channel.
Definition: ad74416h.c:776
AD74416H_9K6SPS
@ AD74416H_9K6SPS
Definition: ad74416h.h:494
AD74416H_DEBOUNCE_TIME_MSK
#define AD74416H_DEBOUNCE_TIME_MSK
Definition: ad74416h.h:147
AD74416H_VOUT_RANGE_NEG12_12V
@ AD74416H_VOUT_RANGE_NEG12_12V
Definition: ad74416h.h:573
AD74416H_RNG_NEG0P3125_0P3125V
@ AD74416H_RNG_NEG0P3125_0P3125V
Definition: ad74416h.h:478
ad74416h_set_adc_channel_enable
int ad74416h_set_adc_channel_enable(struct ad74416h_desc *desc, uint32_t ch, bool status)
Enable/disable a specific ADC channel.
Definition: ad74416h.c:327
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
AD74416H_MUX_VSENSEN_TO_AGND
@ AD74416H_MUX_VSENSEN_TO_AGND
Definition: ad74416h.h:505
AD74416H_SLEW_EN_MSK
#define AD74416H_SLEW_EN_MSK
Definition: ad74416h.h:162
ad74416h_diag_mode
ad74416h_diag_mode
Possible values to be loaded in the DIAG_RESULT register.
Definition: ad74416h.h:531
ad74416h_nb_active_channels
int ad74416h_nb_active_channels(struct ad74416h_desc *desc, uint8_t *nb_channels)
Get the number of active channels.
Definition: ad74416h.c:271
ad74416h_dac_current_to_code
int ad74416h_dac_current_to_code(struct ad74416h_desc *desc, uint32_t uamps, uint16_t *code)
Convers a microamp value in the corresponding DAC 16 bit code.
Definition: ad74416h.c:131
AD74416H_MUX_LF_TO_AGND
@ AD74416H_MUX_LF_TO_AGND
Definition: ad74416h.h:503
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:51
no_os_crc8
uint8_t no_os_crc8(const uint8_t *table, const uint8_t *pdata, size_t nbytes, uint8_t crc)
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:75
ad74416h_set_diag_channel_enable
int ad74416h_set_diag_channel_enable(struct ad74416h_desc *, uint32_t, bool)
Enable conversions on a diagnostic register.
Definition: ad74416h.c:349
AD74416H_DIAG_LVIN
@ AD74416H_DIAG_LVIN
Definition: ad74416h.h:540
AD74416H_CONV_MUX_MSK
#define AD74416H_CONV_MUX_MSK
Definition: ad74416h.h:138
AD74416H_SLEW_LIN_RATE_MSK
#define AD74416H_SLEW_LIN_RATE_MSK
Definition: ad74416h.h:164
no_os_hweight8
unsigned int no_os_hweight8(uint8_t word)
AD74416H_VOUT_RANGE_0_12V
@ AD74416H_VOUT_RANGE_0_12V
Definition: ad74416h.h:572
ad74416h_get_adc_range
int ad74416h_get_adc_range(struct ad74416h_desc *desc, uint32_t ch, uint16_t *val)
Get the ADC measurement range for a specific channel.
Definition: ad74416h.c:363
ad74416h_desc::reset_gpio
struct no_os_gpio_desc * reset_gpio
Definition: ad74416h.h:641
ad74416h_get_adc_single
int ad74416h_get_adc_single(struct ad74416h_desc *, uint32_t, uint16_t *)
Get a single ADC raw value for a specific channel, then power down the ADC.
Definition: ad74416h.c:514
ad74416h_set_adc_conv_mux
int ad74416h_set_adc_conv_mux(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_adc_conv_mux val)
Set the ADC Input Node for conversion.
Definition: ad74416h.c:466
ad74416h_nb_active_channels
int ad74416h_nb_active_channels(struct ad74416h_desc *, uint8_t *)
Get the number of active channels.
Definition: ad74416h.c:271
ad74416h_get_diag
int ad74416h_get_diag(struct ad74416h_desc *desc, uint32_t ch, uint16_t *diag_code)
Get the diagnostic value for a specific channel.
Definition: ad74416h.c:717
ad74416h_set_adc_conv_seq
int ad74416h_set_adc_conv_seq(struct ad74416h_desc *desc, enum ad74416h_conv_seq status)
Start or stop ADC conversions.
Definition: ad74416h.c:489
AD74416H_VOLTAGE_OUT
@ AD74416H_VOLTAGE_OUT
Definition: ad74416h.h:448
no_os_udelay
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:120
NULL
#define NULL
Definition: wrapper.h:64
AD74416H_STOP_PWR_DOWN
@ AD74416H_STOP_PWR_DOWN
Definition: ad74416h.h:525
ad74416h_set_adc_range
int ad74416h_set_adc_range(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_adc_range val)
Set the ADC measurement range for a specific channel.
Definition: ad74416h.c:384
AD74416H_DAC_CODE_MSK
#define AD74416H_DAC_CODE_MSK
Definition: ad74416h.h:190
AD74416H_TEMP_SCALE_DIV
#define AD74416H_TEMP_SCALE_DIV
Definition: ad74416h.h:420
AD74416H_DIN_CONFIG1
#define AD74416H_DIN_CONFIG1(x)
Definition: ad74416h.h:72
AD74416H_VSENSEN_C
@ AD74416H_VSENSEN_C
Definition: ad74416h.h:543
no_os_gpio_set_value
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:203
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
AD74416H_ADC_CONV_RANGE_MSK
#define AD74416H_ADC_CONV_RANGE_MSK
Definition: ad74416h.h:137
ad74416h_set_debounce_mode
int ad74416h_set_debounce_mode(struct ad74416h_desc *, uint32_t, enum ad74416h_debounce_mode)
Set the debounce mode for the IOx inputs when the ADC is running in digital input mode.
Definition: ad74416h.c:739
AD74416H_DIN_THRESH_MODE_MSK
#define AD74416H_DIN_THRESH_MODE_MSK
Definition: ad74416h.h:153
ad74416h_channel_config
Device channel state.
Definition: ad74416h.h:625
AD74416H_GPIO_CONFIG_DO
@ AD74416H_GPIO_CONFIG_DO
Definition: ad74416h.h:469
AD74416H_20SPS_50_60HZ_REJECTION
@ AD74416H_20SPS_50_60HZ_REJECTION
Definition: ad74416h.h:491
AD74416H_CMD_KEY_RESET_2
#define AD74416H_CMD_KEY_RESET_2
Definition: ad74416h.h:126
AD74416H_RNG_0_12_V
@ AD74416H_RNG_0_12_V
Definition: ad74416h.h:476
ad74416h_get_temp
int ad74416h_get_temp(struct ad74416h_desc *desc, uint32_t ch, uint16_t *temp)
Read the die's temperature from the diagnostic register.
Definition: ad74416h.c:561
AD74416H_DO_DATA_MSK
#define AD74416H_DO_DATA_MSK
Definition: ad74416h.h:178
ad74416h_init
int ad74416h_init(struct ad74416h_desc **, struct ad74416h_init_param *)
Initialize the device structure.
Definition: ad74416h.c:997
ad74416h_set_adc_rate
int ad74416h_set_adc_rate(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_adc_rate val)
Set the ADC Conversion Rate for a specific channel.
Definition: ad74416h.c:432
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:122
AD74416H_RNG_0_0P3125V
@ AD74416H_RNG_0_0P3125V
Definition: ad74416h.h:480
AD74416H_CURRENT_IN_EXT_HART
@ AD74416H_CURRENT_IN_EXT_HART
Definition: ad74416h.h:457
ad74416h_remove
int ad74416h_remove(struct ad74416h_desc *desc)
Free the device descriptor.
Definition: ad74416h.c:1051
AD74416H_VOUT_RANGE_MSK
#define AD74416H_VOUT_RANGE_MSK
Definition: ad74416h.h:161
no_os_gpio.h
Header file of GPIO Interface.
AD74416H_DIAG_AVDD_LO
@ AD74416H_DIAG_AVDD_LO
Definition: ad74416h.h:538
AD74416H_GPIO_CONFIG_COMP
@ AD74416H_GPIO_CONFIG_COMP
Definition: ad74416h.h:468
ad74416h_get_live
int ad74416h_get_live(struct ad74416h_desc *, union ad74416h_live_status *)
Read the live status bits.
Definition: ad74416h.c:872
AD74416H_DAC_CODE
#define AD74416H_DAC_CODE(x)
Definition: ad74416h.h:78
AD74416H_VSENSEP_C
@ AD74416H_VSENSEP_C
Definition: ad74416h.h:542
AD74416H_19K2SPS
@ AD74416H_19K2SPS
Definition: ad74416h.h:495
ad74416h_init_param::dev_addr
uint8_t dev_addr
Definition: ad74416h.h:616
ad74416h_dac_slew_disable
int ad74416h_dac_slew_disable(struct ad74416h_desc *, uint32_t)
Disable the slew rate control.
Definition: ad74416h.c:912
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:58
no_os_get_unaligned_be16
uint16_t no_os_get_unaligned_be16(uint8_t *buf)
ad74416h_set_adc_conv_seq
int ad74416h_set_adc_conv_seq(struct ad74416h_desc *, enum ad74416h_conv_seq)
Start or stop ADC conversions.
Definition: ad74416h.c:489
AD74116H_CONV_TIME_US
#define AD74116H_CONV_TIME_US
Definition: ad74416h.h:429
ad74416h_channel_config::i_limit
enum ad74416h_i_limit i_limit
Definition: ad74416h.h:629
ad74416h_channel_config::function
enum ad74416h_op_mode function
Definition: ad74416h.h:627
_ad74416h_live_status::DIN_STATUD_D
uint8_t DIN_STATUD_D
Definition: ad74416h.h:595
AD74416H_DIGITAL_INPUT
@ AD74416H_DIGITAL_INPUT
Definition: ad74416h.h:454
no_os_util.h
Header file of utility functions.
ad74416h_set_adc_rate
int ad74416h_set_adc_rate(struct ad74416h_desc *, uint32_t, enum ad74416h_adc_rate)
Set the ADC Conversion Rate for a specific channel.
Definition: ad74416h.c:432
ad74416h_do_set
int ad74416h_do_set(struct ad74416h_desc *desc, uint32_t ch, uint8_t val)
Set the DO value of a channel.
Definition: ad74416h.c:841
AD74416H_ADC_CONV_RATE_MSK
#define AD74416H_ADC_CONV_RATE_MSK
Definition: ad74416h.h:136
ID_AD74414H
@ ID_AD74414H
Definition: ad74416h.h:440
ad74416h_init_param::spi_ip
struct no_os_spi_init_param spi_ip
Definition: ad74416h.h:617
ad74416h_dac_slew_enable
int ad74416h_dac_slew_enable(struct ad74416h_desc *, uint32_t, enum ad74416h_slew_lin_step, enum ad74416h_lin_rate)
Configure and enable slew rate control for a DAC on a specific channel.
Definition: ad74416h.c:886
ad74416h_set_channel_dac_code
int ad74416h_set_channel_dac_code(struct ad74416h_desc *, uint32_t, uint16_t)
Set and load a code for the DAC on a specific channel.
Definition: ad74416h.c:680
ad74416h_desc
AD74416h device descriptor.
Definition: ad74416h.h:635
no_os_gpio_direction_output
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:153
ad74416h_set_channel_vout_range
int ad74416h_set_channel_vout_range(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_vout_range vout_range)
Set the voltage range for a specific channel.
Definition: ad74416h.c:637
AD74416H_RESISTANCE
@ AD74416H_RESISTANCE
Definition: ad74416h.h:453
AD74416H_CURRENT_IN_LOOP_HART
@ AD74416H_CURRENT_IN_LOOP_HART
Definition: ad74416h.h:458
ad74416h_reg_read
int ad74416h_reg_read(struct ad74416h_desc *, uint32_t, uint16_t *)
Read a register's value.
Definition: ad74416h.c:222
ad74416h_desc::channel_configs
struct ad74416h_channel_config channel_configs[AD74416H_N_CHANNELS]
Definition: ad74416h.h:640
ad74416h_reset
int ad74416h_reset(struct ad74416h_desc *desc)
Perform software or hardware reset and wait for device reset time.
Definition: ad74416h.c:936
ad74416h_conv_seq
ad74416h_conv_seq
ADC conversion sequence commands.
Definition: ad74416h.h:521
ad74416h_set_channel_dac_code
int ad74416h_set_channel_dac_code(struct ad74416h_desc *desc, uint32_t ch, uint16_t dac_code)
Set and load a code for the DAC on a specific channel.
Definition: ad74416h.c:680
AD74416H_ADC_CONV_CTRL
#define AD74416H_ADC_CONV_CTRL
Definition: ad74416h.h:82
AD74416H_CONV_RESULT_MSK
#define AD74416H_CONV_RESULT_MSK
Definition: ad74416h.h:279
no_os_crc8.h
Header file of CRC-8 computation.
ad74416h_slew_lin_step
ad74416h_slew_lin_step
The voltage step size of Full Scale DAC Voltage.
Definition: ad74416h.h:551
NO_OS_DECLARE_CRC8_TABLE
NO_OS_DECLARE_CRC8_TABLE(_crc_table)
ad74416h_remove
int ad74416h_remove(struct ad74416h_desc *desc)
Free the device descriptor.
Definition: ad74416h.c:1051
ad74416h_op_mode
ad74416h_op_mode
Operation modes of the device.
Definition: ad74416h.h:446
AD74416H_I_LIMIT1
@ AD74416H_I_LIMIT1
Definition: ad74416h.h:581
ad74416h_reg_read_raw
int ad74416h_reg_read_raw(struct ad74416h_desc *, uint32_t, uint8_t *)
Read a raw communication frame.
Definition: ad74416h.c:176
AD74416H_LIN_RATE_153KHZ6
@ AD74416H_LIN_RATE_153KHZ6
Definition: ad74416h.h:564
AD74416H_DEBOUNCE_MODE_0
@ AD74416H_DEBOUNCE_MODE_0
Definition: ad74416h.h:514
ad74416h_live_status::status_bits
struct _ad74416h_live_status status_bits
Definition: ad74416h.h:610
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:131
ad74416h_dac_slew_enable
int ad74416h_dac_slew_enable(struct ad74416h_desc *desc, uint32_t ch, enum ad74416h_slew_lin_step step, enum ad74416h_lin_rate rate)
Configure and enable slew rate control for a DAC on a specific channel.
Definition: ad74416h.c:886
no_os_gpio_get_optional
int32_t no_os_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: no_os_gpio.c:81