no-OS
ad7606.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef AD7606_H_
35 #define AD7606_H_
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 #include <stdint.h>
41 #include <stdbool.h>
42 #include "no_os_delay.h"
43 #include "no_os_gpio.h"
44 #include "no_os_spi.h"
45 #include "no_os_util.h"
46 
47 #include "no_os_pwm.h"
48 #include "clk_axi_clkgen.h"
49 
50 /******************************************************************************/
51 /********************** Macros and Constants Definitions **********************/
52 /******************************************************************************/
53 #define AD7606_REG_STATUS 0x01
54 #define AD7606_REG_CONFIG 0x02
55 #define AD7606_REG_RANGE_CH_ADDR(ch) (0x03 + ((ch) >> 1))
56 #define AD7606_REG_BANDWIDTH 0x07
57 #define AD7606_REG_OVERSAMPLING 0x08
58 #define AD7606_REG_GAIN_CH(ch) (0x09 + (ch))
59 #define AD7606_REG_OFFSET_CH(ch) (0x11 + (ch))
60 #define AD7606_REG_PHASE_CH(ch) (0x19 + (ch))
61 #define AD7606_REG_DIGITAL_DIAG_ENABLE 0x21
62 #define AD7606_REG_DIGITAL_DIAG_ERR 0x22
63 #define AD7606_REG_OPEN_DETECT_ENABLE 0x23
64 #define AD7606_REG_OPEN_DETECTED 0x24
65 #define AD7606_REG_AIN_OV_UV_DIAG_ENABLE 0x25
66 #define AD7606_REG_AIN_OV_DIAG_ERROR 0x26
67 #define AD7606_REG_AIN_UV_DIAG_ERROR 0x27
68 #define AD7606_REG_DIAGNOSTIC_MUX_CH(ch) (0x28 + ((ch) >> 1))
69 #define AD7606_REG_OPEN_DETECT_QUEUE 0x2C
70 #define AD7606_REG_CLK_FS_COUNTER 0x2D
71 #define AD7606_REG_CLK_OS_COUNTER 0x2E
72 #define AD7606_REG_ID 0x2F
73 
74 /* AD7606_REG_STATUS */
75 #define AD7606_STATUS_CHANNEL_MSK NO_OS_GENMASK(2,0)
76 #define AD7606_AIN_UV_ERR_MSK NO_OS_BIT(3)
77 #define AD7606_AIN_OV_ERR_MSK NO_OS_BIT(4)
78 #define AD7606_OPEN_DETECTED_MSK NO_OS_BIT(5)
79 #define AD7606_DIGITAL_ERROR_MSK NO_OS_BIT(6)
80 #define AD7606_RESET_DETECT_MSK NO_OS_BIT(7)
81 
82 /* AD7606_REG_CONFIG */
83 #define AD7606_CONFIG_OPERATION_MODE_MSK NO_OS_GENMASK(1,0)
84 #define AD7606_CONFIG_DOUT_FORMAT_MSK NO_OS_GENMASK(4,3)
85 #define AD7606_CONFIG_EXT_OS_CLOCK_MSK NO_OS_BIT(5)
86 #define AD7606_CONFIG_STATUS_HEADER_MSK NO_OS_BIT(6)
87 
88 /* AD7606_REG_RANGE_CH_X_Y */
89 #define AD7606_RANGE_CH_MSK(ch) (NO_OS_GENMASK(3, 0) << (4 * ((ch) % 2)))
90 #define AD7606_RANGE_CH_MODE(ch, mode) \
91  ((NO_OS_GENMASK(3, 0) & mode) << (4 * ((ch) % 2)))
92 
93 /* AD7606_REG_OVERSAMPLING */
94 #define AD7606_OS_PAD_MSK NO_OS_GENMASK(7,4)
95 #define AD7606_OS_RATIO_MSK NO_OS_GENMASK(3,0)
96 
97 /* AD7606_REG_ID */
98 #define AD7606_ID_DEVICE_ID_MSK NO_OS_GENMASK(7,4)
99 #define AD7606_ID_SILICON_REVISION_MSK NO_OS_GENMASK(3,0)
100 
101 /* AD7606_REG_GAIN_CH */
102 #define AD7606_GAIN_MSK NO_OS_GENMASK(5,0)
103 
104 /* AD7606_REG_DIGITAL_DIAG_ENABLE */
105 #define AD7606_ROM_CRC_ERR_EN_MSK NO_OS_BIT(0)
106 #define AD7606_MM_CRC_ERR_EN_MSK NO_OS_BIT(1)
107 #define AD7606_INT_CRC_ERR_EN_MSK NO_OS_BIT(2)
108 #define AD7606_SPI_WRITE_ERR_EN_MSK NO_OS_BIT(3)
109 #define AD7606_SPI_READ_ERR_EN_MSK NO_OS_BIT(4)
110 #define AD7606_BUSY_STUCK_HIGH_ERR_EN_MSK NO_OS_BIT(5)
111 #define AD7606_CLK_FS_OS_COUNTER_EN_MSK NO_OS_BIT(6)
112 #define AD7606_INTERFACE_CHECK_EN_MSK NO_OS_BIT(7)
113 
114 /* AD7606_REG_DIAGNOSTIC_MUX_CH */
115 #define AD7606_DIAGN_MUX_CH_MSK(ch) (NO_OS_GENMASK(2, 0) << (3 * (ch & 0x1)))
116 
117 #define AD7606_SERIAL_RD_FLAG_MSK(x) (NO_OS_BIT(6) | ((x) & 0x3F))
118 #define AD7606_SERIAL_WR_FLAG_MSK(x) ((x) & 0x3F)
119 
120 #define AD7606_PARALLEL_RD_FLAG_MSK(x) (NO_OS_BIT(7) | ((x) & 0x7F))
121 #define AD7606_PARALLEL_WR_FLAG_MSK(x) ((x) & 0x7F)
122 
123 #define AD7606_MAX_CHANNELS 8
124 
148 };
149 
173 };
174 
188 };
189 
203 };
204 
214 };
215 
229 };
230 
235 struct ad7606_range {
237  int32_t min;
239  int32_t max;
242 };
243 
250  uint8_t os_pad: 4;
253 };
254 
261  bool rom_crc_err_en: 1;
263  bool mm_crc_err_en: 1;
265  bool int_crc_err_en: 1;
276 };
277 
282 struct ad7606_dev;
283 
289  /* Clock generator init parameters */
291  /* Clock generator rate */
292  uint32_t axi_clkgen_rate;
293  /* PWM generator init structure */
295  /* SPI Engine offload parameters */
297  /* AXI Core */
298  uint32_t core_baseaddr;
299  /* RX DMA base address */
300  uint32_t rx_dma_baseaddr;
302  void (*dcache_invalidate_range)(uint32_t address, uint32_t bytes_count);
303 };
304 
312  /* AXI initialization parameters */
337  bool sw_mode;
352 };
353 
354 const struct ad7606_range *ad7606_get_ch_ranges(struct ad7606_dev *dev,
355  uint8_t ch,
356  uint32_t *num_ranges);
357 
358 int32_t ad7606_capture_pre_enable(struct ad7606_dev *dev);
359 void ad7606_capture_post_disable(struct ad7606_dev *dev);
360 
361 bool ad7606_sw_mode_enabled(struct ad7606_dev *dev);
362 
363 int32_t ad7606_get_channels_number(struct ad7606_dev *dev);
364 
365 int32_t ad7606_reg_read(struct ad7606_dev *dev,
366  uint8_t reg_addr,
367  uint8_t *reg_data);
368 int32_t ad7606_reg_write(struct ad7606_dev *dev,
369  uint8_t reg_addr,
370  uint8_t reg_data);
371 int32_t ad7606_write_mask(struct ad7606_dev *dev,
372  uint32_t addr,
373  uint32_t mask,
374  uint32_t val);
375 int32_t ad7606_spi_data_read(struct ad7606_dev *dev,
376  uint32_t *data);
377 int32_t ad7606_read_samples(struct ad7606_dev *dev,
378  uint32_t *data,
379  uint32_t samples);
380 int32_t ad7606_convst(struct ad7606_dev *dev);
381 int32_t ad7606_reset(struct ad7606_dev *dev);
382 int32_t ad7606_set_oversampling(struct ad7606_dev *dev,
383  struct ad7606_oversampling oversampling);
384 int32_t ad7606_get_oversampling(struct ad7606_dev *dev,
385  struct ad7606_oversampling *oversampling);
386 int32_t ad7606_get_ch_scale(struct ad7606_dev *dev, uint8_t ch,
387  double *scale);
388 int32_t ad7606_get_resolution_bits(struct ad7606_dev *dev);
389 int32_t ad7606_set_ch_range(struct ad7606_dev *dev, uint8_t ch,
390  struct ad7606_range range);
391 int32_t ad7606_set_ch_offset(struct ad7606_dev *dev, uint8_t ch,
392  int8_t offset);
393 int32_t ad7606_set_ch_phase(struct ad7606_dev *dev, uint8_t ch,
394  uint8_t phase);
395 int32_t ad7606_set_ch_gain(struct ad7606_dev *dev, uint8_t ch,
396  uint8_t gain);
397 int32_t ad7606_set_config(struct ad7606_dev *dev,
398  struct ad7606_config config);
399 int32_t ad7606_set_digital_diag(struct ad7606_dev *dev,
400  struct ad7606_digital_diag diag);
401 int32_t ad7606_init(struct ad7606_dev **device,
402  struct ad7606_init_param *init_param);
403 int32_t ad7606_data_correction_serial(struct ad7606_dev *dev,
404  uint32_t *buf, int32_t *data, uint8_t *status);
405 int32_t ad7606_remove(struct ad7606_dev *dev);
406 #endif /* AD7606_H_ */
ad7606_digital_diag::spi_read_err_en
bool spi_read_err_en
Definition: ad7606.h:269
AD7606_4_DOUT
@ AD7606_4_DOUT
Definition: ad7606.h:200
ad7606_init_param::gpio_os0
struct no_os_gpio_init_param * gpio_os0
Definition: ad7606.h:325
ad7606_init_param::gpio_par_ser
struct no_os_gpio_init_param * gpio_par_ser
Definition: ad7606.h:331
AD7606_REG_PHASE_CH
#define AD7606_REG_PHASE_CH(ch)
Definition: ad7606.h:60
ad7606_set_ch_range
int32_t ad7606_set_ch_range(struct ad7606_dev *dev, uint8_t ch, struct ad7606_range range)
Set the channel operation range.
Definition: ad7606.c:1456
ad7606_get_ch_scale
int32_t ad7606_get_ch_scale(struct ad7606_dev *dev, uint8_t ch, double *scale)
Get the value of scale for the channel.
Definition: ad7606.c:1502
ad7606_get_resolution_bits
int32_t ad7606_get_resolution_bits(struct ad7606_dev *dev)
Get the resolution bits of this device.
Definition: ad7606.c:1524
ID_AD7606C_18
@ ID_AD7606C_18
Definition: ad7606.h:143
timeout
uint32_t timeout
Definition: ad413x.c:49
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
spi_engine_offload_message::no_commands
uint32_t no_commands
Definition: spi_engine.h:165
no_os_pwm_init_param
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:66
AD7606_8_DOUT
@ AD7606_8_DOUT
Definition: ad7606.h:202
ad7606_init_param::offset_ch
int8_t offset_ch[AD7606_MAX_CHANNELS]
Definition: ad7606.h:345
ad7606_reset
int32_t ad7606_reset(struct ad7606_dev *dev)
Reset the device by toggling the reset GPIO.
Definition: ad7606.c:1145
NO_OS_DECLARE_CRC8_TABLE
NO_OS_DECLARE_CRC8_TABLE(ad7606_crc8)
AD7606_REG_GAIN_CH
#define AD7606_REG_GAIN_CH(ch)
Definition: ad7606.h:58
ad7606_config
AD7606_REG_CONFIG configuration parameters.
Definition: ad7606.h:220
ad7606_digital_diag::int_crc_err_en
bool int_crc_err_en
Definition: ad7606.h:265
AD7606_SW_RANGE_SINGLE_ENDED_BIPOLAR
@ AD7606_SW_RANGE_SINGLE_ENDED_BIPOLAR
Definition: ad7606.h:212
AD7606_2_DOUT
@ AD7606_2_DOUT
Definition: ad7606.h:198
ad7606_init_param::parallel_interface
bool parallel_interface
Definition: ad7606.h:339
NO_OS_DECLARE_CRC16_TABLE
NO_OS_DECLARE_CRC16_TABLE(ad7606_crc16)
ad7606_init_param::spi_init
struct no_os_spi_init_param spi_init
Definition: ad7606.h:311
AD7606_MM_CRC_ERR_EN_MSK
#define AD7606_MM_CRC_ERR_EN_MSK
Definition: ad7606.h:106
ad7606_convst
int32_t ad7606_convst(struct ad7606_dev *dev)
Toggle the CONVST pin to start a conversion.
Definition: ad7606.c:677
ad7606_init_param::device_id
enum ad7606_device_id device_id
Definition: ad7606.h:333
ad7606_dev::gpio_par_ser
struct no_os_gpio_desc * gpio_par_ser
Definition: ad7606.c:290
ad7606_config::op_mode
enum ad7606_op_mode op_mode
Definition: ad7606.h:222
no_os_spi_write_and_read
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
ID_AD7606C_16
@ ID_AD7606C_16
Definition: ad7606.h:141
AD7606_STANDBY
@ AD7606_STANDBY
Definition: ad7606.h:183
axi_dmac_init
Definition: axi_dmac.h:127
ad7606.h
Header file for the ad7606 Driver.
ad7606_axi_dev::dcache_invalidate_range
void(* dcache_invalidate_range)(uint32_t address, uint32_t bytes_count)
Definition: ad7606.c:261
axi_dmac_init::name
const char * name
Definition: axi_dmac.h:128
ad7606_init_param::gpio_reset
struct no_os_gpio_init_param * gpio_reset
Definition: ad7606.h:315
ad7606_axi_dev
Structure for AXI FPGA cores.
Definition: ad7606.c:245
ad7606_range::min
int32_t min
Definition: ad7606.h:237
CS_LOW
#define CS_LOW
Definition: spi_engine.h:73
ad7606_chip_info
Definition: ad7606.c:79
ad7606_init
int32_t ad7606_init(struct ad7606_dev **device, struct ad7606_init_param *init_param)
Initialize the ad7606 device structure.
Definition: ad7606.c:1833
no_os_spi.h
Header file of SPI Interface.
ad7606_sw_mode_enabled
bool ad7606_sw_mode_enabled(struct ad7606_dev *dev)
Returns true if SW mode is enabled.
Definition: ad7606.c:1435
ad7606_set_ch_gain
int32_t ad7606_set_ch_gain(struct ad7606_dev *dev, uint8_t ch, uint8_t gain)
Set the channel gain.
Definition: ad7606.c:1623
AD7606_CONFIG_CTRL
#define AD7606_CONFIG_CTRL
Definition: ad7606.c:60
AD7606_REG_OVERSAMPLING
#define AD7606_REG_OVERSAMPLING
Definition: ad7606.h:57
ad7606_get_channels_number
int32_t ad7606_get_channels_number(struct ad7606_dev *dev)
Returns the number of channels this ADC has.
Definition: ad7606.c:330
spi_engine_offload_init
int32_t spi_engine_offload_init(struct no_os_spi_desc *desc, const struct spi_engine_offload_init_param *param)
Initialize the SPI engine's offload module.
Definition: spi_engine.c:763
ad7606_axi_dev::offload_init_param
struct spi_engine_offload_init_param offload_init_param
Definition: ad7606.c:253
ad7606_data_correction_serial
int32_t ad7606_data_correction_serial(struct ad7606_dev *dev, uint32_t *buf, int32_t *data, uint8_t *status)
Definition: ad7606.c:2000
no_os_pwm_remove
int32_t no_os_pwm_remove(struct no_os_pwm_desc *desc)
Free the resources allocated by no_os_pwm_init().
Definition: no_os_pwm.c:79
AD7606_SPI_WRITE_ERR_EN_MSK
#define AD7606_SPI_WRITE_ERR_EN_MSK
Definition: ad7606.h:108
ID_AD7606_4
@ ID_AD7606_4
Definition: ad7606.h:133
AD7606_CHAN_CTRL_ENABLE
#define AD7606_CHAN_CTRL_ENABLE
Definition: ad7606.c:66
clk_axi_clkgen.h
Driver for the Analog Devices AXI CLKGEN.
AD7606_SW_RANGE_SINGLE_ENDED_UNIPOLAR
@ AD7606_SW_RANGE_SINGLE_ENDED_UNIPOLAR
Definition: ad7606.h:211
ad7606_range::type
enum ad7606_range_type type
Definition: ad7606.h:241
axi_dmac_transfer_wait_completion
int32_t axi_dmac_transfer_wait_completion(struct axi_dmac *dmac, uint32_t timeout_ms)
Definition: axi_dmac.c:525
no_os_gpio_get_value
int32_t no_os_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: no_os_gpio.c:221
ad7606_oversampling
Definition: ad7606.h:248
ad7606_dev::num_channels
uint8_t num_channels
Definition: ad7606.c:308
ad7606_sw_mode_enabled
bool ad7606_sw_mode_enabled(struct ad7606_dev *dev)
Returns true if SW mode is enabled.
Definition: ad7606.c:1435
AD7606_SERIAL_WR_FLAG_MSK
#define AD7606_SERIAL_WR_FLAG_MSK(x)
Definition: ad7606.h:118
ad7606_axi_dev::reg_access_speed
uint32_t reg_access_speed
Definition: ad7606.c:260
ad7606_oversampling::os_ratio
enum ad7606_osr os_ratio
Definition: ad7606.h:252
spi_engine_offload_message::commands_data
uint32_t * commands_data
Definition: spi_engine.h:167
ad7606_chip_info::hw_range_table
const struct ad7606_range * hw_range_table
Definition: ad7606.c:87
ad7606_get_channels_number
int32_t ad7606_get_channels_number(struct ad7606_dev *dev)
Returns the number of channels this ADC has.
Definition: ad7606.c:330
no_os_delay.h
Header file of Delay functions.
AD7606_SERIAL_CORE_ENABLE
#define AD7606_SERIAL_CORE_ENABLE
Definition: ad7606.c:73
ad7606_dev::gpio_os1
struct no_os_gpio_desc * gpio_os1
Definition: ad7606.c:286
ad7606_set_digital_diag
int32_t ad7606_set_digital_diag(struct ad7606_dev *dev, struct ad7606_digital_diag diag)
Set the device digital diagnostics configuration.
Definition: ad7606.c:1724
ad7606_axi_init_param::axi_clkgen_rate
uint32_t axi_clkgen_rate
Definition: ad7606.h:292
axi_clkgen_init
Definition: clk_axi_clkgen.h:50
ad7606_dev::device_id
enum ad7606_device_id device_id
Definition: ad7606.c:292
ad7606_config::dout_format
enum ad7606_dout_format dout_format
Definition: ad7606.h:224
ad7606_init_param::gpio_stby_n
struct no_os_gpio_init_param * gpio_stby_n
Definition: ad7606.h:321
AD7606_OSR_8
@ AD7606_OSR_8
Definition: ad7606.h:162
axi_clkgen_set_rate
int32_t axi_clkgen_set_rate(struct axi_clkgen *clkgen, uint32_t rate)
axi_clkgen_set_rate
Definition: clk_axi_clkgen.c:414
ad7606_init_param::gpio_range
struct no_os_gpio_init_param * gpio_range
Definition: ad7606.h:323
ad7606_set_ch_offset
int32_t ad7606_set_ch_offset(struct ad7606_dev *dev, uint8_t ch, int8_t offset)
Set the channel offset.
Definition: ad7606.c:1554
spi_engine_offload_message
Structure representing an offload message.
Definition: spi_engine.h:158
ad7606_dev::sw_mode
bool sw_mode
Definition: ad7606.c:296
NO_OS_SPI_MODE_2
@ NO_OS_SPI_MODE_2
Definition: no_os_spi.h:65
ad7606_axi_remove
void ad7606_axi_remove(struct ad7606_dev *dev)
Free any resource used by the driver.
Definition: ad7606.c:2046
device
Definition: ad9361_util.h:69
ad7606_chip_info::num_channels
uint8_t num_channels
Definition: ad7606.c:81
ad7606_osr
ad7606_osr
Oversampling ratio.
Definition: ad7606.h:154
ad7606_write_mask
int32_t ad7606_write_mask(struct ad7606_dev *dev, uint32_t addr, uint32_t mask, uint32_t val)
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
AD7606_HW_RANGE
@ AD7606_HW_RANGE
Definition: ad7606.h:210
AD7606_PARALLEL_CORE_ENABLE
#define AD7606_PARALLEL_CORE_ENABLE
Definition: ad7606.c:76
ID_AD7609
@ ID_AD7609
Definition: ad7606.h:147
ad7606_dev::reg_mode
bool reg_mode
Definition: ad7606.c:300
axi_clkgen_init
int32_t axi_clkgen_init(struct axi_clkgen **clk, const struct axi_clkgen_init *init)
axi_clkgen_init
Definition: clk_axi_clkgen.c:520
ad7606_reg_write
int32_t ad7606_reg_write(struct ad7606_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write a device register via SPI or AXI Parallel core.
Definition: ad7606.c:568
ad7606_set_ch_offset
int32_t ad7606_set_ch_offset(struct ad7606_dev *dev, uint8_t ch, int8_t offset)
Set the channel offset.
Definition: ad7606.c:1554
axi_clkgen
Definition: clk_axi_clkgen.h:44
no_os_axi_io.h
Header file of AXI IO.
no_os_calloc
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
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
AD7606_BUSY_STUCK_HIGH_ERR_EN_MSK
#define AD7606_BUSY_STUCK_HIGH_ERR_EN_MSK
Definition: ad7606.h:110
no_os_gpio_direction_input
int32_t no_os_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: no_os_gpio.c:124
AD7606_SW_RANGE_DIFFERENTIAL_BIPOLAR
@ AD7606_SW_RANGE_DIFFERENTIAL_BIPOLAR
Definition: ad7606.h:213
ad7606_chip_info::has_oversampling
bool has_oversampling
Definition: ad7606.c:84
ad7606_dev::gpio_reset
struct no_os_gpio_desc * gpio_reset
Definition: ad7606.c:274
ad7606_capture_post_disable
void ad7606_capture_post_disable(struct ad7606_dev *dev)
Disables buffer capture for an AXI SPI Engine or AXI Parallel interface.
Definition: ad7606.c:1036
ad7606_dev::gpio_busy
struct no_os_gpio_desc * gpio_busy
Definition: ad7606.c:278
ad7606_digital_diag
Oversampling settings.
Definition: ad7606.h:259
ad7606_dev::parallel_interface
bool parallel_interface
Definition: ad7606.c:298
ad7606_dev::phase_ch
uint8_t phase_ch[AD7606_MAX_CHANNELS]
Definition: ad7606.c:316
AD7606_AUTOSTANDBY
@ AD7606_AUTOSTANDBY
Definition: ad7606.h:185
AD7606_INTERFACE_CHECK_EN_MSK
#define AD7606_INTERFACE_CHECK_EN_MSK
Definition: ad7606.h:112
AD7606_REG_DIGITAL_DIAG_ENABLE
#define AD7606_REG_DIGITAL_DIAG_ENABLE
Definition: ad7606.h:61
NO_OS_GPIO_LOW
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
ad7606_read_samples
int32_t ad7606_read_samples(struct ad7606_dev *dev, uint32_t *data, uint32_t samples)
Read muliple raw samples from device.
Definition: ad7606.c:1065
ad7606_dev::gain_ch
uint8_t gain_ch[AD7606_MAX_CHANNELS]
Definition: ad7606.c:318
axi_dmac_remove
int32_t axi_dmac_remove(struct axi_dmac *dmac)
Definition: axi_dmac.c:367
ad7606_set_ch_phase
int32_t ad7606_set_ch_phase(struct ad7606_dev *dev, uint8_t ch, uint8_t phase)
Set the channel phase.
Definition: ad7606.c:1589
ad7606_get_ch_ranges
const struct ad7606_range * ad7606_get_ch_ranges(struct ad7606_dev *dev, uint8_t ch, uint32_t *num_ranges)
Get the available channel ranges for the given channel.
Definition: ad7606.c:1366
axi_dma_transfer
Definition: axi_dmac.h:102
no_os_field_prep
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
AD7606_CONFIG_OPERATION_MODE_MSK
#define AD7606_CONFIG_OPERATION_MODE_MSK
Definition: ad7606.h:83
ad7606_digital_diag::busy_stuck_high_err_en
bool busy_stuck_high_err_en
Definition: ad7606.h:271
AD7606_CONFIG_DOUT_FORMAT_MSK
#define AD7606_CONFIG_DOUT_FORMAT_MSK
Definition: ad7606.h:84
ad7606_chip_info::hw_range_table_sz
uint32_t hw_range_table_sz
Definition: ad7606.c:88
AD7606_OS_PAD_MSK
#define AD7606_OS_PAD_MSK
Definition: ad7606.h:94
ad7606_get_oversampling
int32_t ad7606_get_oversampling(struct ad7606_dev *dev, struct ad7606_oversampling *oversampling)
Get the oversampling ratio.
Definition: ad7606.c:1345
ad7606_range::max
int32_t max
Definition: ad7606.h:239
CS_HIGH
#define CS_HIGH
Definition: spi_engine.h:72
ad7606_digital_diag::rom_crc_err_en
bool rom_crc_err_en
Definition: ad7606.h:261
spi_engine_set_speed
void spi_engine_set_speed(struct no_os_spi_desc *desc, uint32_t speed_hz)
Set SPI engine clock frequency.
Definition: spi_engine.c:148
ad7606_read_samples
int32_t ad7606_read_samples(struct ad7606_dev *dev, uint32_t *data, uint32_t samples)
Read muliple raw samples from device.
Definition: ad7606.c:1065
ad7606_dev::gpio_range
struct no_os_gpio_desc * gpio_range
Definition: ad7606.c:282
no_os_error.h
Error codes definition.
no_os_pwm_enable
int32_t no_os_pwm_enable(struct no_os_pwm_desc *desc)
Enable PWM signal generation.
Definition: no_os_pwm.c:98
AD7606_SHUTDOWN
@ AD7606_SHUTDOWN
Definition: ad7606.h:187
AD7606_MAX_CHANNELS
#define AD7606_MAX_CHANNELS
Definition: ad7606.h:123
ad7606_convst
int32_t ad7606_convst(struct ad7606_dev *dev)
Toggle the CONVST pin to start a conversion.
Definition: ad7606.c:677
ad7606_spi_data_read
int32_t ad7606_spi_data_read(struct ad7606_dev *dev, uint32_t *data)
Read conversion data.
Definition: ad7606.c:720
ad7606_init_param::config
struct ad7606_config config
Definition: ad7606.h:341
spi_engine_set_transfer_width
int32_t spi_engine_set_transfer_width(struct no_os_spi_desc *desc, uint8_t data_wdith)
Set width of the transfered word over SPI.
Definition: spi_engine.c:127
AD7606_INT_CRC_ERR_EN_MSK
#define AD7606_INT_CRC_ERR_EN_MSK
Definition: ad7606.h:107
ad7606_set_oversampling
int32_t ad7606_set_oversampling(struct ad7606_dev *dev, struct ad7606_oversampling oversampling)
Set the oversampling ratio.
Definition: ad7606.c:1295
ad7606_digital_diag::mm_crc_err_en
bool mm_crc_err_en
Definition: ad7606.h:263
IRQ_DISABLED
@ IRQ_DISABLED
Definition: axi_dmac.h:79
ad7606_axi_init_param
AXI driver(s) initialization parameters.
Definition: ad7606.h:288
no_os_crc8_populate_msb
void no_os_crc8_populate_msb(uint8_t *table, const uint8_t polynomial)
ad7606_dev::offset_ch
int8_t offset_ch[AD7606_MAX_CHANNELS]
Definition: ad7606.c:314
ad7606_dev::gpio_stby_n
struct no_os_gpio_desc * gpio_stby_n
Definition: ad7606.c:280
ad7606_chip_info::has_registers
bool has_registers
Definition: ad7606.c:85
ad7606_config::ext_os_clock
bool ext_os_clock
Definition: ad7606.h:226
no_os_pwm_disable
int32_t no_os_pwm_disable(struct no_os_pwm_desc *desc)
Disable PWM signal generation.
Definition: no_os_pwm.c:115
ad7606_dev::data
uint8_t data[28]
Definition: ad7606.c:320
AD7606_CLK_FS_OS_COUNTER_EN_MSK
#define AD7606_CLK_FS_OS_COUNTER_EN_MSK
Definition: ad7606.h:111
spi_engine.h
ad7606_init_param
Device driver initialization parameters.
Definition: ad7606.h:309
AD7606_ID_DEVICE_ID_MSK
#define AD7606_ID_DEVICE_ID_MSK
Definition: ad7606.h:98
ad7606_dev::axi_dev
struct ad7606_axi_dev axi_dev
Definition: ad7606.c:270
ad7606_init_param::gain_ch
uint8_t gain_ch[AD7606_MAX_CHANNELS]
Definition: ad7606.h:349
ad7606_reg_read
int32_t ad7606_reg_read(struct ad7606_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Write a device register via SPI or AXI Parallel core.
Definition: ad7606.c:542
AD7606_OSR_16
@ AD7606_OSR_16
Definition: ad7606.h:164
ad7606_reg_write_mask
int32_t ad7606_reg_write_mask(struct ad7606_dev *dev, uint32_t addr, uint32_t mask, uint32_t val)
Write a device register via SPI with masking.
Definition: ad7606.c:592
ad7606_dev::gpio_os0
struct no_os_gpio_desc * gpio_os0
Definition: ad7606.c:284
AD7606_CHAN_CTRL_DISABLE
#define AD7606_CHAN_CTRL_DISABLE
Definition: ad7606.c:67
AD7606_RANGE_CH_MSK
#define AD7606_RANGE_CH_MSK(ch)
Definition: ad7606.h:89
ad7606_axi_init_param::rx_dma_baseaddr
uint32_t rx_dma_baseaddr
Definition: ad7606.h:300
ad7606_init_param::phase_ch
uint8_t phase_ch[AD7606_MAX_CHANNELS]
Definition: ad7606.h:347
ad7606_remove
int32_t ad7606_remove(struct ad7606_dev *dev)
Free any resource used by the driver.
Definition: ad7606.c:2073
ad7606_get_ch_scale
int32_t ad7606_get_ch_scale(struct ad7606_dev *dev, uint8_t ch, double *scale)
Get the value of scale for the channel.
Definition: ad7606.c:1502
ad7606_op_mode
ad7606_op_mode
Operation mode.
Definition: ad7606.h:179
ad7606_init_param::range_ch
struct ad7606_range range_ch[AD7606_MAX_CHANNELS]
Definition: ad7606.h:351
AD7606_CONFIG_CTRL_DEFAULT
#define AD7606_CONFIG_CTRL_DEFAULT
Definition: ad7606.c:61
ad7606_spi_data_read
int32_t ad7606_spi_data_read(struct ad7606_dev *dev, uint32_t *data)
Read conversion data.
Definition: ad7606.c:720
ad7606_dev::range_ch_type
enum ad7606_range_type range_ch_type[AD7606_MAX_CHANNELS]
Definition: ad7606.c:312
axi_dma_transfer::dest_addr
uint32_t dest_addr
Definition: axi_dmac.h:107
ad7606_device_id
ad7606_device_id
Device ID definitions.
Definition: ad7606.h:129
no_os_gpio_remove
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
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
ad7606_dev::gpio_os2
struct no_os_gpio_desc * gpio_os2
Definition: ad7606.c:288
ad7606_chip_info::sw_range_table_sz
uint32_t sw_range_table_sz
Definition: ad7606.c:90
no_os_crc.h
Generic header file for all CRC computation algorithms.
ad7606_init_param::oversampling
struct ad7606_oversampling oversampling
Definition: ad7606.h:335
ad7606_init_param::gpio_os2
struct no_os_gpio_init_param * gpio_os2
Definition: ad7606.h:329
no_os_axi_io_read
int32_t no_os_axi_io_read(uint32_t base, uint32_t offset, uint32_t *data)
AXI IO Altera specific read function.
Definition: altera_axi_io.c:53
AD7606_CONFIG_EXT_OS_CLOCK_MSK
#define AD7606_CONFIG_EXT_OS_CLOCK_MSK
Definition: ad7606.h:85
AD7606_PARALLEL_CORE_DISABLE
#define AD7606_PARALLEL_CORE_DISABLE
Definition: ad7606.c:77
ID_AD7608
@ ID_AD7608
Definition: ad7606.h:145
AD7606_CORE_RESET
#define AD7606_CORE_RESET
Definition: ad7606.c:71
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
AD7606_GAIN_MSK
#define AD7606_GAIN_MSK
Definition: ad7606.h:102
spi_engine_offload_message::commands
uint32_t * commands
Definition: spi_engine.h:163
AD7606_REG_OFFSET_CH
#define AD7606_REG_OFFSET_CH(ch)
Definition: ad7606.h:59
no_os_pwm_desc
Structure representing an PWM generator device.
Definition: no_os_pwm.h:93
AD7606_RANGE_CH_MODE
#define AD7606_RANGE_CH_MODE(ch, mode)
Definition: ad7606.h:90
ad7606_oversampling::os_pad
uint8_t os_pad
Definition: ad7606.h:250
AD7606_CONFIG_CTRL_WRITE_OP
#define AD7606_CONFIG_CTRL_WRITE_OP
Definition: ad7606.c:63
no_os_pwm_init
int32_t no_os_pwm_init(struct no_os_pwm_desc **desc, const struct no_os_pwm_init_param *param)
Initialize the PWM peripheral.
Definition: no_os_pwm.c:51
ad7606_remove
int32_t ad7606_remove(struct ad7606_dev *dev)
Free any resource used by the driver.
Definition: ad7606.c:2073
ad7606_data_correction_serial
int32_t ad7606_data_correction_serial(struct ad7606_dev *dev, uint32_t *buf, int32_t *data, uint8_t *status)
Definition: ad7606.c:2000
ad7606_axi_dev::rx_dma_baseaddr
uint32_t rx_dma_baseaddr
Definition: ad7606.c:259
AD7606_REG_RANGE_CH_ADDR
#define AD7606_REG_RANGE_CH_ADDR(ch)
Definition: ad7606.h:55
no_os_pwm.h
Header file of PWM Interface.
ad7606_set_config
int32_t ad7606_set_config(struct ad7606_dev *dev, struct ad7606_config config)
Set the device config register.
Definition: ad7606.c:1659
AD7606_REG_ID
#define AD7606_REG_ID
Definition: ad7606.h:72
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
ad7606_dev::digital_diag_enable
struct ad7606_digital_diag digital_diag_enable
Definition: ad7606.c:306
ad7606_init_param::digital_diag_enable
struct ad7606_digital_diag digital_diag_enable
Definition: ad7606.h:343
ad7606_dev::oversampling
struct ad7606_oversampling oversampling
Definition: ad7606.c:294
AD7606_OSR_2
@ AD7606_OSR_2
Definition: ad7606.h:158
ad7606_get_oversampling
int32_t ad7606_get_oversampling(struct ad7606_dev *dev, struct ad7606_oversampling *oversampling)
Get the oversampling ratio.
Definition: ad7606.c:1345
ad7606_set_digital_diag
int32_t ad7606_set_digital_diag(struct ad7606_dev *dev, struct ad7606_digital_diag diag)
Set the device digital diagnostics configuration.
Definition: ad7606.c:1724
no_os_crc8
uint8_t no_os_crc8(const uint8_t *table, const uint8_t *pdata, size_t nbytes, uint8_t crc)
NO
@ NO
Definition: axi_dmac.h:98
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
no_os_crc16
uint16_t no_os_crc16(const uint16_t *table, const uint8_t *pdata, size_t nbytes, uint16_t crc)
ad7606_chip_info::sw_range_table
const struct ad7606_range * sw_range_table
Definition: ad7606.c:89
ad7606_set_ch_range
int32_t ad7606_set_ch_range(struct ad7606_dev *dev, uint8_t ch, struct ad7606_range range)
Set the channel operation range.
Definition: ad7606.c:1456
ad7606_dev::gpio_convst
struct no_os_gpio_desc * gpio_convst
Definition: ad7606.c:276
AD7606_OSR_32
@ AD7606_OSR_32
Definition: ad7606.h:166
ad7606_axi_init_param::dcache_invalidate_range
void(* dcache_invalidate_range)(uint32_t address, uint32_t bytes_count)
Definition: ad7606.h:302
AD7606_1_DOUT
@ AD7606_1_DOUT
Definition: ad7606.h:196
AD7606_CHAN_CTRL
#define AD7606_CHAN_CTRL(c)
Definition: ad7606.c:65
axi_dmac_init
int32_t axi_dmac_init(struct axi_dmac **dmac_core, const struct axi_dmac_init *init)
Definition: axi_dmac.c:334
ad7606_axi_dev::trigger_pwm_desc
struct no_os_pwm_desc * trigger_pwm_desc
Definition: ad7606.c:251
ad7606_set_oversampling
int32_t ad7606_set_oversampling(struct ad7606_dev *dev, struct ad7606_oversampling oversampling)
Set the oversampling ratio.
Definition: ad7606.c:1295
AD7606_OS_RATIO_MSK
#define AD7606_OS_RATIO_MSK
Definition: ad7606.h:95
no_os_udelay
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
NULL
#define NULL
Definition: wrapper.h:64
ad7606_init_param::gpio_busy
struct no_os_gpio_init_param * gpio_busy
Definition: ad7606.h:319
no_os_gpio_set_value
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
AD7606_OSR_4
@ AD7606_OSR_4
Definition: ad7606.h:160
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
AD7606_REG_CONFIG
#define AD7606_REG_CONFIG
Definition: ad7606.h:54
ad7606_reg_write
int32_t ad7606_reg_write(struct ad7606_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write a device register via SPI or AXI Parallel core.
Definition: ad7606.c:568
ID_AD7606_8
@ ID_AD7606_8
Definition: ad7606.h:137
AD7606_NORMAL
@ AD7606_NORMAL
Definition: ad7606.h:181
ad7606_digital_diag::interface_check_en
bool interface_check_en
Definition: ad7606.h:275
ad7606_init_param::gpio_convst
struct no_os_gpio_init_param * gpio_convst
Definition: ad7606.h:317
ad7606_chip_info::bits
uint8_t bits
Definition: ad7606.c:82
ad7606_axi_init_param::trigger_pwm_init
struct no_os_pwm_init_param * trigger_pwm_init
Definition: ad7606.h:294
AD7606_OSR_256
@ AD7606_OSR_256
Definition: ad7606.h:172
ad7606_axi_init_param::reg_access_speed
uint32_t reg_access_speed
Definition: ad7606.h:301
ad7606_init
int32_t ad7606_init(struct ad7606_dev **device, struct ad7606_init_param *init_param)
Initialize the ad7606 device structure.
Definition: ad7606.c:1833
ad7606_digital_diag::clk_fs_os_counter_en
bool clk_fs_os_counter_en
Definition: ad7606.h:273
spi_engine_offload_transfer
int32_t spi_engine_offload_transfer(struct no_os_spi_desc *desc, struct spi_engine_offload_message msg, uint32_t no_samples)
Initiate a SPI transfer in offload mode.
Definition: spi_engine.c:809
AD7606_CONFIG_CTRL_READ_OP
#define AD7606_CONFIG_CTRL_READ_OP
Definition: ad7606.c:62
ad7606_capture_post_disable
void ad7606_capture_post_disable(struct ad7606_dev *dev)
Disables buffer capture for an AXI SPI Engine or AXI Parallel interface.
Definition: ad7606.c:1036
ad7606_axi_dev::dmac
struct axi_dmac * dmac
Definition: ad7606.c:255
no_os_axi_io_write
int32_t no_os_axi_io_write(uint32_t base, uint32_t offset, uint32_t data)
AXI IO Altera specific write function.
Definition: altera_axi_io.c:67
ad7606_dev::config
struct ad7606_config config
Definition: ad7606.c:304
no_os_spi_remove
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
ad7606_config::status_header
bool status_header
Definition: ad7606.h:228
spi_engine_offload_init_param
Structure containing the init parameters needed by the offload module.
Definition: spi_engine.h:143
no_os_gpio.h
Header file of GPIO Interface.
ad7606_chip_info::max_dout_lines
uint8_t max_dout_lines
Definition: ad7606.c:83
ad7606_range
Operation range as specified in datasheet (in uV)
Definition: ad7606.h:235
ad7606_set_ch_phase
int32_t ad7606_set_ch_phase(struct ad7606_dev *dev, uint8_t ch, uint8_t phase)
Set the channel phase.
Definition: ad7606.c:1589
ad7606_get_ch_ranges
const struct ad7606_range * ad7606_get_ch_ranges(struct ad7606_dev *dev, uint8_t ch, uint32_t *num_ranges)
Get the available channel ranges for the given channel.
Definition: ad7606.c:1366
no_os_spi_desc::max_speed_hz
uint32_t max_speed_hz
Definition: no_os_spi.h:198
AD7606_SERIAL_CORE_DISABLE
#define AD7606_SERIAL_CORE_DISABLE
Definition: ad7606.c:74
ad7606_digital_diag::spi_write_err_en
bool spi_write_err_en
Definition: ad7606.h:267
ad7606_axi_dev::clkgen
struct axi_clkgen * clkgen
Definition: ad7606.c:249
no_os_spi_init
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
AD7606_SERIAL_RD_FLAG_MSK
#define AD7606_SERIAL_RD_FLAG_MSK(x)
Definition: ad7606.h:117
ad7606_axi_init_param::clkgen_init
struct axi_clkgen_init * clkgen_init
Definition: ad7606.h:290
no_os_crc16_populate_msb
void no_os_crc16_populate_msb(uint16_t *table, const uint16_t polynomial)
axi_dmac_transfer_start
int32_t axi_dmac_transfer_start(struct axi_dmac *dmac, struct axi_dma_transfer *dma_transfer)
Definition: axi_dmac.c:385
ad7606_capture_pre_enable
int32_t ad7606_capture_pre_enable(struct ad7606_dev *dev)
Prepares buffer capture for an AXI SPI Engine or AXI Parallel interface.
Definition: ad7606.c:1018
AD7606_SPI_READ_ERR_EN_MSK
#define AD7606_SPI_READ_ERR_EN_MSK
Definition: ad7606.h:109
AD7606_CONFIG_STATUS_HEADER_MSK
#define AD7606_CONFIG_STATUS_HEADER_MSK
Definition: ad7606.h:86
ad7606_dev::max_dout_lines
enum ad7606_dout_format max_dout_lines
Definition: ad7606.c:302
axi_clkgen_remove
int32_t axi_clkgen_remove(struct axi_clkgen *clkgen)
axi_clkgen_remove
Definition: clk_axi_clkgen.c:541
no_os_util.h
Header file of utility functions.
ad7606_dev::spi_desc
struct no_os_spi_desc * spi_desc
Definition: ad7606.c:272
ID_AD7606_6
@ ID_AD7606_6
Definition: ad7606.h:135
AD7606_CONFIG_RD
#define AD7606_CONFIG_RD
Definition: ad7606.c:58
AD7606_ROM_CRC_ERR_EN_MSK
#define AD7606_ROM_CRC_ERR_EN_MSK
Definition: ad7606.h:105
AD7606_OSR_128
@ AD7606_OSR_128
Definition: ad7606.h:170
no_os_sign_extend32
int32_t no_os_sign_extend32(uint32_t value, int index)
spi_engine_offload_message::rx_addr
uint32_t rx_addr
Definition: spi_engine.h:171
ad7606_capture_pre_enable
int32_t ad7606_capture_pre_enable(struct ad7606_dev *dev)
Prepares buffer capture for an AXI SPI Engine or AXI Parallel interface.
Definition: ad7606.c:1018
ad7606_chip_info::device_id
uint8_t device_id
Definition: ad7606.c:86
no_os_spi_desc::mode
enum no_os_spi_mode mode
Definition: no_os_spi.h:202
AD7606_OSR_64
@ AD7606_OSR_64
Definition: ad7606.h:168
no_os_gpio_direction_output
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
AD7606_PARALLEL_WR_FLAG_MSK
#define AD7606_PARALLEL_WR_FLAG_MSK(x)
Definition: ad7606.h:121
axi_dma_transfer::size
uint32_t size
Definition: axi_dmac.h:103
ad7606_axi_dev::core_baseaddr
uint32_t core_baseaddr
Definition: ad7606.c:257
ID_AD7605_4
@ ID_AD7605_4
Definition: ad7606.h:131
ad7606_init_param::sw_mode
bool sw_mode
Definition: ad7606.h:337
AD7606_PARALLEL_RD_FLAG_MSK
#define AD7606_PARALLEL_RD_FLAG_MSK(x)
Definition: ad7606.h:120
READ
#define READ(no_bytes)
Definition: spi_engine.h:62
ad7606_chip_info::name
const char * name
Definition: ad7606.c:80
ad7606_init_param::axi_init
struct ad7606_axi_init_param * axi_init
Definition: ad7606.h:313
ad7606_dout_format
ad7606_dout_format
Number of DOUT lines.
Definition: ad7606.h:194
ad7606_axi_init_param::offload_init_param
struct spi_engine_offload_init_param * offload_init_param
Definition: ad7606.h:296
ad7606_range_type
ad7606_range_type
Type of range for this channel.
Definition: ad7606.h:209
ad7606_dev::scale_ch
double scale_ch[AD7606_MAX_CHANNELS]
Definition: ad7606.c:310
errno.h
Error macro definition for ARM Compiler.
ad7606_init_param::gpio_os1
struct no_os_gpio_init_param * gpio_os1
Definition: ad7606.h:327
ID_AD7606B
@ ID_AD7606B
Definition: ad7606.h:139
axi_dmac
Definition: axi_dmac.h:110
AD7606_OSR_1
@ AD7606_OSR_1
Definition: ad7606.h:156
ad7606_reg_read
int32_t ad7606_reg_read(struct ad7606_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Write a device register via SPI or AXI Parallel core.
Definition: ad7606.c:542
ad7606_get_resolution_bits
int32_t ad7606_get_resolution_bits(struct ad7606_dev *dev)
Get the resolution bits of this device.
Definition: ad7606.c:1524
AD7606_CONFIG_WR
#define AD7606_CONFIG_WR
Definition: ad7606.c:57
ad7606_axi_dev::initialized
bool initialized
Definition: ad7606.c:247
ad7606_set_config
int32_t ad7606_set_config(struct ad7606_dev *dev, struct ad7606_config config)
Set the device config register.
Definition: ad7606.c:1659
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
ad7606_reset
int32_t ad7606_reset(struct ad7606_dev *dev)
Reset the device by toggling the reset GPIO.
Definition: ad7606.c:1145
ad7606_dev
Device driver structure.
Definition: ad7606.c:268
ad7606_set_ch_gain
int32_t ad7606_set_ch_gain(struct ad7606_dev *dev, uint8_t ch, uint8_t gain)
Set the channel gain.
Definition: ad7606.c:1623
ad7606_axi_init_param::core_baseaddr
uint32_t core_baseaddr
Definition: ad7606.h:298
no_os_gpio_get_optional
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