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