no-OS
ad413x.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef AD413X_H_
35 #define AD413X_H_
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 #include <stdint.h>
41 #include "no_os_delay.h"
42 #include "no_os_gpio.h"
43 #include "no_os_spi.h"
44 #include "no_os_irq.h"
45 #include "no_os_util.h"
46 
47 /******************************************************************************/
48 /********************** Macros and Constants Definitions **********************/
49 /******************************************************************************/
50 #define AD413X_CMD_WR_COM_REG(x) (0x00 | ((x) & 0x3F)) // Write to Register x
51 #define AD413X_CMD_RD_COM_REG(x) (0x40 | ((x) & 0x3F)) // Read from Register x
52 
53 /*************************** ADC Register Lengths *****************************/
54 #define AD413X_R1B (1 << 8)
55 #define AD413X_R2B (2 << 8)
56 #define AD413X_R3B (3 << 8)
57 #define AD413X_TRANSF_LEN(x) (((x) >> 8) & 0xFF)
58 
59 /***************************** ADC Register Map *******************************/
60 #define AD413X_REG_STATUS (AD413X_R1B | 0x0)
61 #define AD413X_REG_ADC_CTRL (AD413X_R2B | 0x1)
62 #define AD413X_REG_DATA (AD413X_R3B | 0x2)
63 #define AD413X_REG_IO_CTRL (AD413X_R2B | 0x3)
64 #define AD413X_REG_VBIAS_CTRL (AD413X_R2B | 0x4)
65 #define AD413X_REG_ID (AD413X_R1B | 0x5)
66 #define AD413X_REG_ERROR (AD413X_R2B | 0x6)
67 #define AD413X_REG_ERROR_EN (AD413X_R2B | 0x7)
68 #define AD413X_REG_MCLK_CNT (AD413X_R1B | 0x8)
69 #define AD413X_REG_CHN(x) (AD413X_R3B | (0x09U + (x)))
70 #define AD413X_REG_CONFIG(x) (AD413X_R2B | (0x19U + (x)))
71 #define AD413X_REG_FILTER(x) (AD413X_R3B | (0x21U + (x)))
72 #define AD413X_REG_OFFSET(x) (AD413X_R3B | (0x29U + (x)))
73 #define AD413X_REG_GAIN(x) (AD413X_R3B | (0x31U + (x)))
74 #define AD413X_REG_MISC (AD413X_R2B | 0x39)
75 #define AD413X_REG_FIFO_CTRL (AD413X_R3B | 0x3A)
76 #define AD413X_REG_FIFO_STS (AD413X_R1B | 0x3B)
77 #define AD413X_REG_FIFO_THRSHLD (AD413X_R3B | 0x3C)
78 #define AD413X_REG_FIFO_DATA (AD413X_R3B | 0x3D)
79 
80 
81 /* ADC_CONTROL Register */
82 #define AD413X_ADC_BIPOLAR NO_OS_BIT(14)
83 #define AD413X_ADC_REF_VAL NO_OS_BIT(13)
84 #define AD413X_ADC_DOUT_DIS_DEL NO_OS_BIT(12)
85 #define AD413X_ADC_CONT_READ NO_OS_BIT(11)
86 #define AD413X_ADC_DATA_STATUS NO_OS_BIT(10)
87 #define AD413X_ADC_CSB_EN NO_OS_BIT(9)
88 #define AD413X_ADC_REF_EN NO_OS_BIT(8)
89 #define AD413X_ADC_DUTY_CYC_RATIO NO_OS_BIT(6)
90 #define AD413X_ADC_MODE(x) (((x) & 0xF) << 2)
91 #define AD413X_ADC_CNTRL_MCLK(x) ((x) & 0x3)
92 
93 /* IO_CONTROL Register */
94 #define AD413X_SYNCB_CLEAR NO_OS_BIT(10)
95 #define AD413X_INT_PIN_SEL(x) (((x) & 0x3) << 8)
96 #define AD413X_GPO_DATA_P4 NO_OS_BIT(7)
97 #define AD413X_GPO_DATA_P3 NO_OS_BIT(6)
98 #define AD413X_GPO_DATA_P2 NO_OS_BIT(5)
99 #define AD413X_GPO_DATA_P1 NO_OS_BIT(4)
100 #define AD413X_GPO_CTRL_P4 NO_OS_BIT(3)
101 #define AD413X_GPO_CTRL_P3 NO_OS_BIT(2)
102 #define AD413X_GPO_CTRL_P2 NO_OS_BIT(1)
103 #define AD413X_GPO_CTRL_P1 0x01
104 
105 /* VBIAS_CTRL Register */
106 #define AD413X_VBIAS_15 NO_OS_BIT(15)
107 #define AD413X_VBIAS_14 NO_OS_BIT(14)
108 #define AD413X_VBIAS_13 NO_OS_BIT(13)
109 #define AD413X_VBIAS_12 NO_OS_BIT(12)
110 #define AD413X_VBIAS_11 NO_OS_BIT(11)
111 #define AD413X_VBIAS_10 NO_OS_BIT(10)
112 #define AD413X_VBIAS_9 NO_OS_BIT(9)
113 #define AD413X_VBIAS_8 NO_OS_BIT(8)
114 #define AD413X_VBIAS_7 NO_OS_BIT(7)
115 #define AD413X_VBIAS_6 NO_OS_BIT(6)
116 #define AD413X_VBIAS_5 NO_OS_BIT(5)
117 #define AD413X_VBIAS_4 NO_OS_BIT(4)
118 #define AD413X_VBIAS_3 NO_OS_BIT(3)
119 #define AD413X_VBIAS_2 NO_OS_BIT(2)
120 #define AD413X_VBIAS_1 NO_OS_BIT(1)
121 #define AD413X_VBIAS_0 0x01
122 
123 /* ERROR Register */
124 #define AD413X_AINP_OV_UV_ERR NO_OS_BIT(11)
125 #define AD413X_AINM_OV_UV_ERR NO_OS_BIT(10)
126 #define AD413X_REF_OV_UV_ERR NO_OS_BIT(9)
127 #define AD413X_REF_DETECT_ERR NO_OS_BIT(8)
128 #define AD413X_ADC_ERR NO_OS_BIT(7)
129 #define AD413X_SPI_IGNORE_ERR NO_OS_BIT(6)
130 #define AD413X_SPI_SCLK_CNT_ERR NO_OS_BIT(5)
131 #define AD413X_SPI_READ_ERR NO_OS_BIT(4)
132 #define AD413X_SPI_WRITE_ERR NO_OS_BIT(3)
133 #define AD413X_SPI_CRC_ERR NO_OS_BIT(2)
134 #define AD413X_MM_CRC_ERR NO_OS_BIT(1)
135 #define AD413X_ROM_CRC_ERR 0x01
136 
137 /* ERROR_EN Register */
138 #define AD413X_MCLK_CNT_EN NO_OS_BIT(12)
139 #define AD413X_AINP_OV_UV_ERR_EN NO_OS_BIT(11)
140 #define AD413X_AINM_OV_UV_ERR_EN NO_OS_BIT(10)
141 #define AD413X_REF_OV_UV_ERR_EN NO_OS_BIT(9)
142 #define AD413X_REF_DETECT_ERR_EN NO_OS_BIT(8)
143 #define AD413X_ADC_ERR_EN NO_OS_BIT(7)
144 #define AD413X_SPI_IGNORE_ERR_EN NO_OS_BIT(6)
145 #define AD413X_SPI_SCLK_CNT_ERR_EN NO_OS_BIT(5)
146 #define AD413X_SPI_READ_ERR_EN NO_OS_BIT(4)
147 #define AD413X_SPI_WRITE_ERR_EN NO_OS_BIT(3)
148 #define AD413X_SPI_CRC_ERR_EN NO_OS_BIT(2)
149 #define AD413X_MM_CRC_ERR_EN NO_OS_BIT(1)
150 #define AD413X_ROM_CRC_ERR_EN 0x01
151 
152 /* CHANNEL_M Register */
153 #define AD413X_ENABLE_M NO_OS_BIT(23)
154 #define AD413X_SETUP_M(x) (((x) & 0x7) << 20)
155 #define AD413X_PDSW_M NO_OS_BIT(19)
156 #define AD413X_THRES_EN_M NO_OS_BIT(18)
157 #define AD413X_AINP_M(x) (((x) & 0x1F) << 13)
158 #define AD413X_AINM_M(x) (((x) & 0x1F) << 8)
159 #define AD413X_I_OUT1_CH_M(x) (((x) & 0xF) << 4)
160 #define AD413X_I_OUT0_CH_M(x) ((x) & 0xF)
161 #define AD413X_I_OUT_CH_MSK NO_OS_GENMASK(7,0)
162 
163 /* CONFIG_N Register */
164 #define AD413X_I_OUT1_N(x) (((x) & 0x7) << 13)
165 #define AD413X_I_OUT0_N(x) (((x) & 0x7) << 10)
166 #define AD413X_I_OUT_MSK NO_OS_GENMASK(15,10)
167 #define AD413X_BURNOUT_N(x) (((x) & 0x3) << 8)
168 #define AD413X_REF_BUF_MSK NO_OS_GENMASK(7,6)
169 #define AD413X_REF_BUFP_N NO_OS_BIT(7)
170 #define AD413X_REF_BUFM_N NO_OS_BIT(6)
171 #define AD413X_REF_SEL_N(x) (((x) & 0x3) << 4)
172 #define AD413X_PGA_N(x) (((x) & 0x7) << 1)
173 #define AD413X_PGA_BYP_N 0x01
174 
175 /* FILTER_N Register */
176 #define AD413X_SETTLE_N(x) (((x) & 0x7) << 21)
177 #define AD413X_REPEAT_N(x) (((x) & 0x1F) << 16)
178 #define AD413X_FILTER_MODE_N(x) (((x) & 0xF) << 12)
179 #define AD413X_FS_N(x) ((x) & 0x7FF)
180 
181 /* OFFSET_N Register */
182 #define AD413X_OFFSET_N(x) ((x) & 0xFFFFFF)
183 
184 /* GAIN_N Register */
185 #define AD413X_GAIN_N(x) ((x) & 0xFFFFFF)
186 
187 /* MISC Register */
188 #define AD413X_BYPASS_OSC NO_OS_BIT(15)
189 #define AD413X_PD_ALDO NO_OS_BIT(14)
190 #define AD413X_CAL_RANGE_X2 NO_OS_BIT(13)
191 #define AD413X_RESERVED(x) (((x) & 0xF) << 9)
192 #define AD413X_STBY_CTRL_MSK NO_OS_GENMASK(8,0)
193 #define AD413X_STBY_OUT_EN NO_OS_BIT(8)
194 #define AD413X_STBY_DIAGNOSTICS_EN NO_OS_BIT(7)
195 #define AD413X_STBY_GPO_EN NO_OS_BIT(6)
196 #define AD413X_STBY_PDSW_EN NO_OS_BIT(5)
197 #define AD413X_STBY_BURNOUT_EN NO_OS_BIT(4)
198 #define AD413X_STBY_VBIAS_EN NO_OS_BIT(3)
199 #define AD413X_STBY_IEXC_EN NO_OS_BIT(2)
200 #define AD413X_STBY_REFHOL_EN NO_OS_BIT(1)
201 #define AD413X_STBY_INTREF_EN 0x01
202 
203 /* FIFO_CONTROL Register */
204 #define AD413X_ADD_FIFO_STATUS NO_OS_BIT(19)
205 #define AD413X_ADD_FIFO_HEADER NO_OS_BIT(18)
206 #define AD413X_FIFO_MODE(x) (((x) & 0x3) << 16)
207 #define AD413X_FIFO_WRITE_ERR_INT_EN NO_OS_BIT(14)
208 #define AD413X_FIFO_READ_ERR_INT_EN NO_OS_BIT(13)
209 #define AD413X_THRES_HIGH_INT_EN NO_OS_BIT(12)
210 #define AD413X_THRES_LOW_INT_EN NO_OS_BIT(11)
211 #define AD413X_OVERRUN_INT_EN NO_OS_BIT(10)
212 #define AD413X_WATERMARK_INT_EN NO_OS_BIT(9)
213 #define AD413X_EMPTY_INT_EN NO_OS_BIT(8)
214 #define AD413X_WATERMARK(x) ((x) & 0xFF)
215 
216 /* FIFO_STATUS Register */
217 #define AD413X_MASTER_ERR NO_OS_BIT(7)
218 #define AD413X_FIFO_WRITE_ERR NO_OS_BIT(6)
219 #define AD413X_FIFO_READ_ERR NO_OS_BIT(5)
220 #define AD413X_THRES_HIGH_FLAG NO_OS_BIT(4)
221 #define AD413X_THRES_LOW_FLAG NO_OS_BIT(3)
222 #define AD413X_OVERRUN_FLAG NO_OS_BIT(2)
223 #define AD413X_WATERMARK_FLAG NO_OS_BIT(1)
224 #define AD413X_EMPTY_FLAG 0x01
225 
226 /* FIFO_THRESHOLD Register */
227 #define AD413X_THRES_HIGH_VAL(x) (((x) & 0xFFF) << 12)
228 #define AD413X_THRES_LOW_VAL(x) ((x) & 0xFFF)
229 
230 /* 8-bits wide checksum generated using the polynomial */
231 #define AD413X_CRC8_POLY 0x07 // x^8 + x^2 + x^1 + x^0
232 
233 #define ENABLE 1U
234 #define DISABLE 0U
235 
236 /******************************************************************************/
237 /*************************** Types Declarations *******************************/
238 /******************************************************************************/
274 };
275 
289 };
290 
300 };
301 
319 };
320 
328 };
329 
339 };
340 
349 };
350 
365 };
366 
380 };
381 
387  AD4130_8 = 0x04
388 };
389 
403 };
404 
418 };
419 
434 };
435 
445  /* By default, settle time = 32MCLK */
449 };
450 
457  uint8_t enable;
462  bool pdsw_en;
463 };
464 
469 struct ad413x_dev {
470  /* SPI */
472  /* GPIO - used to know when conversion is rdy */
474  /* Device Settings */
476  struct ad413x_channel ch[16];
480  uint8_t bipolar;
482  uint16_t v_bias;
484  uint8_t data_stat;
485  uint8_t spi_crc_en;
486 };
487 
493  /* SPI */
495  /* GPIO - used to know when conversion is rdy */
497  /* Device Settings */
499  struct ad413x_channel ch[16];
502  uint8_t bipolar;
504  uint16_t v_bias;
506  uint8_t data_stat;
507  uint8_t spi_crc_en;
508 };
509 
515  struct ad413x_dev *dev;
516  uint32_t *buffer;
517  uint32_t buffer_size;
518 };
519 
520 /******************************************************************************/
521 /************************ Functions Declarations ******************************/
522 /******************************************************************************/
523 /* SPI write to device using a mask. */
524 int32_t ad413x_reg_write_msk(struct ad413x_dev *dev,
525  uint32_t reg_addr,
526  uint32_t data,
527  uint32_t mask);
528 
529 /* Set the mode of the ADC. */
530 int32_t ad413x_set_adc_mode(struct ad413x_dev *dev, enum ad413x_adc_mode mode);
531 
532 /* Set the internal reference. */
533 int32_t ad413x_set_int_ref(struct ad413x_dev *dev, enum ad413x_int_ref int_ref);
534 
535 /* Enable/disable DATA_STAT. */
536 int32_t ad413x_data_stat_en(struct ad413x_dev *dev, uint8_t enable);
537 
538 /* Set the gain. */
539 int32_t ad413x_set_gain(struct ad413x_dev *dev, enum ad413x_gain gain,
540  enum ad413x_preset_nb reg_nb);
541 
542 /* Set the reference. */
543 int32_t ad413x_set_ref(struct ad413x_dev *dev, enum ad413x_ref_sel ref,
544  enum ad413x_preset_nb reg_nb);
545 
546 /* Set the reference buffers */
547 int32_t ad413x_set_ref_buf(struct ad413x_dev *dev,
548  struct ad413x_ref_buf ref_buf,
549  enum ad413x_preset_nb reg_nb);
550 
551 /* Set the filter */
552 int32_t ad413x_set_filter(struct ad413x_dev *dev, enum ad413x_filter filter,
553  enum ad413x_preset_nb reg_nb);
554 
555 /* Set settle time */
556 int32_t ad413x_set_settle_time(struct ad413x_dev *dev,
557  enum ad413x_settle_time s_time,
558  enum ad413x_preset_nb reg_nb);
559 
560 /* Set excitation currents */
561 int32_t ad413x_set_exc_current(struct ad413x_dev *dev,
562  enum ad413x_exc_current iout0_exc,
563  enum ad413x_exc_current iout1_exc,
564  enum ad413x_preset_nb reg_nb);
565 
566 /* Set excitation source pins */
567 int32_t ad413x_ch_exc_input(struct ad413x_dev *dev, uint8_t ch_nb,
568  enum ad413x_input iout0_exc_inp,
569  enum ad413x_input iout1_exc_inp);
570 
571 /* Set channel preset */
572 int32_t ad413x_set_ch_preset(struct ad413x_dev *dev, uint8_t ch_nb,
573  enum ad413x_preset_nb preset_nb);
574 
575 /* Enable channel */
576 int32_t ad413x_ch_en(struct ad413x_dev *dev, uint8_t ch_nb, uint8_t enable);
577 
578 /* Enable PDSW */
579 int32_t ad413x_pdsw_en(struct ad413x_dev *dev, uint8_t ch_nb, bool pdsw_en);
580 
581 /* Set output VBIAS */
582 int32_t ad413x_set_v_bias(struct ad413x_dev *dev, uint16_t v_bias_val);
583 
584 /* Set standby control flags */
585 int32_t ad413x_set_standby_ctrl(struct ad413x_dev *dev,
587 
588 /* Set ADC master clock mode. */
589 int32_t ad413x_set_mclk(struct ad413x_dev *dev, enum ad413x_mclk_sel clk);
590 
591 /* Do a SPI software reset. */
592 int32_t ad413x_do_soft_reset(struct ad413x_dev *dev);
593 
594 /* SPI internal register write to device. */
595 int32_t ad413x_reg_write(struct ad413x_dev *dev,
596  uint32_t reg_addr,
597  uint32_t reg_data);
598 
599 /* SPI internal register read from device. */
600 int32_t ad413x_reg_read(struct ad413x_dev *dev,
601  uint32_t reg_addr,
602  uint32_t *reg_data);
603 
604 /* Fills buffer with data read from each active channel */
605 int32_t ad413x_single_conv(struct ad413x_dev *dev, uint32_t *buffer,
606  uint8_t ch_nb);
607 
608 /* Fills buffer with data from continuous conv mode from each active channel */
609 int32_t ad413x_continuous_conv(struct ad413x_dev *dev, uint32_t *buffer,
610  uint8_t ch_nb, uint32_t sample_nb);
611 
612 /* Set adc bipolar/unipolar coding. */
613 int32_t ad413x_adc_bipolar(struct ad413x_dev *dev, uint8_t enable);
614 
615 /* Store presets for adc channels */
616 int32_t ad413x_preset_store(struct ad413x_dev *dev, struct ad413x_preset preset,
617  enum ad413x_preset_nb preset_nb);
618 
619 /* Initialize the device. */
620 int32_t ad413x_init(struct ad413x_dev **device,
622 
623 /* Remove the device. */
624 int32_t ad413x_remove(struct ad413x_dev *dev);
625 
626 #endif // AD413X_H_
ad413x_set_v_bias
int32_t ad413x_set_v_bias(struct ad413x_dev *dev, uint16_t v_bias_val)
Definition: ad413x.c:535
ad413x_set_gain
int32_t ad413x_set_gain(struct ad413x_dev *dev, enum ad413x_gain gain, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:210
ad413x_init_param::chip_id
enum ad413x_chip_id chip_id
Definition: ad413x.h:500
AD413X_STANDBY_MODE
@ AD413X_STANDBY_MODE
Definition: ad413x.h:309
ad413x_dev::spi_dev
struct no_os_spi_desc * spi_dev
Definition: ad413x.h:471
AD413X_ADC_REF_EN
#define AD413X_ADC_REF_EN
Definition: ad413x.h:88
AD413X_REG_ID
#define AD413X_REG_ID
Definition: ad413x.h:65
timeout
uint32_t timeout
Definition: ad413x.c:49
ad413x_set_mclk
int32_t ad413x_set_mclk(struct ad413x_dev *dev, enum ad413x_mclk_sel clk)
Definition: ad413x.c:603
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
ad413x_set_int_ref
int32_t ad413x_set_int_ref(struct ad413x_dev *dev, enum ad413x_int_ref int_ref)
Definition: ad413x.c:121
AD413X_REF_BUFM_N
#define AD413X_REF_BUFM_N
Definition: ad413x.h:170
ad413x_channel::preset
enum ad413x_preset_nb preset
Definition: ad413x.h:456
AD413X_STBY_CTRL_MSK
#define AD413X_STBY_CTRL_MSK
Definition: ad413x.h:192
AD413X_ADC_MODE
#define AD413X_ADC_MODE(x)
Definition: ad413x.h:90
ad413x_init_param
Initial parameter structure.
Definition: ad413x.h:492
ad413x_dev::chip_id
enum ad413x_chip_id chip_id
Definition: ad413x.h:477
AD413X_AIN12
@ AD413X_AIN12
Definition: ad413x.h:256
AD413X_INTREF_DISABLED
@ AD413X_INTREF_DISABLED
Definition: ad413x.h:346
ad413x_preset::gain
enum ad413x_gain gain
Definition: ad413x.h:443
AD413X_DLDO_DGND_6M
@ AD413X_DLDO_DGND_6M
Definition: ad413x.h:271
ad413x_set_ch_preset
int32_t ad413x_set_ch_preset(struct ad413x_dev *dev, uint8_t ch_nb, enum ad413x_preset_nb preset_nb)
Definition: ad413x.c:405
AD413X_EXC_20UA
@ AD413X_EXC_20UA
Definition: ad413x.h:412
AD413X_SYNC4_SYNC1
@ AD413X_SYNC4_SYNC1
Definition: ad413x.h:357
ad413x_input
ad413x_input
ADC input sources for each channel.
Definition: ad413x.h:243
AD413X_GAIN_128
@ AD413X_GAIN_128
Definition: ad413x.h:379
AD413X_STBY_PDSW_EN
#define AD413X_STBY_PDSW_EN
Definition: ad413x.h:196
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
AD413X_ADC_CNTRL_MCLK
#define AD413X_ADC_CNTRL_MCLK(x)
Definition: ad413x.h:91
AD413X_CRC8_POLY
#define AD413X_CRC8_POLY
Definition: ad413x.h:231
ad413x_ch_en
int32_t ad413x_ch_en(struct ad413x_dev *dev, uint8_t ch_nb, uint8_t enable)
Definition: ad413x.c:461
AD413X_I_OUT1_N
#define AD413X_I_OUT1_N(x)
Definition: ad413x.h:164
AD413X_SYNC3_SYNC1
@ AD413X_SYNC3_SYNC1
Definition: ad413x.h:360
ad413x_set_filter
int32_t ad413x_set_filter(struct ad413x_dev *dev, enum ad413x_filter filter, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:306
ad413x_reg_write_msk
int32_t ad413x_reg_write_msk(struct ad413x_dev *dev, uint32_t reg_addr, uint32_t data, uint32_t mask)
Definition: ad413x.c:65
AD413X_EXC_100UA
@ AD413X_EXC_100UA
Definition: ad413x.h:414
ad413x_channel::iout0_exc_input
enum ad413x_input iout0_exc_input
Definition: ad413x.h:460
no_os_spi.h
Header file of SPI Interface.
AD413X_GAIN_8
@ AD413X_GAIN_8
Definition: ad413x.h:375
no_os_irq.h
Header file of IRQ interface.
AD413X_GAIN_64
@ AD413X_GAIN_64
Definition: ad413x.h:378
AD413X_EXC_150UA
@ AD413X_EXC_150UA
Definition: ad413x.h:415
ad413x_preset::filter
enum ad413x_filter filter
Definition: ad413x.h:444
ad413x_dev::preset
struct ad413x_preset preset[8]
Definition: ad413x.h:475
ad413x_callback_ctx::buffer
uint32_t * buffer
Definition: ad413x.h:516
ad413x_channel::pdsw_en
bool pdsw_en
Definition: ad413x.h:462
no_os_gpio_get_value
int32_t no_os_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: no_os_gpio.c:221
ad413x_set_settle_time
int32_t ad413x_set_settle_time(struct ad413x_dev *dev, enum ad413x_settle_time s_time, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:340
ad413x_data_stat_en
int32_t ad413x_data_stat_en(struct ad413x_dev *dev, uint8_t enable)
Definition: ad413x.c:179
pr_err
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
AD413X_CONTINOUS_CONV_MODE
@ AD413X_CONTINOUS_CONV_MODE
Definition: ad413x.h:307
AD413X_PRESET_0
@ AD413X_PRESET_0
Definition: ad413x.h:281
AD413X_PW_DOWN_MODE
@ AD413X_PW_DOWN_MODE
Definition: ad413x.h:310
ad413x_do_soft_reset
int32_t ad413x_do_soft_reset(struct ad413x_dev *dev)
Definition: ad413x.c:625
AD413X_SETTLE_N
#define AD413X_SETTLE_N(x)
Definition: ad413x.h:176
AD413X_SINGLE_CONV_MODE
@ AD413X_SINGLE_CONV_MODE
Definition: ad413x.h:308
no_os_delay.h
Header file of Delay functions.
AD413X_GAIN_16
@ AD413X_GAIN_16
Definition: ad413x.h:376
AD413X_DLDO_DGND_6P
@ AD413X_DLDO_DGND_6P
Definition: ad413x.h:270
ad413x_preset::ref_sel
enum ad413x_ref_sel ref_sel
Definition: ad413x.h:442
AD413X_FILTER_MODE_N
#define AD413X_FILTER_MODE_N(x)
Definition: ad413x.h:178
AD413X_2048_MCLK
@ AD413X_2048_MCLK
Definition: ad413x.h:401
ad413x_adc_bipolar
int32_t ad413x_adc_bipolar(struct ad413x_dev *dev, uint8_t enable)
Definition: ad413x.c:511
pr_info
#define pr_info(fmt, args...)
Definition: no_os_print_log.h:115
ad413x_set_gain
int32_t ad413x_set_gain(struct ad413x_dev *dev, enum ad413x_gain gain, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:210
AD413X_REG_CHN
#define AD413X_REG_CHN(x)
Definition: ad413x.h:69
ad413x_standby_ctrl::standby_vbias_en
bool standby_vbias_en
Definition: ad413x.h:428
AD413X_SINGLE_CONV_SYNC_IDLE_MODE
@ AD413X_SINGLE_CONV_SYNC_IDLE_MODE
Definition: ad413x.h:317
ad413x_ch_exc_input
int32_t ad413x_ch_exc_input(struct ad413x_dev *dev, uint8_t ch_nb, enum ad413x_input iout0_exc_inp, enum ad413x_input iout1_exc_inp)
Definition: ad413x.c:432
ad413x_standby_ctrl::standby_burnout_en
bool standby_burnout_en
Definition: ad413x.h:429
AD413X_INT_REF
@ AD413X_INT_REF
Definition: ad413x.h:262
AD413X_DUTY_CYCLING_SYNC_STBY_MODE
@ AD413X_DUTY_CYCLING_SYNC_STBY_MODE
Definition: ad413x.h:318
ad413x_standby_ctrl::standby_gpio_en
bool standby_gpio_en
Definition: ad413x.h:431
device
Definition: ad9361_util.h:69
ad413x_set_mclk
int32_t ad413x_set_mclk(struct ad413x_dev *dev, enum ad413x_mclk_sel clk)
Definition: ad413x.c:603
AD413X_REG_STATUS
#define AD413X_REG_STATUS
Definition: ad413x.h:60
AD413X_AINM_M
#define AD413X_AINM_M(x)
Definition: ad413x.h:158
ad413x_preset_store
int32_t ad413x_preset_store(struct ad413x_dev *dev, struct ad413x_preset preset, enum ad413x_preset_nb preset_nb)
Definition: ad413x.c:870
no_os_print_log.h
Print messages helpers.
AD413X_INT_76_8_KHZ_OUT_OFF
@ AD413X_INT_76_8_KHZ_OUT_OFF
Definition: ad413x.h:296
AD413X_EXC_OFF
@ AD413X_EXC_OFF
Definition: ad413x.h:410
ad413x_set_filter
int32_t ad413x_set_filter(struct ad413x_dev *dev, enum ad413x_filter filter, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:306
AD413X_REF_BUFP_N
#define AD413X_REF_BUFP_N
Definition: ad413x.h:169
ad413x_reg_write_msk
int32_t ad413x_reg_write_msk(struct ad413x_dev *dev, uint32_t reg_addr, uint32_t data, uint32_t mask)
Definition: ad413x.c:65
ad413x_gain
ad413x_gain
Gain options.
Definition: ad413x.h:371
AD413X_EXC_50UA
@ AD413X_EXC_50UA
Definition: ad413x.h:413
AD413X_CMD_WR_COM_REG
#define AD413X_CMD_WR_COM_REG(x)
Definition: ad413x.h:50
no_os_gpio_direction_input
int32_t no_os_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: no_os_gpio.c:124
AD413X_SYNC3_PF2
@ AD413X_SYNC3_PF2
Definition: ad413x.h:362
AD413X_EXT_153_6_KHZ_DIV_2
@ AD413X_EXT_153_6_KHZ_DIV_2
Definition: ad413x.h:299
ad413x_init_param::v_bias
uint16_t v_bias
Definition: ad413x.h:504
AD413X_SYNC3_REJ60
@ AD413X_SYNC3_REJ60
Definition: ad413x.h:359
ad413x_ref_buf
ADC reference buffer selection.
Definition: ad413x.h:325
ad413x_set_ref_buf
int32_t ad413x_set_ref_buf(struct ad413x_dev *dev, struct ad413x_ref_buf ref_buf, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:266
AD413X_AVSS
@ AD413X_AVSS
Definition: ad413x.h:261
AD413X_I_OUT_MSK
#define AD413X_I_OUT_MSK
Definition: ad413x.h:166
AD413X_AIN3
@ AD413X_AIN3
Definition: ad413x.h:247
AD413X_REFOUT_AVSS
@ AD413X_REFOUT_AVSS
Definition: ad413x.h:337
AD413X_IOVDD_DGND_6P
@ AD413X_IOVDD_DGND_6P
Definition: ad413x.h:266
AD413X_GAIN_2
@ AD413X_GAIN_2
Definition: ad413x.h:373
ad413x_init_param::rdy_pin_init
struct no_os_gpio_init_param * rdy_pin_init
Definition: ad413x.h:496
ad413x_dev::rdy_pin_desc
struct no_os_gpio_desc * rdy_pin_desc
Definition: ad413x.h:473
ad413x_set_adc_mode
int32_t ad413x_set_adc_mode(struct ad413x_dev *dev, enum ad413x_adc_mode mode)
Definition: ad413x.c:95
ad413x_preset
Preset setting.
Definition: ad413x.h:440
AD413X_PRESET_7
@ AD413X_PRESET_7
Definition: ad413x.h:288
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
no_os_field_prep
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
AD413X_GAIN_32
@ AD413X_GAIN_32
Definition: ad413x.h:377
AD413X_PRESET_2
@ AD413X_PRESET_2
Definition: ad413x.h:283
AD413X_AIN15
@ AD413X_AIN15
Definition: ad413x.h:259
no_os_error.h
Error codes definition.
ad413x_data_stat_en
int32_t ad413x_data_stat_en(struct ad413x_dev *dev, uint8_t enable)
Definition: ad413x.c:179
ad413x_single_conv
int32_t ad413x_single_conv(struct ad413x_dev *dev, uint32_t *buffer, uint8_t ch_nb)
Definition: ad413x.c:766
ad413x.h
Header file of AD413X Driver.
AD413X_AVDD_AVSS_6M
@ AD413X_AVDD_AVSS_6M
Definition: ad413x.h:265
AD413X_STBY_BURNOUT_EN
#define AD413X_STBY_BURNOUT_EN
Definition: ad413x.h:197
AD413X_REG_ERROR_EN
#define AD413X_REG_ERROR_EN
Definition: ad413x.h:67
AD413X_512_MCLK
@ AD413X_512_MCLK
Definition: ad413x.h:399
AD413X_ADC_DATA_STATUS
#define AD413X_ADC_DATA_STATUS
Definition: ad413x.h:86
AD413X_AIN6
@ AD413X_AIN6
Definition: ad413x.h:250
no_os_crc8_populate_msb
void no_os_crc8_populate_msb(uint8_t *table, const uint8_t polynomial)
AD413X_STBY_OUT_EN
#define AD413X_STBY_OUT_EN
Definition: ad413x.h:193
ad413x_dev::mclk
enum ad413x_mclk_sel mclk
Definition: ad413x.h:478
AD413X_ADC_REF_VAL
#define AD413X_ADC_REF_VAL
Definition: ad413x.h:83
ad413x_adc_bipolar
int32_t ad413x_adc_bipolar(struct ad413x_dev *dev, uint8_t enable)
Definition: ad413x.c:511
AD413X_REG_VBIAS_CTRL
#define AD413X_REG_VBIAS_CTRL
Definition: ad413x.h:64
AD413X_INTREF_1_25V
@ AD413X_INTREF_1_25V
Definition: ad413x.h:348
ad413x_callback_ctx::dev
struct ad413x_dev * dev
Definition: ad413x.h:515
AD413X_128_MCLK
@ AD413X_128_MCLK
Definition: ad413x.h:397
ad413x_single_conv
int32_t ad413x_single_conv(struct ad413x_dev *dev, uint32_t *buffer, uint8_t ch_nb)
Definition: ad413x.c:766
ad413x_dev::ch
struct ad413x_channel ch[16]
Definition: ad413x.h:476
ad413x_init_param::ch
struct ad413x_channel ch[16]
Definition: ad413x.h:499
ad413x_ref_buf::ref_buf_p_en
bool ref_buf_p_en
Definition: ad413x.h:326
AD413X_SETUP_M
#define AD413X_SETUP_M(x)
Definition: ad413x.h:154
ad413x_dev::int_ref
enum ad413x_int_ref int_ref
Definition: ad413x.h:481
ad413x_continuous_conv
int32_t ad413x_continuous_conv(struct ad413x_dev *dev, uint32_t *buffer, uint8_t ch_nb, uint32_t sample_nb)
Definition: ad413x.c:818
ad413x_standby_ctrl::standby_iexc_en
bool standby_iexc_en
Definition: ad413x.h:427
AD413X_I_OUT1_CH_M
#define AD413X_I_OUT1_CH_M(x)
Definition: ad413x.h:159
ad413x_pdsw_en
int32_t ad413x_pdsw_en(struct ad413x_dev *dev, uint8_t ch_nb, bool pdsw_en)
Definition: ad413x.c:486
AD413X_ALDO_AVSS_6P
@ AD413X_ALDO_AVSS_6P
Definition: ad413x.h:268
AD413X_REG_MISC
#define AD413X_REG_MISC
Definition: ad413x.h:74
ad413x_mclk_sel
ad413x_mclk_sel
Master clock options.
Definition: ad413x.h:295
AD413X_AIN7
@ AD413X_AIN7
Definition: ad413x.h:251
ad413x_channel
Channel setting.
Definition: ad413x.h:455
ad413x_init_param::preset
struct ad413x_preset preset[8]
Definition: ad413x.h:498
ad413x_channel::ain_m
enum ad413x_input ain_m
Definition: ad413x.h:459
ad413x_standby_ctrl::standby_ref_holder_en
bool standby_ref_holder_en
Definition: ad413x.h:426
ad413x_set_settle_time
int32_t ad413x_set_settle_time(struct ad413x_dev *dev, enum ad413x_settle_time s_time, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:340
ad413x_dev::spi_crc_en
uint8_t spi_crc_en
Definition: ad413x.h:485
ad413x_standby_ctrl::standby_int_ref_en
bool standby_int_ref_en
Definition: ad413x.h:425
AD413X_AIN2
@ AD413X_AIN2
Definition: ad413x.h:246
ad413x_init_param::bipolar
uint8_t bipolar
Definition: ad413x.h:502
ad413x_preset::iout0_exc_current
enum ad413x_exc_current iout0_exc_current
Definition: ad413x.h:447
ad413x_preset::iout1_exc_current
enum ad413x_exc_current iout1_exc_current
Definition: ad413x.h:448
AD413X_4096_MCLK
@ AD413X_4096_MCLK
Definition: ad413x.h:402
ad413x_init_param::data_stat
uint8_t data_stat
Definition: ad413x.h:506
AD413X_I_OUT0_CH_M
#define AD413X_I_OUT0_CH_M(x)
Definition: ad413x.h:160
AD413X_CMD_RD_COM_REG
#define AD413X_CMD_RD_COM_REG(x)
Definition: ad413x.h:51
ad413x_ref_buf::ref_buf_m_en
bool ref_buf_m_en
Definition: ad413x.h:327
AD413X_ENABLE_M
#define AD413X_ENABLE_M
Definition: ad413x.h:153
ad413x_exc_current
ad413x_exc_current
Excitation current value.
Definition: ad413x.h:409
AD413X_INT_GAIN_CAL
@ AD413X_INT_GAIN_CAL
Definition: ad413x.h:313
AD413X_1024_MCLK
@ AD413X_1024_MCLK
Definition: ad413x.h:400
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
ad413x_reg_write
int32_t ad413x_reg_write(struct ad413x_dev *dev, uint32_t reg_addr, uint32_t reg_data)
Definition: ad413x.c:650
ad413x_set_ref
int32_t ad413x_set_ref(struct ad413x_dev *dev, enum ad413x_ref_sel ref, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:240
ad413x_init_param::mclk
enum ad413x_mclk_sel mclk
Definition: ad413x.h:501
AD413X_REG_ADC_CTRL
#define AD413X_REG_ADC_CTRL
Definition: ad413x.h:61
ad413x_reg_read
int32_t ad413x_reg_read(struct ad413x_dev *dev, uint32_t reg_addr, uint32_t *reg_data)
Definition: ad413x.c:695
ad413x_remove
int32_t ad413x_remove(struct ad413x_dev *dev)
Free the resources allocated by ad413x_init().
Definition: ad413x.c:1073
AD413X_REFIN1
@ AD413X_REFIN1
Definition: ad413x.h:335
AD413X_AIN11
@ AD413X_AIN11
Definition: ad413x.h:255
ad4110_dev::gain
enum ad4110_gain gain
Definition: ad4110.h:312
AD413X_REG_CONFIG
#define AD413X_REG_CONFIG(x)
Definition: ad413x.h:70
AD413X_PRESET_1
@ AD413X_PRESET_1
Definition: ad413x.h:282
ad413x_preset_store
int32_t ad413x_preset_store(struct ad413x_dev *dev, struct ad413x_preset preset, enum ad413x_preset_nb preset_nb)
Definition: ad413x.c:870
AD413X_I_OUT0_N
#define AD413X_I_OUT0_N(x)
Definition: ad413x.h:165
AD413X_TEMP
@ AD413X_TEMP
Definition: ad413x.h:260
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
ad413x_standby_ctrl::standby_output_en
bool standby_output_en
Definition: ad413x.h:433
AD413X_SYNC3_PF4
@ AD413X_SYNC3_PF4
Definition: ad413x.h:364
AD413X_DUTY_CYCLING_MODE
@ AD413X_DUTY_CYCLING_MODE
Definition: ad413x.h:316
ad413x_ref_sel
ad413x_ref_sel
ADC reference selection.
Definition: ad413x.h:334
AD413X_AINP_M
#define AD413X_AINP_M(x)
Definition: ad413x.h:157
AD413X_GAIN_1
@ AD413X_GAIN_1
Definition: ad413x.h:372
AD413X_EXT_76_8KHZ
@ AD413X_EXT_76_8KHZ
Definition: ad413x.h:298
AD413X_SYNC3_STANDALONE
@ AD413X_SYNC3_STANDALONE
Definition: ad413x.h:358
ad413x_callback_ctx
Callback structure.
Definition: ad413x.h:514
AD413X_AVDD_AVSS
@ AD413X_AVDD_AVSS
Definition: ad413x.h:338
AD413X_REFIN2
@ AD413X_REFIN2
Definition: ad413x.h:336
AD413X_PRESET_5
@ AD413X_PRESET_5
Definition: ad413x.h:286
NO_OS_DECLARE_CRC8_TABLE
NO_OS_DECLARE_CRC8_TABLE(ad413x_crc8)
ad413x_preset::ref_buf
struct ad413x_ref_buf ref_buf
Definition: ad413x.h:441
ad413x_set_adc_mode
int32_t ad413x_set_adc_mode(struct ad413x_dev *dev, enum ad413x_adc_mode mode)
Definition: ad413x.c:95
AD413X_EXC_10UA
@ AD413X_EXC_10UA
Definition: ad413x.h:411
ad413x_set_ch_preset
int32_t ad413x_set_ch_preset(struct ad413x_dev *dev, uint8_t ch_nb, enum ad413x_preset_nb preset_nb)
Definition: ad413x.c:405
no_os_gpio_get
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:49
ad413x_set_ref_buf
int32_t ad413x_set_ref_buf(struct ad413x_dev *dev, struct ad413x_ref_buf ref_buf, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:266
ad413x_dev::v_bias
uint16_t v_bias
Definition: ad413x.h:482
AD413X_STBY_IEXC_EN
#define AD413X_STBY_IEXC_EN
Definition: ad413x.h:199
no_os_malloc
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
ad413x_channel::iout1_exc_input
enum ad413x_input iout1_exc_input
Definition: ad413x.h:461
ad413x_init
int32_t ad413x_init(struct ad413x_dev **device, struct ad413x_init_param init_param)
Definition: ad413x.c:908
ad413x_preset::s_time
enum ad413x_settle_time s_time
Definition: ad413x.h:446
ad413x_dev::data_stat
uint8_t data_stat
Definition: ad413x.h:484
ad413x_set_exc_current
int32_t ad413x_set_exc_current(struct ad413x_dev *dev, enum ad413x_exc_current iout0_exc, enum ad413x_exc_current iout1_exc, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:376
AD413X_STBY_INTREF_EN
#define AD413X_STBY_INTREF_EN
Definition: ad413x.h:201
ad413x_standby_ctrl
Standby control flags.
Definition: ad413x.h:424
ad413x_int_ref
ad413x_int_ref
Internal reference selection.
Definition: ad413x.h:345
no_os_crc8
uint8_t no_os_crc8(const uint8_t *table, const uint8_t *pdata, size_t nbytes, uint8_t crc)
AD413X_SYS_GAIN_CAL
@ AD413X_SYS_GAIN_CAL
Definition: ad413x.h:315
AD413X_TRANSF_LEN
#define AD413X_TRANSF_LEN(x)
Definition: ad413x.h:57
AD413X_AIN8
@ AD413X_AIN8
Definition: ad413x.h:252
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
AD413X_STBY_GPO_EN
#define AD413X_STBY_GPO_EN
Definition: ad413x.h:195
ad413x_continuous_conv
int32_t ad413x_continuous_conv(struct ad413x_dev *dev, uint32_t *buffer, uint8_t ch_nb, uint32_t sample_nb)
Definition: ad413x.c:818
AD413X_SPI_CRC_ERR_EN
#define AD413X_SPI_CRC_ERR_EN
Definition: ad413x.h:148
ad413x_set_exc_current
int32_t ad413x_set_exc_current(struct ad413x_dev *dev, enum ad413x_exc_current iout0_exc, enum ad413x_exc_current iout1_exc, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:376
ad413x_dev::op_mode
enum ad413x_adc_mode op_mode
Definition: ad413x.h:479
ad413x_ch_en
int32_t ad413x_ch_en(struct ad413x_dev *dev, uint8_t ch_nb, uint8_t enable)
Definition: ad413x.c:461
ad413x_pdsw_en
int32_t ad413x_pdsw_en(struct ad413x_dev *dev, uint8_t ch_nb, bool pdsw_en)
Definition: ad413x.c:486
ad413x_dev::standby_ctrl
struct ad413x_standby_ctrl standby_ctrl
Definition: ad413x.h:483
ad413x_init_param::standby_ctrl
struct ad413x_standby_ctrl standby_ctrl
Definition: ad413x.h:505
ad413x_set_int_ref
int32_t ad413x_set_int_ref(struct ad413x_dev *dev, enum ad413x_int_ref int_ref)
Definition: ad413x.c:121
AD413X_EXC_100NA
@ AD413X_EXC_100NA
Definition: ad413x.h:417
ad413x_dev
Device structure.
Definition: ad413x.h:469
AD4130_8
@ AD4130_8
Definition: ad413x.h:387
ad413x_preset_nb
ad413x_preset_nb
Preset number.
Definition: ad413x.h:280
ad413x_channel::ain_p
enum ad413x_input ain_p
Definition: ad413x.h:458
AD413X_SYS_OFFSET_CAL
@ AD413X_SYS_OFFSET_CAL
Definition: ad413x.h:314
AD413X_EXC_200UA
@ AD413X_EXC_200UA
Definition: ad413x.h:416
AD413X_I_OUT_CH_MSK
#define AD413X_I_OUT_CH_MSK
Definition: ad413x.h:161
AD413X_PGA_N
#define AD413X_PGA_N(x)
Definition: ad413x.h:172
AD413X_STBY_VBIAS_EN
#define AD413X_STBY_VBIAS_EN
Definition: ad413x.h:198
ad413x_standby_ctrl::standby_diagn_en
bool standby_diagn_en
Definition: ad413x.h:432
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
AD413X_AIN1
@ AD413X_AIN1
Definition: ad413x.h:245
ad413x_set_standby_ctrl
int32_t ad413x_set_standby_ctrl(struct ad413x_dev *dev, struct ad413x_standby_ctrl standby_ctrl)
Definition: ad413x.c:558
AD413X_AIN5
@ AD413X_AIN5
Definition: ad413x.h:249
ad413x_dev::bipolar
uint8_t bipolar
Definition: ad413x.h:480
AD413X_STBY_DIAGNOSTICS_EN
#define AD413X_STBY_DIAGNOSTICS_EN
Definition: ad413x.h:194
ad413x_remove
int32_t ad413x_remove(struct ad413x_dev *dev)
Free the resources allocated by ad413x_init().
Definition: ad413x.c:1073
AD413X_V_MV_M
@ AD413X_V_MV_M
Definition: ad413x.h:273
AD413X_REG_DATA
#define AD413X_REG_DATA
Definition: ad413x.h:62
AD413X_PRESET_4
@ AD413X_PRESET_4
Definition: ad413x.h:285
AD413X_INTREF_2_5V
@ AD413X_INTREF_2_5V
Definition: ad413x.h:347
ad413x_init_param::int_ref
enum ad413x_int_ref int_ref
Definition: ad413x.h:503
AD413X_PRESET_3
@ AD413X_PRESET_3
Definition: ad413x.h:284
AD413X_V_MV_P
@ AD413X_V_MV_P
Definition: ad413x.h:272
AD413X_INT_OFFSET_CAL
@ AD413X_INT_OFFSET_CAL
Definition: ad413x.h:312
AD413X_AIN4
@ AD413X_AIN4
Definition: ad413x.h:248
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
AD413X_PRESET_6
@ AD413X_PRESET_6
Definition: ad413x.h:287
AD413X_AIN13
@ AD413X_AIN13
Definition: ad413x.h:257
ad413x_standby_ctrl::standby_pdsw_en
bool standby_pdsw_en
Definition: ad413x.h:430
AD413X_ADC_CSB_EN
#define AD413X_ADC_CSB_EN
Definition: ad413x.h:87
AD413X_GAIN_4
@ AD413X_GAIN_4
Definition: ad413x.h:374
AD413X_PDSW_M
#define AD413X_PDSW_M
Definition: ad413x.h:155
no_os_gpio.h
Header file of GPIO Interface.
AD413X_AIN14
@ AD413X_AIN14
Definition: ad413x.h:258
AD413X_32_MCLK
@ AD413X_32_MCLK
Definition: ad413x.h:395
AD413X_ADC_BIPOLAR
#define AD413X_ADC_BIPOLAR
Definition: ad413x.h:82
AD413X_AIN0
@ AD413X_AIN0
Definition: ad413x.h:244
ad413x_init_param::spi_crc_en
uint8_t spi_crc_en
Definition: ad413x.h:507
AD413X_SYNC4_STANDALONE
@ AD413X_SYNC4_STANDALONE
Definition: ad413x.h:356
AD413X_STBY_REFHOL_EN
#define AD413X_STBY_REFHOL_EN
Definition: ad413x.h:200
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
ad413x_init_param::spi_init
struct no_os_spi_init_param * spi_init
Definition: ad413x.h:494
ad413x_set_standby_ctrl
int32_t ad413x_set_standby_ctrl(struct ad413x_dev *dev, struct ad413x_standby_ctrl standby_ctrl)
Definition: ad413x.c:558
ad413x_ch_exc_input
int32_t ad413x_ch_exc_input(struct ad413x_dev *dev, uint8_t ch_nb, enum ad413x_input iout0_exc_inp, enum ad413x_input iout1_exc_inp)
Definition: ad413x.c:432
no_os_util.h
Header file of utility functions.
AD413X_AIN9
@ AD413X_AIN9
Definition: ad413x.h:253
ad413x_channel::enable
uint8_t enable
Definition: ad413x.h:457
AD413X_IDLE_MODE
@ AD413X_IDLE_MODE
Definition: ad413x.h:311
AD413X_SYNC3_PF1
@ AD413X_SYNC3_PF1
Definition: ad413x.h:361
AD413X_256_MCLK
@ AD413X_256_MCLK
Definition: ad413x.h:398
AD413X_AVDD_AVSS_6P
@ AD413X_AVDD_AVSS_6P
Definition: ad413x.h:264
AD413X_ALDO_AVSS_6M
@ AD413X_ALDO_AVSS_6M
Definition: ad413x.h:269
AD413X_REF_BUF_MSK
#define AD413X_REF_BUF_MSK
Definition: ad413x.h:168
AD413X_DGND
@ AD413X_DGND
Definition: ad413x.h:263
ad413x_chip_id
ad413x_chip_id
Chip IDs.
Definition: ad413x.h:386
ad413x_reg_write
int32_t ad413x_reg_write(struct ad413x_dev *dev, uint32_t reg_addr, uint32_t reg_data)
Definition: ad413x.c:650
ad413x_adc_mode
ad413x_adc_mode
ADC conversion modes.
Definition: ad413x.h:306
AD413X_SYNC3_PF3
@ AD413X_SYNC3_PF3
Definition: ad413x.h:363
AD413X_REG_FILTER
#define AD413X_REG_FILTER(x)
Definition: ad413x.h:71
ad413x_set_ref
int32_t ad413x_set_ref(struct ad413x_dev *dev, enum ad413x_ref_sel ref, enum ad413x_preset_nb reg_nb)
Definition: ad413x.c:240
ad413x_filter
ad413x_filter
Filter types.
Definition: ad413x.h:355
no_os_crc8.h
Header file of CRC-8 computation.
ad413x_settle_time
ad413x_settle_time
Channel settle time.
Definition: ad413x.h:394
AD413X_AIN10
@ AD413X_AIN10
Definition: ad413x.h:254
ad413x_init
int32_t ad413x_init(struct ad413x_dev **device, struct ad413x_init_param init_param)
Definition: ad413x.c:908
ad413x_do_soft_reset
int32_t ad413x_do_soft_reset(struct ad413x_dev *dev)
Definition: ad413x.c:625
ad413x_set_v_bias
int32_t ad413x_set_v_bias(struct ad413x_dev *dev, uint16_t v_bias_val)
Definition: ad413x.c:535
AD413X_INT_76_8_KHZ_OUT_ON
@ AD413X_INT_76_8_KHZ_OUT_ON
Definition: ad413x.h:297
AD413X_REF_SEL_N
#define AD413X_REF_SEL_N(x)
Definition: ad413x.h:171
AD413X_IOVDD_DGND_6M
@ AD413X_IOVDD_DGND_6M
Definition: ad413x.h:267
ad413x_callback_ctx::buffer_size
uint32_t buffer_size
Definition: ad413x.h:517
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
AD413X_64_MCLK
@ AD413X_64_MCLK
Definition: ad413x.h:396
ad413x_reg_read
int32_t ad413x_reg_read(struct ad413x_dev *dev, uint32_t reg_addr, uint32_t *reg_data)
Definition: ad413x.c:695