Go to the documentation of this file.
52 #define AD4110_CMD_WR_COM_REG(x) (0x00 | ((x) & 0xF)) // Write to Register x
53 #define AD4110_CMD_READ_COM_REG(x) (0x40 | ((x) & 0xF)) // Read from Register x
54 #define AD4110_DEV_ADDR_MASK (0x30) // Device address mask
57 #define A4110_ADC 0x00
58 #define A4110_AFE 0x01
61 #define AD4110_REG_AFE_TOP_STATUS 0x0
62 #define AD4110_REG_AFE_CNTRL1 0x1
63 #define AD4110_REG_AFE_CLK_CTRL 0x3
64 #define AD4110_REG_AFE_CNTRL2 0x4
65 #define AD4110_REG_PGA_RTD_CTRL 0x5
66 #define AD4110_REG_AFE_ERR_DISABLE 0x6
67 #define AD4110_REG_AFE_DETAIL_STATUS 0x7
68 #define AD4110_REG_AFE_CAL_DATA 0xC
69 #define AD4110_REG_AFE_RSENSE_DATA 0xD
70 #define AD4110_REG_AFE_NO_PWR_DEFAULT_SEL 0xE
71 #define AD4110_REG_AFE_NO_PWR_DEFAULT_STATUS 0xF
74 #define AD4110_REG_ADC_STATUS 0x0
75 #define AD4110_REG_ADC_MODE 0x1
76 #define AD4110_REG_ADC_INTERFACE 0x2
77 #define AD4110_REG_ADC_CONFIG 0x3
78 #define AD4110_REG_DATA 0x4
79 #define AD4110_REG_FILTER 0x5
80 #define AD4110_REG_ADC_GPIO_CONFIG 0x6
81 #define AD4110_REG_ID 0x7
82 #define AD4110_ADC_OFFSET0 0x8
83 #define AD4110_ADC_OFFSET1 0x9
84 #define AD4110_ADC_OFFSET2 0xA
85 #define AD4110_ADC_OFFSET3 0xB
86 #define AD4110_ADC_GAIN0 0xC
87 #define AD4110_ADC_GAIN1 0xD
88 #define AD4110_ADC_GAIN2 0xE
89 #define AD4110_ADC_GAIN3 0xF
92 #define AD4110_REG_AFE_CNTRL1_CRC_EN (1 << 14)
93 #define AD4110_REG_AFE_CNTRL1_DISRTD (1 << 9)
96 #define AD4110_REG_AFE_CLK_CTRL_CFG(x) (((x) & 0x3) << 3)
99 #define AD4110_REG_AFE_CNTRL2_IMODE_MSK (1 << 1)
100 #define AD4110_REG_AFE_CNTRL2_EXT_R_SEL_MSK (1 << 2)
101 #define AD4110_REG_AFE_CNTRL2_EN_FLD_PWR_MSK (1 << 3)
102 #define AD4110_AFE_VBIAS(x) (((x) & 0x3) << 6)
103 #define AD4110_AFE_VBIAS_ON 0x1
104 #define AD4110_AFE_VBIAS_DEFAULT_OFF 0x2
105 #define AD4110_AFE_VBIAS_OFF 0x3
106 #define AD4110_REG_AFE_CNTRL2_AINP_UP1 (1 << 8)
107 #define AD4110_REG_AFE_CNTRL2_AINP_UP100 (1 << 9)
108 #define AD4110_REG_AFE_CNTRL2_AINP_DN1 (1 << 10)
109 #define AD4110_REG_AFE_CNTRL2_AINP_DN100 (1 << 11)
110 #define AD4110_REG_AFE_CNTRL2_AINN_UP1 (1 << 12)
111 #define AD4110_REG_AFE_CNTRL2_AINN_UP100 (1 << 13)
112 #define AD4110_REG_AFE_CNTRL2_AINN_DN1 (1 << 14)
113 #define AD4110_REG_AFE_CNTRL2_AINN_DN100 (1 << 15)
116 #define AD4110_REG_PGA_RTD_CTRL_23W_EN_MSK (1 << 15)
117 #define AD4110_REG_PGA_RTD_CTRL_I_COM_SEL(x) (((x) & 0x7) << 12)
118 #define AD4110_REG_PGA_RTD_CTRL_I_EXC_SEL(x) (((x) & 0x7) << 9)
119 #define AD4110_REG_PGA_RTD_CTRL_EXT_RTD (1 << 8)
120 #define AD4110_REG_PGA_RTD_CTRL_GAIN_CH(x) (((x) & 0xF) << 4)
121 #define AD4110_REG_PGA_RTD_CTRL_GAIN_CH_MSK 0xF0
124 #define AD4110_REG_AFE_ERR_DIS_AIN_OC (1 << 1)
125 #define AD4110_REG_AFE_ERR_DIS_FLD_PWR_OC (1 << 2)
126 #define AD4110_REG_AFE_ERR_DIS_I_COM (1 << 6)
127 #define AD4110_REG_AFE_ERR_DIS_I_EXC (1 << 7)
128 #define AD4110_REG_AFE_ERR_DIS_AINP_OV (1 << 8)
129 #define AD4110_REG_AFE_ERR_DIS_AINN_OV (1 << 9)
130 #define AD4110_REG_AFE_ERR_DIS_AINP_UV (1 << 10)
131 #define AD4110_REG_AFE_ERR_DIS_AINN_UV (1 << 11)
134 #define AD4110_REG_NO_PWR_DEFAULT_SEL_MSK 0xFF
137 #define AD4110_REG_ADC_STATUS_RDY (1 << 7)
140 #define AD4110_REG_ADC_MODE_MSK 0x70
141 #define AD4110_ADC_MODE(x) (((x) & 0x7) << 4)
142 #define AD4110_REG_ADC_MODE_REF_EN (1 << 15)
143 #define AD4110_REG_ADC_DELAY(x) (((x) & 0x7) << 8)
144 #define AD4110_REG_ADC_CLK_SEL(x) (((x) & 0x3) << 2)
147 #define AD4110_REG_ADC_INTERFACE_CRC_EN_MSK 0x0C
148 #define AD4110_ADC_CRC_EN(x) (((x) & 0x3) << 2)
149 #define AD4110_REG_ADC_INTERFACE_WL16_MSK 0x01
150 #define AD4110_REG_ADC_INTERFACE_DS_MSK 0x40
151 #define AD4110_DATA_STAT_EN (1 << 6)
154 #define AD4110_REG_ADC_CONFIG_CHAN_EN_MSK 0xF
155 #define AD4110_REG_ADC_CONFIG_CHAN_EN_0 (1 << 0)
156 #define AD4110_REG_ADC_CONFIG_CHAN_EN_1 (1 << 1)
157 #define AD4110_REG_ADC_CONFIG_CHAN_EN_2 (1 << 2)
158 #define AD4110_REG_ADC_CONFIG_CHAN_EN_3 (1 << 3)
159 #define AD4110_REG_ADC_CONFIG_REF_SEL(x) (((x) & 0x3) << 4)
160 #define AD4110_REG_ADC_CONFIG_BIT_6 (1 << 6)
161 #define AD4110_REG_ADC_CONFIG_AIN_BUFF(x) ((((x) & 0x3) << 8))
162 #define AD4110_REG_ADC_CONFIG_BI_UNIPOLAR (1 << 12)
165 #define AD4110_REG_ADC_FILTER_ODR(x) (((x) & 0x1F) << 0)
166 #define AD4110_REG_ADC_FILTER_ORDER(x) (((x) & 0x3) << 5)
167 #define AD4110_REG_ADC_FILTER_SEL_ENH(x) (((x) & 0x7) << 8)
168 #define AD4110_REG_ADC_FILTER_EN_ENH (1 << 11)
171 #define AD4110_REG_GPIO_CONFIG_ERR_EN(x) (((x) & 0x3) << 9)
172 #define AD4110_REG_GPIO_CONFIG_SYNC_EN(x) (((x) & 0x1) << 11)
175 #define AD4110_CRC8_POLY 0x07 // x^8 + x^2 + x^1 + x^0
178 #define AD4110_ADC_CONV_TIMEOUT 10000
413 uint32_t buffer_size);
@ AD4110_GAIN_0_75
Definition: ad4110.h:253
bool bipolar
Definition: ad4110.h:317
#define AD4110_REG_AFE_CNTRL2
Definition: ad4110.h:64
@ KSPS_62P5_B
Definition: ad4110.h:277
@ AD4110_SYNC_DIS
Definition: ad4110.h:196
int32_t ad4110_set_gain(struct ad4110_dev *dev, enum ad4110_gain gain)
Definition: ad4110.c:186
uint32_t timeout
Definition: ad413x.c:49
ad4110_data_word_length
Definition: ad4110.h:211
#define AD4110_REG_AFE_CNTRL1_CRC_EN
Definition: ad4110.h:92
@ AD4110_CONTINOUS_CONV_MODE
Definition: ad4110.h:217
#define AD4110_AFE_VBIAS_ON
Definition: ad4110.h:103
struct no_os_spi_init_param spi_init
Definition: ad4110.h:328
@ AD4110_SYNC_EN
Definition: ad4110.h:197
@ AD4110_AFE_ADC_CLOCKED
Definition: ad4110.h:192
enum ad4110_afe_clk_cfg afe_clk
Definition: ad4110.h:338
@ SPS_50
Definition: ad4110.h:290
@ SPS_400P6
Definition: ad4110.h:286
int32_t ad4110_set_gain(struct ad4110_dev *dev, enum ad4110_gain gain)
Definition: ad4110.c:186
#define AD4110_REG_AFE_CNTRL1
Definition: ad4110.h:62
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
enum ad4110_gain gain
Definition: ad4110.h:336
@ KSPS_2P5
Definition: ad4110.h:283
uint32_t buffer_size
Definition: ad4110.h:353
Structure describing a callback to be registered.
Definition: no_os_irq.h:142
int32_t ad4110_continuous_read(struct ad4110_dev *dev, uint32_t *buffer, uint32_t buffer_size)
Definition: ad4110.c:1040
struct ad4110_dev * dev
Definition: ad4110.h:351
#define AD4110_REG_ADC_MODE_MSK
Definition: ad4110.h:140
#define AD4110_ADC_CRC_EN(x)
Definition: ad4110.h:148
Header file of SPI Interface.
Header file of IRQ interface.
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:92
uint8_t ad4110_compute_xor(uint8_t *data, uint8_t data_size)
Definition: ad4110.c:88
@ DISABLE_AIN_BUFFER
Definition: ad4110.h:267
int32_t ad4110_set_adc_clk(struct ad4110_dev *dev, enum ad4110_adc_clk_sel clk)
Definition: ad4110.c:206
#define AD4110_REG_PGA_RTD_CTRL_I_EXC_SEL(x)
Definition: ad4110.h:118
@ AD4110_GAIN_0_25
Definition: ad4110.h:249
uint8_t ad4110_compute_crc8(uint8_t *data, uint8_t data_size)
Definition: ad4110.c:60
int32_t ad4110_set_reference(struct ad4110_dev *dev, enum ad4110_voltage_reference ref)
Definition: ad4110.c:245
@ SPS_100P2
Definition: ad4110.h:288
@ AD4110_FLD_POWER_MODE
Definition: ad4110.h:230
struct no_os_irq_ctrl_desc * irq_desc
Definition: ad4110.h:322
@ NO_OS_IRQ_LEVEL_LOW
Definition: no_os_irq.h:77
enum ad4110_adc_crc_mode adc_crc_en
Definition: ad4110.h:334
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
int ad4110_set_odr(struct ad4110_dev *dev, enum ad4110_odr odr)
Set Output Data Rate.
Definition: ad4110.c:796
#define AD4110_REG_DATA
Definition: ad4110.h:78
uint8_t addr
Definition: ad4110.h:340
@ SPS_60
Definition: ad4110.h:289
#define AD4110_AFE_VBIAS(x)
Definition: ad4110.h:102
int32_t ad4110_set_adc_mode(struct ad4110_dev *dev, enum ad4110_adc_mode mode)
Definition: ad4110.c:148
Header file of Delay functions.
ad4110_gain
Definition: ad4110.h:247
@ AD4110_ENABLE
Definition: ad4110.h:208
#define pr_info(fmt, args...)
Definition: no_os_print_log.h:115
int ad4110_set_odr(struct ad4110_dev *dev, enum ad4110_odr odr)
Set Output Data Rate.
Definition: ad4110.c:796
@ AD4110_ADC_CRC_DISABLE
Definition: ad4110.h:237
enum ad4110_order order
Definition: ad4110.h:344
@ AD4110_DATA_WL24
Definition: ad4110.h:212
@ AD4110_GAIN_24
Definition: ad4110.h:263
ad4110_adc_crc_mode
Definition: ad4110.h:236
@ sinc5_sinc1
Definition: ad4110.h:298
bool bipolar
Definition: ad4110.h:341
int ad4110_set_order(struct ad4110_dev *dev, enum ad4110_order order)
Set Order of Filter.
Definition: ad4110.c:818
@ ENABLE_NEG_BUFFER
Definition: ad4110.h:268
Definition: ad9361_util.h:69
#define AD4110_REG_ADC_INTERFACE
Definition: ad4110.h:76
@ AD4110_EXT_REF
Definition: ad4110.h:201
int32_t ad4110_setup(struct ad4110_dev **device, struct ad4110_init_param init_param)
Definition: ad4110.c:890
@ AD4110_AVDD5_REF
Definition: ad4110.h:203
ad4110_ain_buffer
Definition: ad4110.h:266
int32_t ad4110_spi_int_data_reg_read(struct ad4110_dev *dev, uint32_t *reg_data)
Definition: ad4110.c:549
int32_t ad4110_set_adc_mode(struct ad4110_dev *dev, enum ad4110_adc_mode mode)
Definition: ad4110.c:148
#define AD4110_REG_ADC_INTERFACE_DS_MSK
Definition: ad4110.h:150
@ AD4110_GAIN_4
Definition: ad4110.h:258
ad4110_odr
Definition: ad4110.h:273
int32_t ad4110_set_afe_clk(struct ad4110_dev *dev, enum ad4110_afe_clk_cfg clk)
Definition: ad4110.c:225
int32_t ad4110_spi_do_soft_reset(struct ad4110_dev *dev)
Definition: ad4110.c:443
@ AD4110_GAIN_1_5
Definition: ad4110.h:255
enum ad4110_afe_clk_cfg afe_clk
Definition: ad4110.h:314
@ AD4110_AFE_CRC_DISABLE
Definition: ad4110.h:243
enum ad4110_data_word_length data_length
Definition: ad4110.h:308
#define AD4110_REG_AFE_CNTRL2_EXT_R_SEL_MSK
Definition: ad4110.h:100
#define AD4110_REG_AFE_CLK_CTRL_CFG(x)
Definition: ad4110.h:96
@ AD4110_PW_DOWN_MODE
Definition: ad4110.h:220
@ AD4110_AFE_CRC
Definition: ad4110.h:244
@ KSPS_1
Definition: ad4110.h:284
@ AD4110_AFE_INT_CLOCK
Definition: ad4110.h:191
@ AD4110_DISABLE
Definition: ad4110.h:207
@ SPS_200
Definition: ad4110.h:287
enum ad4110_odr odr
Definition: ad4110.h:343
@ sinc3
Definition: ad4110.h:299
#define AD4110_REG_ADC_INTERFACE_WL16_MSK
Definition: ad4110.h:149
@ KSPS_15P625
Definition: ad4110.h:280
#define AD4110_REG_AFE_CNTRL2_AINN_DN100
Definition: ad4110.h:113
ad4110_op_mode
Definition: ad4110.h:225
@ KSPS_10P417
Definition: ad4110.h:281
uint8_t ad4110_get_data_size(struct ad4110_dev *dev, uint8_t reg_map, uint8_t reg_addr)
Definition: ad4110.c:464
ad4110_afe_clk_cfg
Definition: ad4110.h:190
@ ENABLE_FULL_BUFFER
Definition: ad4110.h:270
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
ad4110_state
Definition: ad4110.h:206
enum ad4110_state data_stat
Definition: ad4110.h:331
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
int32_t ad4110_setup(struct ad4110_dev **device, struct ad4110_init_param init_param)
Definition: ad4110.c:890
int32_t ad4110_spi_int_reg_write(struct ad4110_dev *dev, uint8_t reg_map, uint8_t reg_addr, uint32_t reg_data)
Definition: ad4110.c:499
int32_t ad4110_set_op_mode(struct ad4110_dev *dev, enum ad4110_op_mode mode)
Definition: ad4110.c:290
#define AD4110_REG_ADC_MODE_REF_EN
Definition: ad4110.h:142
#define AD4110_ADC_OFFSET0
Definition: ad4110.h:82
@ AD4110_GAIN_0_375
Definition: ad4110.h:251
ad4110_voltage_reference
Definition: ad4110.h:200
int32_t ad4110_spi_int_data_reg_read(struct ad4110_dev *dev, uint32_t *reg_data)
Definition: ad4110.c:549
@ AD4110_RTD_3W_MODE
Definition: ad4110.h:232
@ SPS_500
Definition: ad4110.h:285
ad4110_adc_mode
Definition: ad4110.h:216
@ AD4110_ADC_CRC_CRC
Definition: ad4110.h:239
#define AD4110_REG_PGA_RTD_CTRL_23W_EN_MSK
Definition: ad4110.h:116
ad4110_afe_crc_mode
Definition: ad4110.h:242
int32_t ad4110_spi_int_reg_read(struct ad4110_dev *dev, uint8_t reg_map, uint8_t reg_addr, uint32_t *reg_data)
Definition: ad4110.c:628
enum ad4110_afe_crc_mode afe_crc_en
Definition: ad4110.h:310
#define AD4110_DATA_STAT_EN
Definition: ad4110.h:151
uint8_t addr
Definition: ad4110.h:316
#define AD4110_REG_ADC_INTERFACE_CRC_EN_MSK
Definition: ad4110.h:147
int ad4110_set_order(struct ad4110_dev *dev, enum ad4110_order order)
Set Order of Filter.
Definition: ad4110.c:818
@ AD4110_GAIN_3
Definition: ad4110.h:257
void * ctx
Definition: no_os_irq.h:146
@ AD4110_GAIN_0_3
Definition: ad4110.h:250
enum ad4110_sync_en sync
Definition: ad4110.h:313
@ AD4110_GAIN_8
Definition: ad4110.h:260
#define AD4110_REG_ADC_GPIO_CONFIG
Definition: ad4110.h:80
@ KSPS_125_A
Definition: ad4110.h:274
@ KSPS_31P25
Definition: ad4110.h:278
@ AD4110_GAIN_1
Definition: ad4110.h:254
#define AD4110_REG_PGA_RTD_CTRL_GAIN_CH(x)
Definition: ad4110.h:120
int ad4110_set_analog_input_buffer(struct ad4110_dev *dev, enum ad4110_ain_buffer buffer)
Assign analog input buffer.
Definition: ad4110.c:743
@ KSPS_5
Definition: ad4110.h:282
#define AD4110_REG_ADC_CONFIG_AIN_BUFF(x)
Definition: ad4110.h:161
uint32_t nready_pin
Definition: ad4110.h:347
@ AD4110_SYS_GAIN_CAL
Definition: ad4110.h:222
#define AD4110_REG_AFE_CLK_CTRL
Definition: ad4110.h:63
uint8_t ad4110_compute_xor(uint8_t *data, uint8_t data_size)
Definition: ad4110.c:88
@ AD4110_THERMOCOUPLE
Definition: ad4110.h:229
#define AD4110_REG_ADC_FILTER_ORDER(x)
Definition: ad4110.h:166
@ SPS_20
Definition: ad4110.h:291
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
uint8_t ad4110_get_data_size(struct ad4110_dev *dev, uint8_t reg_map, uint8_t reg_addr)
Definition: ad4110.c:464
enum ad4110_gain gain
Definition: ad4110.h:312
ad4110_adc_clk_sel
Definition: ad4110.h:184
#define AD4110_REG_AFE_CNTRL2_EN_FLD_PWR_MSK
Definition: ad4110.h:101
void(* callback)(void *context)
Definition: no_os_irq.h:144
@ AD4110_GAIN_0_5
Definition: ad4110.h:252
enum ad4110_ain_buffer analog_input_buff
Definition: ad4110.h:318
@ AD4110_GAIN_2
Definition: ad4110.h:256
int32_t ad4110_spi_do_soft_reset(struct ad4110_dev *dev)
Definition: ad4110.c:443
#define AD4110_AFE_VBIAS_OFF
Definition: ad4110.h:105
@ KSPS_62P5_A
Definition: ad4110.h:276
@ AD4110_INT_2_5V_REF
Definition: ad4110.h:202
int ad4110_set_analog_input_buffer(struct ad4110_dev *dev, enum ad4110_ain_buffer buffer)
Assign analog input buffer.
Definition: ad4110.c:743
int32_t ad4110_remove(struct ad4110_dev *dev)
Free the resources allocated by ad4110_setup().
Definition: ad4110.c:1087
enum ad4110_ain_buffer analog_input_buff
Definition: ad4110.h:342
int32_t ad4110_set_reference(struct ad4110_dev *dev, enum ad4110_voltage_reference ref)
Definition: ad4110.c:245
#define AD4110_CRC8_POLY
Definition: ad4110.h:175
#define A4110_AFE
Definition: ad4110.h:58
struct no_os_spi_desc * spi_dev
Definition: ad4110.h:304
enum ad4110_adc_clk_sel adc_clk
Definition: ad4110.h:315
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
#define AD4110_REG_PGA_RTD_CTRL
Definition: ad4110.h:65
#define AD4110_DEV_ADDR_MASK
Definition: ad4110.h:54
int32_t ad4110_spi_int_reg_read(struct ad4110_dev *dev, uint8_t reg_map, uint8_t reg_addr, uint32_t *reg_data)
Definition: ad4110.c:628
enum ad4110_voltage_reference volt_ref
Definition: ad4110.h:306
@ AD4110_GAIN_16
Definition: ad4110.h:262
@ AD4110_STANDBY_MODE
Definition: ad4110.h:219
int32_t ad4110_set_op_mode(struct ad4110_dev *dev, enum ad4110_op_mode mode)
Definition: ad4110.c:290
@ SPS_10
Definition: ad4110.h:293
Header file of AD4110 Driver.
@ ENABLE_POS_BUFFER
Definition: ad4110.h:269
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
int ad4110_set_bipolar(struct ad4110_dev *dev, bool bipolar)
Set polarity.
Definition: ad4110.c:766
int32_t ad4110_set_adc_clk(struct ad4110_dev *dev, enum ad4110_adc_clk_sel clk)
Definition: ad4110.c:206
@ AD4110_RTD_4W_MODE
Definition: ad4110.h:233
#define AD4110_REG_ADC_MODE
Definition: ad4110.h:75
enum ad4110_odr odr
Definition: ad4110.h:319
#define AD4110_REG_AFE_CNTRL2_IMODE_MSK
Definition: ad4110.h:99
#define AD4110_REG_ADC_CONFIG
Definition: ad4110.h:77
int ad4110_wait_for_rdy_low(struct ad4110_dev *dev, uint32_t timeout)
Wait for RDY bit to go low indicating conversion completion.
Definition: ad4110.c:840
#define AD4110_REG_ADC_STATUS
Definition: ad4110.h:74
@ AD4110_ADC_INT_CLK_CLKIO
Definition: ad4110.h:186
@ AD4110_ADC_INT_CLK
Definition: ad4110.h:185
uint32_t nready_pin
Definition: ad4110.h:323
@ AD4110_VOLTAGE_MODE
Definition: ad4110.h:226
enum ad4110_adc_crc_mode adc_crc_en
Definition: ad4110.h:309
@ AD4110_GAIN_12
Definition: ad4110.h:261
int32_t ad4110_spi_int_reg_write_msk(struct ad4110_dev *dev, uint8_t reg_map, uint8_t reg_addr, uint32_t data, uint16_t mask)
Definition: ad4110.c:117
enum ad4110_state data_stat
Definition: ad4110.h:307
uint8_t ad4110_compute_crc8(uint8_t *data, uint8_t data_size)
Definition: ad4110.c:60
enum ad4110_op_mode op_mode
Definition: ad4110.h:311
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
@ AD4110_RTD_2W_MODE
Definition: ad4110.h:231
@ SPS_16P7
Definition: ad4110.h:292
enum ad4110_data_word_length data_length
Definition: ad4110.h:332
@ bipolar
Definition: ad5446.h:71
int ad4110_set_channel_status(struct ad4110_dev *dev, uint8_t chan_id, bool status)
Enable/Disable channel.
Definition: ad4110.c:723
@ AD4110_GAIN_0_2
Definition: ad4110.h:248
#define AD4110_CMD_READ_COM_REG(x)
Definition: ad4110.h:53
@ KSPS_125_B
Definition: ad4110.h:275
@ SPS_5
Definition: ad4110.h:294
#define AD4110_REG_ADC_CONFIG_BI_UNIPOLAR
Definition: ad4110.h:162
#define AD4110_ADC_MODE(x)
Definition: ad4110.h:141
enum ad4110_voltage_reference volt_ref
Definition: ad4110.h:330
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
@ AD4110_ADC_EXT_CLK
Definition: ad4110.h:187
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:181
int ad4110_do_single_read(struct ad4110_dev *dev, uint32_t *buffer)
ADC data read in single conversion mode.
Definition: ad4110.c:863
Header file of GPIO Interface.
@ AD4110_ADC_XOR_CRC
Definition: ad4110.h:238
int32_t ad4110_set_afe_clk(struct ad4110_dev *dev, enum ad4110_afe_clk_cfg clk)
Definition: ad4110.c:225
@ AD4110_GAIN_6
Definition: ad4110.h:259
#define AD4110_REG_ADC_CLK_SEL(x)
Definition: ad4110.h:144
#define AD4110_REG_ADC_FILTER_ODR(x)
Definition: ad4110.h:165
enum ad4110_order order
Definition: ad4110.h:320
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
@ AD4110_DATA_WL16
Definition: ad4110.h:213
int32_t ad4110_spi_int_reg_write_msk(struct ad4110_dev *dev, uint8_t reg_map, uint8_t reg_addr, uint32_t data, uint16_t mask)
Definition: ad4110.c:117
Header file of utility functions.
#define AD4110_REG_ADC_CONFIG_REF_SEL(x)
Definition: ad4110.h:159
#define AD4110_ADC_CONV_TIMEOUT
Definition: ad4110.h:178
enum ad4110_adc_clk_sel adc_clk
Definition: ad4110.h:339
#define AD4110_CMD_WR_COM_REG(x)
Definition: ad4110.h:52
uint32_t * buffer
Definition: ad4110.h:352
@ AD4110_CURRENT_MODE
Definition: ad4110.h:227
#define AD4110_REG_FILTER
Definition: ad4110.h:79
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:162
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:198
int ad4110_set_bipolar(struct ad4110_dev *dev, bool bipolar)
Set polarity.
Definition: ad4110.c:766
Definition: no_os_irq.h:123
#define AD4110_REG_GPIO_CONFIG_SYNC_EN(x)
Definition: ad4110.h:172
enum ad4110_op_mode op_mode
Definition: ad4110.h:335
@ AD4110_SYS_OFFSET_CAL
Definition: ad4110.h:221
int ad4110_wait_for_rdy_low(struct ad4110_dev *dev, uint32_t timeout)
Wait for RDY bit to go low indicating conversion completion.
Definition: ad4110.c:840
int ad4110_set_channel_status(struct ad4110_dev *dev, uint8_t chan_id, bool status)
Enable/Disable channel.
Definition: ad4110.c:723
ad4110_sync_en
Definition: ad4110.h:195
int32_t ad4110_spi_int_reg_write(struct ad4110_dev *dev, uint8_t reg_map, uint8_t reg_addr, uint32_t reg_data)
Definition: ad4110.c:499
enum ad4110_afe_crc_mode afe_crc_en
Definition: ad4110.h:333
int32_t ad4110_continuous_read(struct ad4110_dev *dev, uint32_t *buffer, uint32_t buffer_size)
Definition: ad4110.c:1040
@ AD4110_CURRENT_MODE_EXT_R_SEL
Definition: ad4110.h:228
ad4110_order
Definition: ad4110.h:297
struct no_os_irq_ctrl_desc * irq_desc
Definition: ad4110.h:346
int ad4110_do_single_read(struct ad4110_dev *dev, uint32_t *buffer)
ADC data read in single conversion mode.
Definition: ad4110.c:863
enum ad4110_sync_en sync
Definition: ad4110.h:337
#define AD4110_REG_ADC_STATUS_RDY
Definition: ad4110.h:137
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
@ AD4110_SINGLE_CONV_MODE
Definition: ad4110.h:218
@ KSPS_25
Definition: ad4110.h:279
#define A4110_ADC
Definition: ad4110.h:57