Go to the documentation of this file.
60 #define AD713X_REG_INTERFACE_CONFIG_A 0x00
61 #define AD713X_REG_INTERFACE_CONFIG_B 0x01
62 #define AD713X_REG_DEVICE_CONFIG 0x02
63 #define AD713X_REG_CHIP_TYPE 0x03
64 #define AD713X_REG_PRODUCT_ID_LSB 0x04
65 #define AD713X_REG_PRODUCT_ID_MSB 0x05
66 #define AD713X_REG_CHIP_GRADE 0x06
67 #define AD713X_REG_CHIP_INDEX 0x07
68 #define AD713X_REG_SCTATCH_PAD 0x0A
69 #define AD713X_REG_SPI_REVISION 0x0B
70 #define AD713X_REG_VENDOR_ID_LSB 0x0C
71 #define AD713X_REG_VENDOR_ID_MSB 0x0D
72 #define AD713X_REG_STREAM_MODE 0x0E
73 #define AD713X_REG_TRANSFER_REGISTER 0x0F
74 #define AD713X_REG_DEVICE_CONFIG1 0x10
75 #define AD713X_REG_DATA_PACKET_CONFIG 0x11
76 #define AD713X_REG_DIGITAL_INTERFACE_CONFIG 0x12
77 #define AD713X_REG_POWER_DOWN_CONTROL 0x13
78 #define AD713X_REG_AIN_RANGE_SELECT 0x14
79 #define AD713X_REG_DEVICE_STATUS 0x15
80 #define AD713X_REG_ODR_VAL_INT_LSB 0x16
81 #define AD713X_REG_ODR_VAL_INT_MID 0x17
82 #define AD713X_REG_ODR_VAL_INT_MSB 0x18
83 #define AD713X_REG_ODR_VAL_FLT_LSB 0x19
84 #define AD713X_REG_ODR_VAL_FLT_MID0 0x1A
85 #define AD713X_REG_ODR_VAL_FLT_MID1 0x1B
86 #define AD713X_REG_ODR_VAL_FLT_MSB 0x1C
87 #define AD713X_REG_CHANNEL_ODR_SELECT 0x1D
88 #define AD713X_REG_CHAN_DIG_FILTER_SEL 0x1E
89 #define AD713X_REG_FIR_BW_SEL 0x1F
90 #define AD713X_REG_GPIO_DIR_CTRL 0x20
91 #define AD713X_REG_GPIO_DATA 0x21
92 #define AD713X_REG_ERROR_PIN_SRC_CONTROL 0x22
93 #define AD713X_REG_ERROR_PIN_CONTROL 0x23
94 #define AD713X_REG_VCMBUF_CTRL 0x24
95 #define AD713X_REG_DIAGNOSTIC_CONTROL 0x25
96 #define AD713X_REG_MPC_CONFIG 0x26
97 #define AD713X_REG_CH0_GAIN_LSB 0x27
98 #define AD713X_REG_CH0_GAIN_MID 0x28
99 #define AD713X_REG_CH0_GAIN_MSB 0x29
100 #define AD713X_REG_CH0_OFFSET_LSB 0x2A
101 #define AD713X_REG_CH0_OFFSET_MID 0x2B
102 #define AD713X_REG_CH0_OFFSET_MSB 0x2C
103 #define AD713X_REG_CH1_GAIN_LSB 0x2D
104 #define AD713X_REG_CH1_GAIN_MID 0x2E
105 #define AD713X_REG_CH1_GAIN_MSB 0x2F
106 #define AD713X_REG_CH1_OFFSET_LSB 0x30
107 #define AD713X_REG_CH1_OFFSET_MID 0x31
108 #define AD713X_REG_CH1_OFFSET_MSB 0x32
109 #define AD713X_REG_CH2_GAIN_LSB 0x33
110 #define AD713X_REG_CH2_GAIN_MID 0x34
111 #define AD713X_REG_CH2_GAIN_MSB 0x35
112 #define AD713X_REG_CH2_OFFSET_LSB 0x36
113 #define AD713X_REG_CH2_OFFSET_MID 0x37
114 #define AD713X_REG_CH2_OFFSET_MSB 0x38
115 #define AD713X_REG_CH3_GAIN_LSB 0x39
116 #define AD713X_REG_CH3_GAIN_MID 0x3A
117 #define AD713X_REG_CH3_GAIN_MSB 0x3B
118 #define AD713X_REG_CH3_OFFSET_LSB 0x3C
119 #define AD713X_REG_CH3_OFFSET_MID 0x3D
120 #define AD713X_REG_CH3_OFFSET_MSB 0x3E
121 #define AD713X_REG_MCLK_COUNTER 0x3F
122 #define AD713X_REG_DIG_FILTER_OFUF 0x40
123 #define AD713X_REG_DIG_FILTER_SETTLED 0x41
124 #define AD713X_REG_INTERNAL_ERROR 0x42
125 #define AD713X_REG_POWER_OV_ERROR_1 0x43
126 #define AD713X_REG_POWER_UV_ERROR_1 0x44
127 #define AD713X_REG_POWER_OV_ERROR_2 0x45
128 #define AD713X_REG_POWER_UV_ERROR_2 0x46
129 #define AD713X_REG_SPI_ERROR 0x47
130 #define AD713X_REG_AIN_OR_ERROR 0x48
131 #define AD713X_REG_AVDD5_VALUE 0x49
132 #define AD713X_REG_DVDD5_VALUE 0x4A
133 #define AD713X_REG_VREF_VALUE 0x4B
134 #define AD713X_REG_LDOIN_VALUE 0x4C
135 #define AD713X_REG_AVDD1V8_VALUE 0x4D
136 #define AD713X_REG_DVDD1V8_VALUE 0x4E
137 #define AD713X_REG_CLKVDD_VALUE 0x4F
138 #define AD713X_REG_IOVDD_VALUE 0x50
139 #define AD713X_REG_TEMPERATURE_DATA 0x51
144 #define AD713X_INT_CONFIG_A_SOFT_RESET_MSK NO_OS_BIT(7)
145 #define AD713X_INT_CONFIG_A_ADDR_ASC_BIT_MSK NO_OS_BIT(5)
146 #define AD713X_INT_CONFIG_A_SDO_ACTIVE_BIT_MSK NO_OS_BIT(4)
147 #define AD713X_INT_CONFIG_A_SOFT_RESET_MIRR_MSK NO_OS_BIT(0)
148 #define AD713X_INT_CONFIG_A_ADDR_ASC_MIRR_MSK NO_OS_BIT(2)
149 #define AD713X_INT_CONFIG_A_SDO_ACTIVE_MIRR_MSK NO_OS_BIT(3)
154 #define AD713X_INT_CONFIG_B_SINGLE_INSTR_MSK NO_OS_BIT(7)
155 #define AD713X_INT_CONFIG_B_M_S_RD_CTRL_MSK NO_OS_BIT(5)
156 #define AD713X_INT_CONFIG_B_DIG_IF_RST_MSK NO_OS_BIT(1)
161 #define AD713X_DEV_CONFIG_OP_IN_PROGRESS_MSK NO_OS_BIT(5)
162 #define AD713X_DEV_CONFIG_NO_CHIP_ERR_MSK NO_OS_BIT(4)
163 #define AD713X_DEV_CONFIG_PWR_MODE_MSK NO_OS_BIT(0)
168 #define AD713X_CHIP_TYPE_BITS_MSK NO_OS_GENMASK(7, 0)
169 #define AD713X_CHIP_TYPE_BITS_MODE(x) (((x) & 0xFF) << 0)
170 #define AD713X_CHIP_TYPE 0x07
175 #define AD713X_PRODUCT_ID_LSB_BITS_MSK NO_OS_GENMASK(7, 0)
176 #define AD713X_PRODUCT_ID_LSB_BITS_MODE(x) (((x) & 0xFF) << 0)
181 #define AD713X_PRODUCT_ID_MSB_BITS_MSK NO_OS_GENMASK(7, 0)
182 #define AD713X_PRODUCT_ID_MSB_BITS_MODE(x) (((x) & 0xFF) << 0)
187 #define AD713X_CHIP_GRADE_PROD_GRADE_BITS_MSK NO_OS_GENMASK(7, 4)
188 #define AD713X_CHIP_GRADE_PROD_GRADE_BITS_MODE(x) (((x) & 0x0F) << 4)
189 #define AD713X_CHIP_GRADE_DEV_VERSION_BITS_MSK NO_OS_GENMASK(3, 0)
190 #define AD713X_CHIP_GRADE_DEV_VERSION_BITS_MODE(x) (((x) & 0x0F) << 0)
195 #define AD713X_SILICON_REV_ID_BITS_MSK NO_OS_GENMASK(7, 0)
196 #define AD713X_SILICON_REV_ID_BITS_MODE(x) (((x) & 0xFF) << 0)
201 #define AD713X_SCRATCH_PAD_BITS_MSK NO_OS_GENMASK(7, 0)
202 #define AD713X_SCRATCH_PAD_BITS_MODE(x) (((x) & 0xFF) << 0)
207 #define AD713X_SPI_REVISION_BITS_MSK NO_OS_GENMASK(7, 0)
208 #define AD713X_SPI_REVISION_BITS_MODE(x) (((x) & 0xFF) << 0)
213 #define AD713X_VENDOR_ID_LSB_BITS_MSK NO_OS_GENMASK(7, 0)
214 #define AD713X_VENDOR_ID_LSB_BITS_MODE(x) (((x) & 0xFF) << 0)
219 #define AD713X_VENDOR_ID_MSB_BITS_MSK NO_OS_GENMASK(7, 0)
220 #define AD713X_VENDOR_ID_MSB_BITS_MODE(x) (((x) & 0xFF) << 0)
225 #define AD713X_STREAM_MODE_BITS_MSK NO_OS_GENMASK(7, 0)
226 #define AD713X_STREAM_MODE_BITS_MODE(x) (((x) & 0xFF) << 0)
231 #define AD713X_TRANSFER_MASTER_SLAVE_TX_BIT_MSK NO_OS_BIT(0)
236 #define AD713X_DEV_CONFIG1_MPC_MAGPHA_EN_MSK NO_OS_BIT(6)
237 #define AD713X_DEV_CONFIG1_MPC_MAG_EN_MSK NO_OS_BIT(5)
238 #define AD713X_DEV_CONFIG1_AA_MODE_MSK NO_OS_BIT(4)
239 #define AD713X_DEV_CONFIG1_SDO_PIN_SRC_SEL_MSK NO_OS_BIT(2)
240 #define AD713X_DEV_CONFIG1_REF_GAIN_CORR_EN_MSK NO_OS_BIT(1)
241 #define AD713X_DEV_CONFIG1_CLKOUT_EN_MSK NO_OS_BIT(0)
246 #define AD713X_DATA_PACKET_CONFIG_CRC_POLY_RST_MSK NO_OS_BIT(7)
247 #define AD713X_DATA_PACKET_CONFIG_FRAME_MSK NO_OS_GENMASK(6, 4)
248 #define AD713X_DATA_PACKET_CONFIG_FRAME_MODE(x) (((x) & 0x7) << 4)
249 #define AD713X_DATA_PACKET_CONFIG_DCLK_FREQ_MSK NO_OS_GENMASK(3, 0)
250 #define AD713X_DATA_PACKET_CONFIG_DCLK_FREQ_MODE(x) (((x) & 0xF) << 0)
255 #define AD713X_DIG_INT_CONFIG_DAISY_CHAIN_NUM_MSK NO_OS_GENMASK(7, 4)
256 #define AD713X_DIG_INT_CONFIG_DAISY_CHAIN_NUM_MODE(x) (((x) & 0xF) << 4)
257 #define AD713X_DIG_INT_CONFIG_AVG_SEL_MSK NO_OS_GENMASK(3, 2)
258 #define AD713X_DIG_INT_CONFIG_AVG_SEL_MODE(x) (((x) & 0x3) << 2)
259 #define AD713X_DIG_INT_CONFIG_FORMAT_MSK NO_OS_GENMASK(1, 0)
260 #define AD713X_DIG_INT_CONFIG_FORMAT_MODE(x) (((x) & 0x3) << 0)
265 #define AD713X_PWRDN_CTRL_PWRDN_CH_MSK(ch) NO_OS_BIT(ch)
266 #define AD713X_PWRDN_CTRL_PWRDN_AUXADC_MSK NO_OS_BIT(2)
267 #define AD713X_PWRDN_CTRL_PWRDN_LDO_MSK NO_OS_BIT(1)
268 #define AD713X_PWRDN_CTRL_PWRDN_SLEEP_MODE_EN_MSK NO_OS_BIT(0)
273 #define AD713X_AIN_RANGE_SEL_CH_MSK(ch) NO_OS_BIT(ch)
278 #define AD713X_DEV_STAT_DCLKMODE_MSK NO_OS_BIT(5)
279 #define AD713X_DEV_STAT_DCLKIO_MSK NO_OS_BIT(4)
280 #define AD713X_DEV_STAT_MODE_MSK NO_OS_BIT(3)
281 #define AD713X_DEV_STAT_CLKSEL_MSK NO_OS_BIT(2)
282 #define AD713X_DEV_STAT_FUSE_ECC_MSK NO_OS_BIT(1)
283 #define AD713X_DEV_STAT_PLL_LOCK_MSK NO_OS_BIT(0)
288 #define AD713X_ODR_VAL_INT_LSB_MSK NO_OS_GENMASK(7, 0)
289 #define AD713X_ODR_VAL_INT_LSB_MODE(x) (((x) & 0xFF) << 0)
294 #define AD713X_ODR_VAL_INT_MID_MSK NO_OS_GENMASK(7, 0)
295 #define AD713X_ODR_VAL_INT_MID_MODE(x) (((x) & 0xFF) << 0)
300 #define AD713X_ODR_VAL_INT_MSB_MSK NO_OS_GENMASK(7, 0)
301 #define AD713X_ODR_VAL_INT_MSB_MODE(x) (((x) & 0xFF) << 0)
306 #define AD713X_ODR_VAL_FLT_LSB_MSK NO_OS_GENMASK(7, 0)
307 #define AD713X_ODR_VAL_FLT_LSB_MODE(x) (((x) & 0xFF) << 0)
312 #define AD713X_ODR_VAL_FLT_MID0_MSK NO_OS_GENMASK(7, 0)
313 #define AD713X_ODR_VAL_FLT_MID0_MODE(x) (((x) & 0xFF) << 0)
318 #define AD713X_ODR_VAL_FLT_MID1_MSK NO_OS_GENMASK(7, 0)
319 #define AD713X_ODR_VAL_FLT_MID1_MODE(x) (((x) & 0xFF) << 0)
324 #define AD713X_ODR_VAL_FLT_MSB_MSK NO_OS_GENMASK(7, 0)
325 #define AD713X_ODR_VAL_FLT_MSB_MODE(x) (((x) & 0xFF) << 0)
330 #define AD713X_ODR_RATE_SEL_CH_MSK(ch) (NO_OS_GENMASK(1, 0) << (2 * ch))
331 #define AD713X_ODR_RATE_SEL_CH_MODE(x, ch) (((x) & 0x3) << (2 * ch))
336 #define AD713X_DIGFILTER_SEL_CH_MSK(ch) (NO_OS_GENMASK(1, 0) << (2 * ch))
337 #define AD713X_DIGFILTER_SEL_CH_MODE(x, ch) (((x) & 0x3) << (2 * ch))
342 #define AD713X_FIR_BW_SEL_CH_MSK(ch) NO_OS_BIT(ch)
347 #define AD713X_GPIO_IO_CTRL_MSK NO_OS_GENMASK(7, 0)
348 #define AD713X_GPIO_IO_CTRL_MODE(x) (((x) & 0xFF) << 0)
353 #define AD713X_GPIO_DATA_MSK NO_OS_GENMASK(7, 0)
354 #define AD713X_GPIO_DATA_MODE(x) (((x) & 0xFF) << 0)
359 #define AD713X_ERR_PIN_EN_OR_AIN_MSK NO_OS_BIT(5)
360 #define AD713X_ERR_PIN_EN_INTERNAL_MSK NO_OS_BIT(4)
361 #define AD713X_ERR_PIN_EN_SPI_MSK NO_OS_BIT(3)
362 #define AD713X_ERR_PIN_EN_LDO_XOSC_MSK NO_OS_BIT(2)
363 #define AD713X_ERR_PIN_EN_TEMP_MSK NO_OS_BIT(1)
364 #define AD713X_ERR_PIN_EN_PWR_MSK NO_OS_BIT(0)
369 #define AD713X_ERR_PIN_IN_STATUS_MSK NO_OS_BIT(2)
370 #define AD713X_ERR_PIN_IN_EN_MSK NO_OS_BIT(1)
371 #define AD713X_ERR_PIN_OUT_EN_MSK NO_OS_BIT(0)
376 #define AD713X_VCMBUF_CTRL_PWRDN_MSK NO_OS_BIT(6)
377 #define AD713X_VCMBUF_CTRL_REF_DIV_SEL_MSK NO_OS_GENMASK(5, 1)
378 #define AD713X_VCMBUF_CTRL_REF_DIV_SEL_MODE(x) (((x) & 0x1F) << 1)
379 #define AD713X_VCMBUF_CTRL_REF_SEL_MSK NO_OS_BIT(0)
384 #define AD713X_DIAGCTRL_ERR_OR_AIN_EN_MSK NO_OS_BIT(5)
385 #define AD713X_DIAGCTRL_ERR_PWR_MON_EN_MSK NO_OS_BIT(4)
386 #define AD713X_DIAGCTRL_MCLK_CNT_EN_MSK NO_OS_BIT(3)
387 #define AD713X_DIAGCTRL_ERR_SPI_CRC_EN_MSK NO_OS_BIT(2)
388 #define AD713X_DIAGCTRL_ERR_MM_CRC_EN_MSK NO_OS_BIT(1)
389 #define AD713X_DIAGCTRL_FUSE_CRC_CHECK_MSK NO_OS_BIT(0)
394 #define AD713X_MPC_CLKDEL_EN_CH_MSK(ch) (NO_OS_GENMASK(1, 0) << (2 * ch))
395 #define AD713X_MPC_CLKDEL_EN_CH_MODE(x, ch) (((x) & 0x3) << (2 * ch))
400 #define AD713X_CH_GAIN_LSB_MSK NO_OS_GENMASK(7, 0)
401 #define AD713X_CH_GAIN_LSB_MODE(x) (((x) & 0xFF) << 0)
406 #define AD713X_CH_GAIN_MID_MSK NO_OS_GENMASK(7, 0)
407 #define AD713X_CH_GAIN_MID_MODE(x) (((x) & 0xFF) << 0)
412 #define AD713X_CH_GAIN_CAL_SEL_MSK NO_OS_BIT(4)
413 #define AD713X_CH_GAIN_MSB_MSK NO_OS_GENMASK(3, 0)
414 #define AD713X_CH_GAIN_MSB_MODE(x) (((x) & 0xF) << 0)
419 #define AD713X_CH_OFFSET_LSB_MSK NO_OS_GENMASK(7, 0)
420 #define AD713X_CH_OFFSET_LSB_MODE(x) (((x) & 0xFF) << 0)
425 #define AD713X_CH_OFFSET_MID_MSK NO_OS_GENMASK(7, 0)
426 #define AD713X_CH_OFFSET_MID_MODE(x) (((x) & 0xFF) << 0)
431 #define AD713X_CH_OFFSET_CAL_EN_MSK NO_OS_BIT(7)
432 #define AD713X_CH_OFFSET_MSB_MSK NO_OS_GENMASK(6, 0)
433 #define AD713X_CH_OFFSET_MSB_MODE(x) (((x) & 0x7F) << 0)
438 #define AD713X_MCLK_COUNT_MSK NO_OS_GENMASK(7, 0)
439 #define AD713X_MCLK_COUNT_MODE(x) (((x) & 0xFF) << 0)
444 #define AD713X_DIGFILTER_ERR_OFUF_CH_MSK(ch) NO_OS_BIT(ch)
449 #define AD713X_DIGFILTER_CH_SETTLED_MSK(ch) NO_OS_BIT(ch)
454 #define AD713X_INT_ERR_NO_CLOCK_MSK NO_OS_BIT(5)
455 #define AD713X_INT_ERR_TEMP_MSK NO_OS_BIT(4)
456 #define AD713X_INT_ERR_DCLK_MSK NO_OS_BIT(3)
457 #define AD713X_INT_ERR_FUSE_CRC_MSK NO_OS_BIT(2)
458 #define AD713X_INT_ERR_ASRC_MSK NO_OS_BIT(1)
459 #define AD713X_INT_ERR_MM_CRC_MSK NO_OS_BIT(0)
464 #define AD713X_POWER_ERR_OV_IOVDD_MSK NO_OS_BIT(3)
465 #define AD713X_POWER_ERR_OV_CLKVDD_MSK NO_OS_BIT(2)
466 #define AD713X_POWER_ERR_OV_DVDD1V8_MSK NO_OS_BIT(1)
467 #define AD713X_POWER_ERR_OV_AVDD1V8_MSK NO_OS_BIT(0)
472 #define AD713X_POWER_ERR_UV_IOVDD_MSK NO_OS_BIT(3)
473 #define AD713X_POWER_ERR_UV_CLKVDD_MSK NO_OS_BIT(2)
474 #define AD713X_POWER_ERR_UV_DVDD1V8_MSK NO_OS_BIT(1)
475 #define AD713X_POWER_ERR_UV_AVDD1V8_MSK NO_OS_BIT(0)
480 #define AD713X_POWER_ERR_OV_VREF_MSK NO_OS_BIT(3)
481 #define AD713X_POWER_ERR_OV_LDOIN_MSK NO_OS_BIT(2)
482 #define AD713X_POWER_ERR_OV_DVDD5_MSK NO_OS_BIT(1)
483 #define AD713X_POWER_ERR_OV_AVDD5_MSK NO_OS_BIT(0)
488 #define AD713X_POWER_ERR_UV_VREF_MSK NO_OS_BIT(3)
489 #define AD713X_POWER_ERR_UV_LDOIN_MSK NO_OS_BIT(2)
490 #define AD713X_POWER_ERR_UV_DVDD5_MSK NO_OS_BIT(1)
491 #define AD713X_POWER_ERR_UV_AVDD5_MSK NO_OS_BIT(0)
496 #define AD713X_SPI_ERROR_CRC_MSK NO_OS_BIT(3)
497 #define AD713X_SPI_ERROR_SCLK_CNT_MSK NO_OS_BIT(2)
498 #define AD713X_SPI_ERROR_WRITE_MSK NO_OS_BIT(1)
499 #define AD713X_SPI_ERROR_READ_MSK NO_OS_BIT(0)
504 #define AD713X_ERR_OR_AIN_MSK(ch) NO_OS_BIT(ch)
509 #define AD713X_AVDD5_VALUE_PIN_MSK NO_OS_GENMASK(7, 0)
510 #define AD713X_AVDD5_VALUE_PIN_MODE(x) (((x) & 0xFF) << 0)
515 #define AD713X_DVDD5_VALUE_PIN_MSK NO_OS_GENMASK(7, 0)
516 #define AD713X_DVDD5_VALUE_PIN_MODE(x) (((x) & 0xFF) << 0)
521 #define AD713X_VREF_VALUE_PIN_MSK NO_OS_GENMASK(7, 0)
522 #define AD713X_VREF_VALUE_PIN_MODE(x) (((x) & 0xFF) << 0)
527 #define AD713X_LDOIN_VALUE_PIN_MSK NO_OS_GENMASK(7, 0)
528 #define AD713X_LDOIN_VALUE_PIN_MODE(x) (((x) & 0xFF) << 0)
533 #define AD713X_AVDD1V8_VALUE_PIN_MSK NO_OS_GENMASK(7, 0)
534 #define AD713X_AVDD1V8_VALUE_PIN_MODE(x) (((x) & 0xFF) << 0)
539 #define AD713X_DVDD1V8_VALUE_PIN_MSK NO_OS_GENMASK(7, 0)
540 #define AD713X_DVDD1V8_VALUE_PIN_MODE(x) (((x) & 0xFF) << 0)
545 #define AD713X_CLKVDD_VALUE_PIN_MSK NO_OS_GENMASK(7, 0)
546 #define AD713X_CLKVDD_VALUE_PIN_MODE(x) (((x) & 0xFF) << 0)
551 #define AD713X_IOVDD_VALUE_PIN_MSK NO_OS_GENMASK(7, 0)
552 #define AD713X_IOVDD_VALUE_PIN_MODE(x) (((x) & 0xFF) << 0)
557 #define AD713X_TEMP_DATA_MSK NO_OS_GENMASK(7, 0)
558 #define AD713X_TEMP_DATA_MODE(x) (((x) & 0xFF) << 0)
560 #define AD713X_REG_READ(x) ((1 << 7) | (x & 0x7F))
760 uint32_t mask, uint8_t data);
struct no_os_gpio_init_param * gpio_dclkmode
Definition: ad713x.h:715
ad717x_mpc_clkdel
AD713x list of clock delays.
Definition: ad713x.h:667
#define AD713X_MPC_CLKDEL_EN_CH_MSK(ch)
Definition: ad713x.h:394
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
Header file for the ad713x Driver.
int32_t ad713x_dig_filter_sel_ch(struct ad713x_dev *dev, enum ad713x_dig_filter_sel filter, enum ad713x_channels ch)
Digital filter type selection for each channel.
Definition: ad713x.c:338
@ SINC6
Definition: ad713x.h:639
ad713x_doutx_format
AD713x list for possible output modes.
Definition: ad713x.h:620
bool clk_delay_en
Definition: ad713x.h:740
@ CH1
Definition: ad713x.h:654
@ SINC3
Definition: ad713x.h:641
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
int32_t ad713x_dout_format_config(struct ad713x_dev *dev, enum ad713x_doutx_format format)
DOUTx output format configuration.
Definition: ad713x.c:235
int32_t ad713x_mag_phase_clk_delay_chan(struct ad713x_dev *dev, enum ad713x_channels chan, enum ad717x_mpc_clkdel mode)
Change magnitude and phase calibration clock delay mode for a specific channel.
Definition: ad713x.c:290
Header file of SPI Interface.
enum ad713x_supported_dev_ids dev_id
Definition: ad713x.h:733
@ ID_AD7134
Definition: ad713x.h:572
int32_t ad713x_dout_format_config(struct ad713x_dev *dev, enum ad713x_doutx_format format)
DOUTx output format configuration.
Definition: ad713x.c:235
@ QUAD_CH_PO
Definition: ad713x.h:626
@ ADC_16_BIT_DATA
Definition: ad713x.h:594
int32_t ad713x_wideband_bw_sel(struct ad713x_dev *dev, enum ad713x_channels ch, uint8_t wb_opt)
Select the wideband filter bandwidth for a channel. The option is relative to ODR,...
Definition: ad713x.c:387
AD713x driver initialization structure.
Definition: ad713x.h:709
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:50
ad713x_channels
AD713x list of channels.
Definition: ad713x.h:650
Header file of Delay functions.
@ CH_AVG_MODE
Definition: ad713x.h:628
ad713x_dig_filter_sel
AD713x list of input filters.
Definition: ad713x.h:635
@ ADC_24_BIT_DATA
Definition: ad713x.h:596
enum ad713x_crc_header crc_header
Definition: ad713x.h:737
int32_t ad713x_set_power_mode(struct ad713x_dev *dev, enum ad713x_power_mode mode)
Device power mode control.
Definition: ad713x.c:174
@ AD713X_CH_MAX
Definition: ad713x.h:660
int32_t ad713x_clkout_output_en(struct ad713x_dev *dev, bool enable)
Enable/Disable CLKOUT output.
Definition: ad713x.c:354
bool pnd
Definition: ad713x.h:731
bool dclkio_out_nin
Definition: ad713x.h:729
int32_t ad713x_set_out_data_frame(struct ad713x_dev *dev, enum ad713x_adc_data_len adc_data_len, enum ad713x_crc_header crc_header)
ADC conversion data output frame control.
Definition: ad713x.c:201
ad713x_power_mode
AD713x power modes.
Definition: ad713x.h:581
Definition: ad9361_util.h:69
int32_t ad713x_spi_write_mask(struct ad713x_dev *dev, uint8_t reg_addr, uint32_t mask, uint8_t data)
SPI write to device using a mask.
Definition: ad713x.c:149
#define AD713X_REG_DATA_PACKET_CONFIG
Definition: ad713x.h:75
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
struct no_os_gpio_init_param * gpio_pnd
Definition: ad713x.h:721
@ FIR
Definition: ad713x.h:637
enum ad713x_adc_data_len adc_data_len
Definition: ad713x.h:735
int32_t ad713x_set_out_data_frame(struct ad713x_dev *dev, enum ad713x_adc_data_len adc_data_len, enum ad713x_crc_header crc_header)
ADC conversion data output frame control.
Definition: ad713x.c:201
enum ad7616_mode mode
Definition: ad7616.h:226
#define AD713X_DIG_INT_CONFIG_FORMAT_MSK
Definition: ad713x.h:259
enum ad713x_supported_dev_ids dev_id
Definition: ad713x.h:696
int32_t ad713x_channel_sync(struct ad713x_dev *dev)
Multidevice synchronization between channels on different devices.
Definition: ad713x.c:305
struct no_os_gpio_desc * gpio_dclkio
Definition: ad713x.h:688
int32_t ad713x_clkout_output_en(struct ad713x_dev *dev, bool enable)
Enable/Disable CLKOUT output.
Definition: ad713x.c:354
int32_t ad713x_remove(struct ad713x_dev *dev)
Free the resources allocated by ad713x_init().
Definition: ad713x.c:638
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
#define AD713X_REG_DEVICE_CONFIG
Definition: ad713x.h:62
uint8_t chip_select
Definition: no_os_spi.h:200
struct no_os_spi_desc * spi_desc
Definition: ad713x.h:682
struct no_os_gpio_desc * gpio_mode
Definition: ad713x.h:684
ad713x_crc_header
AD713x possible data CRC header choices.
Definition: ad713x.h:607
int32_t ad713x_spi_reg_dump(struct ad713x_dev *dev)
Print all registers values for the AD4134 device. Register map has gaps, reg dump function specific f...
Definition: ad713x.c:664
int32_t ad713x_spi_reg_write(struct ad713x_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write to device.
Definition: ad713x.c:129
#define AD713X_DIGFILTER_SEL_CH_MODE(x, ch)
Definition: ad713x.h:337
int32_t ad713x_remove(struct ad713x_dev *dev)
Free the resources allocated by ad713x_init().
Definition: ad713x.c:638
#define AD713X_INT_CONFIG_B_DIG_IF_RST_MSK
Definition: ad713x.h:156
@ SINC3_50_60_REJ
Definition: ad713x.h:643
#define AD713X_DEV_CONFIG1_REF_GAIN_CORR_EN_MSK
Definition: ad713x.h:240
#define AD713X_MPC_CLKDEL_EN_CH_MODE(x, ch)
Definition: ad713x.h:395
int32_t ad713x_channel_sync(struct ad713x_dev *dev)
Multidevice synchronization between channels on different devices.
Definition: ad713x.c:305
@ NO_CRC
Definition: ad713x.h:609
@ DELAY_NONE
Definition: ad713x.h:669
enum ad713x_crc_header crc_header
Definition: ad713x.h:700
int32_t ad713x_wideband_bw_sel(struct ad713x_dev *dev, enum ad713x_channels ch, uint8_t wb_opt)
Select the wideband filter bandwidth for a channel. The option is relative to ODR,...
Definition: ad713x.c:387
#define AD713X_FIR_BW_SEL_CH_MSK(ch)
Definition: ad713x.h:342
int32_t ad713x_ref_gain_correction_en(struct ad713x_dev *dev, bool enable)
Enable/Disable reference gain correction.
Definition: ad713x.c:368
struct no_os_gpio_desc * gpio_resetn
Definition: ad713x.h:690
@ CH0
Definition: ad713x.h:652
int32_t ad713x_spi_reg_write(struct ad713x_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write to device.
Definition: ad713x.c:129
@ ADC_32_BIT_DATA
Definition: ad713x.h:598
@ CRC_6
Definition: ad713x.h:611
struct no_os_spi_init_param spi_init_prm
Definition: ad713x.h:711
ad713x_adc_data_len
AD713x possible number of bits per data sample.
Definition: ad713x.h:592
int32_t ad713x_dig_filter_sel_ch(struct ad713x_dev *dev, enum ad713x_dig_filter_sel filter, enum ad713x_channels ch)
Digital filter type selection for each channel.
Definition: ad713x.c:338
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
struct no_os_gpio_init_param * gpio_dclkio
Definition: ad713x.h:717
@ DELAY_1_CLOCKS
Definition: ad713x.h:671
struct no_os_gpio_desc * gpio_dclkmode
Definition: ad713x.h:686
#define AD713X_DEV_CONFIG_PWR_MODE_MSK
Definition: ad713x.h:163
#define AD713X_REG_FIR_BW_SEL
Definition: ad713x.h:89
@ ID_AD4134
Definition: ad713x.h:574
int32_t ad713x_spi_reg_read(struct ad713x_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Read from device.
Definition: ad713x.c:104
#define AD713X_REG_DEVICE_CONFIG1
Definition: ad713x.h:74
struct no_os_gpio_init_param * gpio_mode
Definition: ad713x.h:713
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
#define AD713X_DIGFILTER_SEL_CH_MSK(ch)
Definition: ad713x.h:336
#define AD713X_REG_DIGITAL_INTERFACE_CONFIG
Definition: ad713x.h:76
#define AD713X_DATA_PACKET_CONFIG_FRAME_MSK
Definition: ad713x.h:247
int32_t ad713x_spi_reg_read(struct ad713x_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Read from device.
Definition: ad713x.c:104
@ DELAY_2_CLOCKS
Definition: ad713x.h:673
void * extra
Definition: no_os_spi.h:212
struct no_os_gpio_init_param * gpio_cs_sync
Definition: ad713x.h:723
bool mode_master_nslave
Definition: ad713x.h:702
#define AD713X_CHIP_TYPE
Definition: ad713x.h:170
@ HIGH_POWER
Definition: ad713x.h:585
#define AD713X_REG_INTERFACE_CONFIG_B
Definition: ad713x.h:61
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
#define AD713X_INT_CONFIG_B_SINGLE_INSTR_MSK
Definition: ad713x.h:154
@ CRC_8
Definition: ad713x.h:613
int32_t ad713x_mag_phase_clk_delay(struct ad713x_dev *dev, bool clk_delay_en)
Magnitude and phase matching calibration clock delay enable for all channels at 2 clock delay....
Definition: ad713x.c:255
#define AD713X_REG_CHAN_DIG_FILTER_SEL
Definition: ad713x.h:88
AD713x driver handler structure.
Definition: ad713x.h:680
@ LOW_POWER
Definition: ad713x.h:583
int32_t ad713x_spi_write_mask(struct ad713x_dev *dev, uint8_t reg_addr, uint32_t mask, uint8_t data)
SPI write to device using a mask.
Definition: ad713x.c:149
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
ad713x_supported_dev_ids
ID of devices supported by the driver.
Definition: ad713x.h:570
int32_t ad713x_mag_phase_clk_delay(struct ad713x_dev *dev, bool clk_delay_en)
Magnitude and phase matching calibration clock delay enable for all channels at 2 clock delay....
Definition: ad713x.c:255
#define AD713X_REG_CHIP_TYPE
Definition: ad713x.h:63
enum ad713x_doutx_format format
Definition: ad713x.h:738
#define AD713X_DATA_PACKET_CONFIG_FRAME_MODE(x)
Definition: ad713x.h:248
struct no_os_spi_desc * gpio_cs_sync
Definition: ad713x.h:694
enum ad713x_adc_data_len adc_data_len
Definition: ad713x.h:698
@ CH3
Definition: ad713x.h:658
int32_t ad713x_init(struct ad713x_dev **device, struct ad713x_init_param *init_param)
Initialize the device.
Definition: ad713x.c:551
#define AD713X_REG_READ(x)
Definition: ad713x.h:560
int32_t ad713x_ref_gain_correction_en(struct ad713x_dev *dev, bool enable)
Enable/Disable reference gain correction.
Definition: ad713x.c:368
struct no_os_spi_desc * spi_common_dev
Definition: ad713x.h:743
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
bool dclkmode_free_ngated
Definition: ad713x.h:727
const struct no_os_spi_platform_ops * platform_ops
Definition: no_os_spi.h:208
Header file of GPIO Interface.
@ ID_AD7136
Definition: ad713x.h:573
#define AD713X_DEV_CONFIG1_CLKOUT_EN_MSK
Definition: ad713x.h:241
uint32_t max_speed_hz
Definition: no_os_spi.h:198
@ DUAL_CH_DC
Definition: ad713x.h:624
struct no_os_gpio_init_param * gpio_resetn
Definition: ad713x.h:719
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
@ ID_AD7132
Definition: ad713x.h:571
Header file of utility functions.
int32_t ad713x_set_power_mode(struct ad713x_dev *dev, enum ad713x_power_mode mode)
Device power mode control.
Definition: ad713x.c:174
int32_t ad713x_spi_reg_dump(struct ad713x_dev *dev)
Print all registers values for the AD4134 device. Register map has gaps, reg dump function specific f...
Definition: ad713x.c:664
#define AD713X_CHIP_TYPE_BITS_MODE(x)
Definition: ad713x.h:169
#define AD713X_REG_MPC_CONFIG
Definition: ad713x.h:96
@ SINGLE_CH_DC
Definition: ad713x.h:622
enum no_os_spi_mode mode
Definition: no_os_spi.h:202
#define AD713X_DIG_INT_CONFIG_FORMAT_MODE(x)
Definition: ad713x.h:260
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
int32_t ad713x_init(struct ad713x_dev **device, struct ad713x_init_param *init_param)
Initialize the device.
Definition: ad713x.c:551
@ INVALID
Definition: ad713x.h:600
@ CH2
Definition: ad713x.h:656
bool mode_master_nslave
Definition: ad713x.h:725
struct no_os_gpio_desc * gpio_pnd
Definition: ad713x.h:692
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
int32_t no_os_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: no_os_gpio.c:75