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