no-OS
Loading...
Searching...
No Matches
ad4080.h
Go to the documentation of this file.
1/***************************************************************************/
34
35#ifndef __AD4080_H__
36#define __AD4080_H__
37
38#include <stdint.h>
39#include <string.h>
40#include "no_os_util.h"
41#include "no_os_spi.h"
42#include "no_os_gpio.h"
43
45#define AD4080_REG_INTERFACE_CONFIG_A 0x0000
46#define AD4080_REG_INTERFACE_CONFIG_B 0x0001
47#define AD4080_REG_DEVICE_CONFIG 0x0002
48#define AD4080_REG_CHIP_TYPE 0x0003
49#define AD4080_REG_PRODUCT_ID_L 0x0004
50#define AD4080_REG_PRODUCT_ID_H 0x0005
51#define AD4080_REG_CHIP_GRADE 0x0006
52#define AD4080_REG_SCRATCH_PAD 0x000A
53#define AD4080_REG_SPI_REVISION 0x000B
54#define AD4080_REG_VENDOR_L 0x000C
55#define AD4080_REG_VENDOR_H 0x000D
56#define AD4080_REG_STREAM_MODE 0x000E
57#define AD4080_REG_TRANSFER_CONFIG 0x000F
58#define AD4080_REG_INTERFACE_CONFIG_C 0x0010
59#define AD4080_REG_INTERFACE_STATUS_A 0x0011
60#define AD4080_REG_DEVICE_STATUS 0x0014
61#define AD4080_REG_DATA_INTF_CONFIG_A 0x0015
62#define AD4080_REG_DATA_INTF_CONFIG_B 0x0016
63#define AD4080_REG_DATA_INTF_CONFIG_C 0x0017
64#define AD4080_REG_PWR_CTRL 0x0018
65#define AD4080_REG_GPIO_CONFIG_A 0x0019
66#define AD4080_REG_GPIO_CONFIG_B 0x001A
67#define AD4080_REG_GPIO_CONFIG_C 0x001B
68#define AD4080_REG_GENERAL_CONFIG 0x001C
69#define AD4080_REG_FIFO_WATERMARK 0x001D
70#define AD4080_REG_EVENT_HYSTERESIS 0x001F
71#define AD4080_REG_EVENT_DETECTION_HI 0x0021
72#define AD4080_REG_EVENT_DETECTION_LO 0x0023
73#define AD4080_REG_OFFSET 0x0025
74#define AD4080_REG_GAIN 0x0027
75#define AD4080_REG_FILTER_CONFIG 0x0029
76
78#define AD4080_SW_RESET_MSK NO_OS_BIT(7) | NO_OS_BIT(0)
79#define AD4080_ADDR_ASC_MSK NO_OS_BIT(5)
80#define AD4080_SDO_ENABLE_MSK NO_OS_BIT(4)
81
83#define AD4080_SINGLE_INST_MSK NO_OS_BIT(7)
84#define AD4080_SHORT_INST_MSK NO_OS_BIT(3)
85
87#define AD4080_OP_MODE_MSK NO_OS_GENMASK(1, 0)
88
90#define AD4080_KEEP_STREAM_LEN_VAL_MSK NO_OS_BIT(2)
91
93#define AD4080_STRICT_REG_ACCESS_MSK NO_OS_BIT(5)
94
96#define AD4080_INTF_CHK_EN_MSK NO_OS_BIT(4)
97#define AD4080_SPI_LVDS_LANES_MSK NO_OS_BIT(2)
98#define AD4080_DATA_INTF_MODE_MSK NO_OS_BIT(0)
99
101#define AD4080_LVDS_CNV_CLK_CNT_MSK NO_OS_GENMASK(7, 4)
102#define AD4080_LVDS_SELF_CLK_MODE_MSK NO_OS_BIT(3)
103#define AD4080_LVDS_CNV_EN NO_OS_BIT(0)
104
106#define AD4080_LVDS_VOD_MSK NO_OS_GENMASK(6, 4)
107
109#define AD4080_ANA_DIG_LDO_PD_MSK NO_OS_BIT(1)
110#define AD4080_INTF_LDO_PD_MSK NO_OS_BIT(0)
111
113#define AD4080_GPIO_EN_MSK(x) NO_OS_BIT(x)
114#define AD4080_GPIO_SEL_MSK(x) (NO_OS_GENMASK(3, 0) << (4 * ((x)%2)))
115#define AD4080_GPIO_DATA_MSK(x) (NO_OS_BIT(x) << 4)
116
118#define AD4080_FIFO_MODE_MSK NO_OS_GENMASK(1, 0)
119
121#define AD4080_FILTER_SEL_MSK NO_OS_GENMASK(1, 0)
122#define AD4080_SINC_DECIMATION_MSK NO_OS_GENMASK(6, 3)
123
124#define AD4080_FILTER_SINC1 1
125#define AD4080_FILTER_SINC5 2
126#define AD4080_FILTER_SINC5_PLUS 3
127
128#define AD4080_SINC_DEC_2 0
129#define AD4080_SINC_DEC_4 1
130#define AD4080_SINC_DEC_8 2
131#define AD4080_SINC_DEC_16 3
132#define AD4080_SINC_DEC_32 4
133#define AD4080_SINC_DEC_64 5
134#define AD4080_SINC_DEC_128 6
135#define AD4080_SINC_DEC_256 7
136#define AD4080_SINC_DEC_512 8
137#define AD4080_SINC_DEC_1024 9
138
140#define AD4080_SW_RESET NO_OS_BIT(7) | NO_OS_BIT(0)
141#define AD4080_SPI_READ NO_OS_BIT(7)
142#define BYTE_ADDR_H NO_OS_GENMASK(15, 8)
143#define BYTE_ADDR_L NO_OS_GENMASK(7, 0)
144#define AD4080_CHIP_ID NO_OS_GENMASK(2, 0)
145
147#define AD4080_PRODUCT_ID 0x0050
148#define AD4081_PRODUCT_ID 0x0051
149#define AD4082_PRODUCT_ID 0x0052
150#define AD4083_PRODUCT_ID 0x0053
151#define AD4085_PRODUCT_ID 0x0055
152#define AD4086_PRODUCT_ID 0x0056
153#define AD4087_PRODUCT_ID 0x0057
154#define AD4088_PRODUCT_ID 0x0058
155#define AD4080_FIFO_SIZE NO_OS_BIT(14)
156#define AD4080_FIFO_DEPTH 16384 /* AD4080 is 16K deep maximum */
157#define AD4080_MAX_FIFO_WATERMARK (AD4080_FIFO_DEPTH)
158#define AD4080_LAST_REG_ADDR AD4080_REG_FILTER_CONFIG
159#define AD4080_ADC_GRANULARITY 20 /* 20 Bits precision */
160#define ADC_REF_VOLTAGE 3300 /* mV granularity */
161#define AD4080_ADC_MAX_RESOLUTION_VAL ((1 << AD4080_ADC_GRANULARITY) - 1)
162#define OFFSET_CORRECTION_NEGATIVE_LIMIT 0x800
163
164
170
176
182
189
195
201
207
213
219
225
232
238
244
245/* AD4080 GPIOs */
253
254/* AD4080 GPIO Output Enable Selection */
259
274
282
295
302 const char *name;
304 uint16_t product_id;
306 uint8_t num_bits;
309};
310
312
317
323
373
378
384
430
432static inline void *ad4080_privdata(struct ad4080_dev *dev)
433{
434 if (!dev)
435 return NULL;
436 return dev->privdata;
437}
438
440int ad4080_read_data(struct ad4080_dev *dev, uint8_t *buf, size_t len);
441
443int ad4080_write(struct ad4080_dev *dev, uint16_t reg_addr, uint8_t reg_val);
444
446int ad4080_read(struct ad4080_dev *dev, uint16_t reg_addr, uint8_t *reg_val);
447
449int ad4080_update_bits(struct ad4080_dev *dev, uint16_t reg_addr, uint8_t mask,
450 uint8_t reg_val);
451
453int ad4080_soft_reset(struct ad4080_dev *dev);
454
456int ad4080_set_addr_asc(struct ad4080_dev *dev, enum ad4080_addr_asc addr_asc);
457
459int ad4080_get_addr_asc(struct ad4080_dev *dev, enum ad4080_addr_asc *addr_asc);
460
462int ad4080_set_single_instr(struct ad4080_dev *dev,
464
466int ad4080_get_single_instr(struct ad4080_dev *dev,
468
470int ad4080_set_short_instr(struct ad4080_dev *dev,
472
474int ad4080_get_short_instr(struct ad4080_dev *dev,
476
478int ad4080_set_op_mode(struct ad4080_dev *dev,
480
482int ad4080_get_op_mode(struct ad4080_dev *dev,
483 enum ad4080_op_mode *op_mode);
484
486int ad4080_set_strict_reg_access(struct ad4080_dev *dev,
488
490int ad4080_get_strict_reg_access(struct ad4080_dev *dev,
492
494int ad4080_set_intf_chk_en(struct ad4080_dev *dev,
496
498int ad4080_get_intf_chk_en(struct ad4080_dev *dev,
500
502int ad4080_set_cnv_spi_lvds_lanes(struct ad4080_dev *dev,
504
506int ad4080_get_cnv_spi_lvds_lanes(struct ad4080_dev *dev,
508
510int ad4080_set_conv_data_spi_lvds(struct ad4080_dev *dev,
512
514int ad4080_get_conv_data_spi_lvds(struct ad4080_dev *dev,
516
518int ad4080_set_lvds_cnv_clk_cnt(struct ad4080_dev *dev,
519 uint8_t lvds_cnv_clk_cnt);
520
522int ad4080_get_lvds_cnv_clk_cnt(struct ad4080_dev *dev,
523 uint8_t *lvds_cnv_clk_cnt);
524
526int ad4080_set_lvds_self_clk_mode(struct ad4080_dev *dev,
528
530int ad4080_get_lvds_self_clk_mode(struct ad4080_dev *dev,
532
533
535int ad4080_set_lvds_cnv_clk_mode(struct ad4080_dev *dev,
537
539int ad4080_get_lvds_cnv_clk_mode(struct ad4080_dev *dev,
541
543int ad4080_set_lvds_vod(struct ad4080_dev *dev,
545
547int ad4080_get_lvds_vod(struct ad4080_dev *dev, enum ad4080_lvds_vod *lvds_vod);
548
550int ad4080_set_ana_dig_ldo_pd(struct ad4080_dev *dev,
552
554int ad4080_get_ana_dig_ldo_pd(struct ad4080_dev *dev,
556
558int ad4080_set_intf_ldo_pd(struct ad4080_dev *dev,
560
562int ad4080_get_intf_ldo_pd(struct ad4080_dev *dev,
564
566int ad4080_set_fifo_mode(struct ad4080_dev *dev,
568
570int ad4080_get_fifo_mode(struct ad4080_dev *dev,
572
574int ad4080_set_fifo_watermark(struct ad4080_dev *dev,
575 uint16_t fifo_watermark);
576
578int ad4080_get_fifo_watermark(struct ad4080_dev *dev,
579 uint16_t *fifo_watermark);
580
582int ad4080_set_gpio_output_enable(struct ad4080_dev *dev,
583 enum ad4080_gpio gpio,
585
587int ad4080_set_gpio_output_func(struct ad4080_dev *dev,
588 enum ad4080_gpio gpio,
589 enum ad4080_gpio_op_func_sel gpio_func);
590
592int ad4080_gpio_write_data(struct ad4080_dev *dev,
593 enum ad4080_gpio gpio,
594 bool data);
595
597int ad4080_gpio_read_data(struct ad4080_dev *dev,
598 enum ad4080_gpio gpio,
599 bool *data);
600
602int ad4080_configuration_intf_init(struct ad4080_dev *device,
603 struct ad4080_init_param init_param);
604
606int ad4080_data_intf_init(struct ad4080_dev *device,
607 struct ad4080_init_param init_param);
608
610int ad4080_init(struct ad4080_dev **device,
611 struct ad4080_init_param init_param);
612
614int ad4080_remove(struct ad4080_dev *dev);
615
616#endif /* __AD4080_H__ */
const struct ad4080_chip_info ad4080_chip_info_tbl[NUM_AD4080_DEVICES]
Definition ad4080.c:43
int ad4080_set_lvds_vod(struct ad4080_dev *dev, enum ad4080_lvds_vod lvds_vod)
Set AD4080 LVDS Differential Output Voltage.
Definition ad4080.c:807
int ad4080_get_intf_chk_en(struct ad4080_dev *dev, enum ad4080_intf_chk_en *intf_chk_en)
Get AD4080 Output Pattern.
Definition ad4080.c:535
ad4080_op_mode
Definition ad4080.h:184
@ AD4080_OP_NORMAL
Definition ad4080.h:185
@ AD4080_OP_LOW_POWER
Definition ad4080.h:187
@ AD4080_OP_STANDBY
Definition ad4080.h:186
int ad4080_get_op_mode(struct ad4080_dev *dev, enum ad4080_op_mode *op_mode)
Get Operation Mode.
Definition ad4080.c:437
int ad4080_set_op_mode(struct ad4080_dev *dev, enum ad4080_op_mode op_mode)
Set Operation Mode.
Definition ad4080.c:412
int ad4080_remove(struct ad4080_dev *dev)
Remove the device and release resources.
Definition ad4080.c:1403
int ad4080_set_strict_reg_access(struct ad4080_dev *dev, enum ad4080_strict_reg_access strict_reg)
Set Strict Register Access.
Definition ad4080.c:461
ad4080_lvds_self_clk_mode
Definition ad4080.h:215
@ AD4080_ECHO_CLK_MODE
Definition ad4080.h:216
@ AD4080_SELF_CLK_MODE
Definition ad4080.h:217
int ad4080_data_intf_init(struct ad4080_dev *device, struct ad4080_init_param init_param)
Configure the data interface during initialization.
Definition ad4080.c:1223
int ad4080_set_single_instr(struct ad4080_dev *dev, enum ad4080_single_instr single_instr)
Set Single/Streaming Mode.
Definition ad4080.c:314
ad4080_gpio_op_func_sel
Definition ad4080.h:261
@ AD4080_GPIO_LT_DETECT
Definition ad4080.h:267
@ AD4080_GPIO_HT_DETECT
Definition ad4080.h:266
@ AD4080_GPIO_GPO_DATA
Definition ad4080.h:269
@ AD4080_GPIO_EXT_EVENT_TRIGGER_FIFO
Definition ad4080.h:271
@ AD4080_GPIO_FILTER_RESULT_READY
Definition ad4080.h:265
@ AD4080_GPIO_STATUS_ALERT
Definition ad4080.h:268
@ AD4080_GPIO_FILTER_SYNC_INPUT
Definition ad4080.h:270
@ AD4080_GPIO_FIFO_READ_DONE
Definition ad4080.h:264
@ AD4080_GPIO_ADI_NSPI_SDO_DATA
Definition ad4080.h:262
@ AD4080_GPIO_FIFO_FULL
Definition ad4080.h:263
@ AD4080_GPIO_CNV_INHIBIT_INPUT
Definition ad4080.h:272
ad4080_lvds_vod
Definition ad4080.h:227
@ AD4080_185mVPP
Definition ad4080.h:228
@ AD4080_240mVPP
Definition ad4080.h:229
@ AD4080_325mVPP
Definition ad4080.h:230
int ad4080_set_gpio_output_func(struct ad4080_dev *dev, enum ad4080_gpio gpio, enum ad4080_gpio_op_func_sel gpio_func)
Configure the GPIO output for a specific function.
Definition ad4080.c:1090
ad4080_cnv_spi_lvds_lanes
Definition ad4080.h:203
@ AD4080_MULTIPLE_LANES
Definition ad4080.h:205
@ AD4080_ONE_LANE
Definition ad4080.h:204
int ad4080_set_short_instr(struct ad4080_dev *dev, enum ad4080_short_instr short_instr)
Set Short Instruction.
Definition ad4080.c:363
int ad4080_set_intf_ldo_pd(struct ad4080_dev *dev, enum ad4080_intf_ldo_pd intf_ldo_pd)
Set AD4080 Interface LDO.
Definition ad4080.c:904
int ad4080_set_fifo_mode(struct ad4080_dev *dev, enum ad4080_fifo_mode fifo_mode)
Set AD4080 Conversion Data FIFO Mode.
Definition ad4080.c:953
int ad4080_configuration_intf_init(struct ad4080_dev *device, struct ad4080_init_param init_param)
Configure the config SPI interface during initialization.
Definition ad4080.c:1193
int ad4080_set_addr_asc(struct ad4080_dev *dev, enum ad4080_addr_asc addr_asc)
Set Address Ascension.
Definition ad4080.c:267
int ad4080_init(struct ad4080_dev **device, struct ad4080_init_param init_param)
Initialize the device.
Definition ad4080.c:1297
int ad4080_set_lvds_self_clk_mode(struct ad4080_dev *dev, enum ad4080_lvds_self_clk_mode lvds_self_clk_mode)
Set AD4080 LVDS Self Clock Mode.
Definition ad4080.c:709
int ad4080_set_lvds_cnv_clk_cnt(struct ad4080_dev *dev, uint8_t lvds_cnv_clk_cnt)
Set AD4080 Interface clock periods from CNV rising edge.
Definition ad4080.c:657
int ad4080_get_lvds_cnv_clk_mode(struct ad4080_dev *dev, enum ad4080_lvds_cnv_clk_mode *cnv_clk_mode)
Get AD4080 LVDS CNV Clock Mode.
Definition ad4080.c:783
int ad4080_update_bits(struct ad4080_dev *dev, uint16_t reg_addr, uint8_t mask, uint8_t reg_val)
Update specific register bits.
Definition ad4080.c:221
int ad4080_read_data(struct ad4080_dev *dev, uint8_t *buf, size_t len)
Read from the AD4080 FIFO.
Definition ad4080.c:160
int ad4080_gpio_write_data(struct ad4080_dev *dev, enum ad4080_gpio gpio, bool data)
Set the GPIO data.
Definition ad4080.c:1124
int ad4080_get_short_instr(struct ad4080_dev *dev, enum ad4080_short_instr *short_instr)
Get Short Instruction.
Definition ad4080.c:388
int ad4080_get_lvds_vod(struct ad4080_dev *dev, enum ad4080_lvds_vod *lvds_vod)
Get AD4080 LVDS Differential Output Voltage.
Definition ad4080.c:832
int ad4080_soft_reset(struct ad4080_dev *dev)
Software reset the device.
Definition ad4080.c:245
ad4080_intf_ldo_pd
Definition ad4080.h:240
@ AD4080_INTF_LDO_EN
Definition ad4080.h:241
@ AD4080_INTF_LDO_DISABLE
Definition ad4080.h:242
int ad4080_get_fifo_watermark(struct ad4080_dev *dev, uint16_t *fifo_watermark)
Get AD4080 FIFO Watermark.
Definition ad4080.c:1027
ad4080_ana_dig_ldo_pd
Definition ad4080.h:234
@ AD4080_AD_LDO_DISABLE
Definition ad4080.h:236
@ AD4080_AD_LDO_EN
Definition ad4080.h:235
int ad4080_get_ana_dig_ldo_pd(struct ad4080_dev *dev, enum ad4080_ana_dig_ldo_pd *ana_dig_ldo_pd)
Get AD4080 Analog/Digital LDO.
Definition ad4080.c:880
int ad4080_get_fifo_mode(struct ad4080_dev *dev, enum ad4080_fifo_mode *fifo_mode)
Get Set AD4080 Conversion Data FIFO Mode.
Definition ad4080.c:978
int ad4080_set_ana_dig_ldo_pd(struct ad4080_dev *dev, enum ad4080_ana_dig_ldo_pd ana_dig_ldo_pd)
Set AD4080 Analog/Digital LDO.
Definition ad4080.c:855
ad4080_gpio
Definition ad4080.h:246
@ AD4080_GPIO_2
Definition ad4080.h:249
@ AD4080_GPIO_0
Definition ad4080.h:247
@ AD4080_GPIO_3
Definition ad4080.h:250
@ NUM_AD4080_GPIO
Definition ad4080.h:251
@ AD4080_GPIO_1
Definition ad4080.h:248
int ad4080_set_lvds_cnv_clk_mode(struct ad4080_dev *dev, enum ad4080_lvds_cnv_clk_mode cnv_clk_mode)
Set AD4080 LVDS CNV Clock Mode.
Definition ad4080.c:758
int ad4080_get_lvds_cnv_clk_cnt(struct ad4080_dev *dev, uint8_t *lvds_cnv_clk_cnt)
Get AD4080 Interface clock periods from CNV rising edge.
Definition ad4080.c:685
int ad4080_set_fifo_watermark(struct ad4080_dev *dev, uint16_t fifo_watermark)
Set AD4080 FIFO Watermark.
Definition ad4080.c:1002
int ad4080_read(struct ad4080_dev *dev, uint16_t reg_addr, uint8_t *reg_val)
Read device register.
Definition ad4080.c:193
int ad4080_set_intf_chk_en(struct ad4080_dev *dev, enum ad4080_intf_chk_en intf_chk_en)
Set AD4080 Output Pattern.
Definition ad4080.c:510
int ad4080_get_strict_reg_access(struct ad4080_dev *dev, enum ad4080_strict_reg_access *strict_reg)
Get Strict Register Access.
Definition ad4080.c:486
ad4080_conv_data_spi_lvds
Definition ad4080.h:209
@ AD4080_CONV_DATA_LVDS
Definition ad4080.h:210
@ AD4080_CONV_DATA_SPI
Definition ad4080.h:211
ad4080_id
Definition ad4080.h:284
@ NUM_AD4080_DEVICES
Definition ad4080.h:293
@ ID_AD4081
Definition ad4080.h:286
@ ID_AD4087
Definition ad4080.h:291
@ ID_AD4083
Definition ad4080.h:288
@ ID_AD4088
Definition ad4080.h:292
@ ID_AD4082
Definition ad4080.h:287
@ ID_AD4080
Definition ad4080.h:285
@ ID_AD4086
Definition ad4080.h:290
@ ID_AD4085
Definition ad4080.h:289
int ad4080_write(struct ad4080_dev *dev, uint16_t reg_addr, uint8_t reg_val)
Write device register.
Definition ad4080.c:172
ad4080_short_instr
Definition ad4080.h:178
@ AD4080_7_BIT_ADDR
Definition ad4080.h:180
@ AD4080_15_BIT_ADDR
Definition ad4080.h:179
int ad4080_get_lvds_self_clk_mode(struct ad4080_dev *dev, enum ad4080_lvds_self_clk_mode *lvds_self_clk_mode)
Get AD4080 LVDS Self Clock Mode.
Definition ad4080.c:734
int ad4080_set_conv_data_spi_lvds(struct ad4080_dev *dev, enum ad4080_conv_data_spi_lvds conv_data_spi_lvds)
Set AD4080 Data Interface Configuration.
Definition ad4080.c:608
int ad4080_get_conv_data_spi_lvds(struct ad4080_dev *dev, enum ad4080_conv_data_spi_lvds *conv_data_spi_lvds)
Get AD4080 Data Interface Configuration.
Definition ad4080.c:633
ad4080_addr_asc
Definition ad4080.h:166
@ AD4080_ADDR_DECR
Definition ad4080.h:167
@ AD4080_ADDR_INCR
Definition ad4080.h:168
int ad4080_get_cnv_spi_lvds_lanes(struct ad4080_dev *dev, enum ad4080_cnv_spi_lvds_lanes *cnv_spi_lvds_lanes)
Get AD4080 LVDS/SPI Lane Control.
Definition ad4080.c:584
int ad4080_get_intf_ldo_pd(struct ad4080_dev *dev, enum ad4080_intf_ldo_pd *intf_ldo_pd)
Get AD4080 Interface LDO.
Definition ad4080.c:929
ad4080_intf_chk_en
Definition ad4080.h:197
@ AD4080_FIXED_PATTERN
Definition ad4080.h:199
@ AD4080_DATA
Definition ad4080.h:198
ad4080_lvds_cnv_clk_mode
Definition ad4080.h:221
@ AD4080_CNV_LVDS_MODE
Definition ad4080.h:223
@ AD4080_CNV_CMOS_MODE
Definition ad4080.h:222
ad4080_single_instr
Definition ad4080.h:172
@ AD4080_STREAM_MODE
Definition ad4080.h:173
@ AD4080_SINGLE_INST
Definition ad4080.h:174
int ad4080_gpio_read_data(struct ad4080_dev *dev, enum ad4080_gpio gpio, bool *data)
Read the GPIO data.
Definition ad4080.c:1155
ad4080_gpio_op_enable
Definition ad4080.h:255
@ AD4080_GPIO_OUTPUT
Definition ad4080.h:257
@ AD4080_GPIO_INPUT
Definition ad4080.h:256
ad4080_fifo_mode
Definition ad4080.h:276
@ AD4080_EVENT_TRIGGER
Definition ad4080.h:280
@ AD4080_IMMEDIATE_TRIGGER
Definition ad4080.h:278
@ AD4080_FIFO_DISABLE
Definition ad4080.h:277
@ AD4080_EVENT_TRIGGER_LAST_WM
Definition ad4080.h:279
int ad4080_set_gpio_output_enable(struct ad4080_dev *dev, enum ad4080_gpio gpio, enum ad4080_gpio_op_enable gpio_op_enable)
Configure GPIO as input or output.
Definition ad4080.c:1060
int ad4080_get_addr_asc(struct ad4080_dev *dev, enum ad4080_addr_asc *addr_asc)
Get Address Ascension.
Definition ad4080.c:291
ad4080_strict_reg_access
Definition ad4080.h:191
@ AD4080_REG_NORMAL_MODE
Definition ad4080.h:192
@ AD4080_REG_STRICT_MODE
Definition ad4080.h:193
int ad4080_get_single_instr(struct ad4080_dev *dev, enum ad4080_single_instr *single_instr)
Get Single/Streaming Mode.
Definition ad4080.c:339
int ad4080_set_cnv_spi_lvds_lanes(struct ad4080_dev *dev, enum ad4080_cnv_spi_lvds_lanes cnv_spi_lvds_lanes)
Set AD4080 LVDS/SPI Lane Control.
Definition ad4080.c:559
struct ad7616_init_param init_param
Definition ad7616_sdz.c:109
Header file of GPIO Interface.
Header file of SPI Interface.
Header file of utility functions.
AD408x part-specific information.
Definition ad4080.h:300
uint8_t num_bits
Definition ad4080.h:306
uint8_t lvds_cnv_clk_cnt_max
Definition ad4080.h:308
const char * name
Definition ad4080.h:302
uint16_t product_id
Definition ad4080.h:304
ad4080 Device structure.
Definition ad4080.h:328
const struct ad4080_chip_info * chip_info
Definition ad4080.h:330
enum ad4080_op_mode op_mode
Definition ad4080.h:343
struct ad4080_spi_desc cfg
Definition ad4080.h:332
enum ad4080_gpio_op_enable gpio_op_enable[NUM_AD4080_GPIO]
Definition ad4080.h:367
enum ad4080_short_instr short_instr
Definition ad4080.h:341
enum ad4080_single_instr single_instr
Definition ad4080.h:339
uint8_t lvds_cnv_clk_cnt
Definition ad4080.h:353
enum ad4080_ana_dig_ldo_pd ana_dig_ldo_pd
Definition ad4080.h:361
enum ad4080_conv_data_spi_lvds conv_data_spi_lvds
Definition ad4080.h:351
enum ad4080_lvds_cnv_clk_mode cnv_clk_mode
Definition ad4080.h:357
struct ad4080_spi_desc data
Definition ad4080.h:333
enum ad4080_gpio_op_func_sel gpio_op_func_sel[NUM_AD4080_GPIO]
Definition ad4080.h:369
enum ad4080_intf_chk_en intf_chk_en
Definition ad4080.h:347
char privdata[0]
Definition ad4080.h:371
enum ad4080_cnv_spi_lvds_lanes cnv_spi_lvds_lanes
Definition ad4080.h:349
enum ad4080_fifo_mode fifo_mode
Definition ad4080.h:365
bool spi3wire
Definition ad4080.h:335
enum ad4080_intf_ldo_pd intf_ldo_pd
Definition ad4080.h:363
enum ad4080_lvds_vod lvds_vod
Definition ad4080.h:359
enum ad4080_lvds_self_clk_mode lvds_self_clk_mode
Definition ad4080.h:355
enum ad4080_strict_reg_access strict_reg
Definition ad4080.h:345
enum ad4080_addr_asc addr_asc
Definition ad4080.h:337
Definition ad4080.h:318
struct no_os_gpio_desc * gp
Definition ad4080.h:321
enum ad4080_gpio_op_enable op_enable
Definition ad4080.h:319
enum ad4080_gpio_op_func_sel func_sel
Definition ad4080.h:320
Definition ad4080.h:379
struct no_os_gpio_init_param * gp
Definition ad4080.h:382
enum ad4080_gpio_op_func_sel func_sel
Definition ad4080.h:381
enum ad4080_gpio_op_enable op_enable
Definition ad4080.h:380
ad4080 Device initialization parameters.
Definition ad4080.h:389
enum ad4080_op_mode op_mode
Definition ad4080.h:404
struct ad4080_spi_init_param data
Definition ad4080.h:394
struct ad4080_spi_init_param cfg
Definition ad4080.h:393
bool spi3wire
Definition ad4080.h:396
enum ad4080_lvds_vod lvds_vod
Definition ad4080.h:420
enum ad4080_lvds_self_clk_mode lvds_self_clk_mode
Definition ad4080.h:416
enum ad4080_strict_reg_access strict_reg
Definition ad4080.h:406
enum ad4080_cnv_spi_lvds_lanes cnv_spi_lvds_lanes
Definition ad4080.h:410
enum ad4080_ana_dig_ldo_pd ana_dig_ldo_pd
Definition ad4080.h:422
enum ad4080_short_instr short_instr
Definition ad4080.h:402
enum ad4080_lvds_cnv_clk_mode cnv_clk_mode
Definition ad4080.h:418
enum ad4080_fifo_mode fifo_mode
Definition ad4080.h:426
size_t privdata_len
Definition ad4080.h:428
enum ad4080_intf_chk_en intf_chk_en
Definition ad4080.h:408
enum ad4080_single_instr single_instr
Definition ad4080.h:400
enum ad4080_conv_data_spi_lvds conv_data_spi_lvds
Definition ad4080.h:412
uint8_t lvds_cnv_clk_cnt
Definition ad4080.h:414
enum ad4080_addr_asc addr_asc
Definition ad4080.h:398
enum ad4080_id id
Definition ad4080.h:391
enum ad4080_intf_ldo_pd intf_ldo_pd
Definition ad4080.h:424
Definition ad4080.h:313
struct no_os_spi_desc * spi
Definition ad4080.h:314
struct no_os_gpio_desc * ss
Definition ad4080.h:315
Definition ad4080.h:374
struct no_os_spi_init_param * spi
Definition ad4080.h:375
struct no_os_gpio_init_param * ss
Definition ad4080.h:376
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128
#define NULL
Definition wrapper.h:64