Go to the documentation of this file.
55 #if !defined(USE_STANDARD_SPI)
69 #define AD469x_REG_IF_CONFIG_A 0x000
70 #define AD469x_REG_IF_CONFIG_B 0x001
71 #define AD469x_REG_DEVICE_TYPE 0x003
72 #define AD469x_REG_DEVICE_ID_L 0x004
73 #define AD469x_REG_DEVICE_ID_H 0x005
74 #define AD469x_REG_SCRATCH_PAD 0x00A
75 #define AD469x_REG_VENDOR_L 0x00C
76 #define AD469x_REG_VENDOR_H 0x00D
77 #define AD469x_REG_LOOP_MODE 0x00E
78 #define AD469x_REG_IF_CONFIG_C 0x010
79 #define AD469x_REG_IF_STATUS 0x011
80 #define AD469x_REG_STATUS 0x014
81 #define AD469x_REG_ALERT_STATUS1 0x015
82 #define AD469x_REG_ALERT_STATUS2 0x016
83 #define AD469x_REG_ALERT_STATUS3 0x017
84 #define AD469x_REG_ALERT_STATUS4 0x018
85 #define AD469x_REG_CLAMP_STATUS1 0x01A
86 #define AD469x_REG_CLAMP_STATUS2 0x01B
87 #define AD469x_REG_SETUP 0x020
88 #define AD469x_REG_REF_CTRL 0x021
89 #define AD469x_REG_SEQ_CTRL 0x022
90 #define AD469x_REG_AC_CTRL 0x023
91 #define AD469x_REG_STD_SEQ_CONFIG 0x024
92 #define AD469x_REG_GPIO_CTRL 0x026
93 #define AD469x_REG_GP_MODE 0x027
94 #define AD469x_REG_GPIO_STATE 0x028
95 #define AD469x_REG_TEMP_CTRL 0x029
96 #define AD469x_REG_CONFIG_IN(x) ((x & 0x0F) | 0x30)
97 #define AD469x_REG_THRESHOLD_UB(x) ((x << 1) | 0x40)
98 #define AD469x_REG_THRESHOLD_LB(x) ((x << 1) | 0x60)
99 #define AD469x_REG_HYST_IN(x) ((x << 1) | 0x80)
100 #define AD469x_REG_OFFSET_IN(x) ((x << 1) | 0xA0)
101 #define AD469x_REG_GAIN_IN(x) ((x << 1) | 0x0C0)
102 #define AD469x_REG_AS_SLOT(x) ((x & 0x7F) | 0x100)
105 #define AD469x_CMD_REG_CONFIG_MODE (0x0A << 3)
106 #define AD469x_CMD_SEL_TEMP_SNSOR_CH (0x0F << 3)
107 #define AD469x_CMD_CONFIG_CH_SEL(x) ((0x10 | (0x0F & x)) << 3)
110 #define AD469x_REG_STATUS_RESET_MASK (0x01 << 5)
113 #define AD469x_SETUP_IF_MODE_MASK (0x01 << 2)
114 #define AD469x_SETUP_IF_MODE_CONV (0x01 << 2)
115 #define AD469x_SETUP_CYC_CTRL_MASK (0x01 << 1)
116 #define AD469x_SETUP_CYC_CTRL_SINGLE(x) ((x & 0x01) << 1)
119 #define AD469x_REG_REF_VREF_SET_MASK (0x07 << 2)
120 #define AD469x_REG_REF_VREF_SET(x) ((x & 0x07) << 2)
121 #define AD469x_REG_REF_VREF_REFHIZ_MASK (0x07 << 1)
122 #define AD469x_REG_REF_VREF_REFHIZ(x) ((x & 0x01) << 1)
123 #define AD469x_REG_REF_VREF_REFBUF_MASK 0x01
124 #define AD469x_REG_REF_VREF_REFBUF(x) (x & 0x01)
127 #define AD469x_GP_MODE_BUSY_GP_EN_MASK (0x01 << 1)
128 #define AD469x_GP_MODE_BUSY_GP_EN(x) ((x & 0x01) << 1)
129 #define AD469x_GP_MODE_BUSY_GP_SEL_MASK (0x01 << 4)
130 #define AD469x_GP_MODE_BUSY_GP_SEL(x) ((x & 0x01) << 4)
133 #define AD469x_SEQ_CTRL_STD_SEQ_EN_MASK (0x01 << 7)
134 #define AD469x_SEQ_CTRL_STD_SEQ_EN(x) ((x & 0x01) << 7)
135 #define AD469x_SEQ_CTRL_NUM_SLOTS_AS_MASK (0x7f << 0)
136 #define AD469x_SEQ_CTRL_NUM_SLOTS_AS(x) ((x & 0x7f) << 0)
139 #define AD469x_REG_TEMP_CTRL_TEMP_EN_MASK (0x01 << 0)
140 #define AD469x_REG_TEMP_CTRL_TEMP_EN(x) ((x & 0x01) << 0)
143 #define AD469x_REG_AS_SLOT_INX(x) ((x & 0x0f) << 0)
146 #define AD469x_REG_IF_CONFIG_C_MB_STRICT_MASK (0x01 << 5)
147 #define AD469x_REG_IF_CONFIG_C_MB_STRICT(x) ((x & 0x01) << 5)
150 #define AD469x_REG_CONFIG_IN_OSR_MASK (0x03 << 0)
151 #define AD469x_REG_CONFIG_IN_OSR(x) ((x & 0x03) << 0)
152 #define AD469x_REG_CONFIG_IN_HIZ_EN_MASK (0x01 << 3)
153 #define AD469x_REG_CONFIG_IN_HIZ_EN(x) ((x & 0x01) << 3)
154 #define AD469x_REG_CONFIG_IN_PAIR_MASK (0x03 << 4)
155 #define AD469x_REG_CONFIG_IN_PAIR(x) ((x & 0x03) << 4)
156 #define AD469x_REG_CONFIG_IN_MODE_MASK (0x01 << 6)
157 #define AD469x_REG_CONFIG_IN_MODE(x) ((x & 0x01) << 6)
158 #define AD469x_REG_CONFIG_IN_TD_EN_MASK (0x01 << 7)
159 #define AD469x_REG_CONFIG_IN_TD_EN(x) ((x & 0x01) << 7)
161 #define AD469x_CHANNEL(x) (NO_OS_BIT(x) & 0xFFFF)
162 #define AD469x_CHANNEL_NO 16
163 #define AD469x_SLOTS_NO 0x80
263 #if !defined(USE_STANDARD_SPI)
314 #if !defined(USE_STANDARD_SPI)
const char * name
Definition: clk_axi_clkgen.h:57
@ ID_AD4696
Definition: ad469x.h:209
uint32_t axi_clkgen_rate
Definition: ad469x.h:271
int32_t ad469x_init(struct ad469x_dev **device, struct ad469x_init_param *init_param)
Definition: ad469x.c:1071
#define AD469x_REG_TEMP_CTRL_TEMP_EN_MASK
Definition: ad469x.h:139
void(* dcache_invalidate_range)(uint32_t address, uint32_t bytes_count)
Definition: ad469x.h:337
@ AD469x_two_cycle
Definition: ad469x.h:176
ad469x_channel_sequencing
Channel sequencing modes.
Definition: ad469x.h:172
@ ID_AD4697
Definition: ad469x.h:210
void(* dcache_invalidate_range)(uint32_t address, uint32_t bytes_count)
Definition: ad469x.h:298
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
uint32_t no_commands
Definition: spi_engine.h:167
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:72
int32_t ad469x_std_sequence_ch(struct ad469x_dev *dev, uint16_t ch_mask)
Configure standard sequencer channels.
Definition: ad469x.c:563
enum ad469x_channel_sequencing ch_sequence
Definition: ad469x.h:290
@ AD469x_3P25_3P75
Definition: ad469x.h:242
bool temp_enabled
Definition: ad469x.h:302
int32_t ad469x_set_reference(struct ad469x_dev *device, enum ad469x_ref_set ref_set)
Set the value of reference.
Definition: ad469x.c:909
uint32_t reg_access_speed
Definition: ad469x.h:323
int32_t ad469x_sequence_enable_temp(struct ad469x_dev *dev)
Enable temperature read at the end of the sequence, for standard and advanced sequencer.
Definition: ad469x.c:590
int32_t ad469x_enter_conversion_mode(struct ad469x_dev *dev)
Enter conversion mode. To exit conversion mode send a 5 bit conversion mode command AD469x_CMD_REG_CO...
Definition: ad469x.c:665
@ AD469x_INx_COM
Definition: ad469x.h:231
struct no_os_pwm_init_param * trigger_pwm_init
Definition: ad469x.h:267
ad469x_supported_dev_ids
Supported devices.
Definition: ad469x.h:207
enum ad469x_osr_ratios adv_seq_osr_resol[AD469x_CHANNEL_NO]
Definition: ad469x.h:347
int32_t ad469x_exit_conversion_mode(struct ad469x_dev *dev)
Exit conversion mode. Enter register mode to read/write registers.
Definition: ad469x.c:679
int32_t ad469x_adv_sequence_set_num_slots(struct ad469x_dev *dev, uint8_t num_slots)
Configure advanced sequencer number of slots, temp channel not included.
Definition: ad469x.c:513
int32_t ad469x_config_extended(struct ad469x_dev *dev, struct ad469x_init_param *config_desc)
Definition: ad469x.c:967
int32_t ad469x_set_busy(struct ad469x_dev *dev, enum ad469x_busy_gp_sel gp_sel)
Configure converter busy indicator to the output of the specified port.
Definition: ad469x.c:634
#define NO_OS_GENMASK(h, l)
Definition: no_os_util.h:86
#define AD469x_SEQ_CTRL_STD_SEQ_EN(x)
Definition: ad469x.h:134
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:165
int32_t ad469x_sequence_disable_temp(struct ad469x_dev *dev)
Disable temperature read at the end of the sequence, for standard and advanced sequencer.
Definition: ad469x.c:612
ad469x_ain_high_z
Analog input high impedance mode.
Definition: ad469x.h:251
struct axi_clkgen * clkgen
Definition: ad469x.h:316
#define CS_LOW
Definition: spi_engine.h:79
int32_t ad469x_remove(struct ad469x_dev *dev)
Free the memory allocated by ad469x_init().
Definition: ad469x.c:1200
Header file of SPI Interface.
int32_t ad469x_configure_ain_high_z(struct ad469x_dev *dev, uint8_t ch, enum ad469x_ain_high_z status)
Configure analog input high Z mode.
Definition: ad469x.c:1030
uint32_t reg_access_speed
Definition: ad469x.h:280
int32_t ad469x_sequence_disable_temp(struct ad469x_dev *dev)
Disable temperature read at the end of the sequence, for standard and advanced sequencer.
Definition: ad469x.c:612
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:759
int32_t ad469x_read_data(struct ad469x_dev *dev, uint8_t channel, uint32_t *buf, uint16_t samples)
Read from device. Enter register mode to read/write registers.
Definition: ad469x.c:799
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:85
int32_t ad469x_get_reference(struct ad469x_dev *device, enum ad469x_ref_set *ref_set)
Get the value of reference.
Definition: ad469x.c:885
int32_t ad469x_set_channel_sequence(struct ad469x_dev *dev, enum ad469x_channel_sequencing seq)
Set channel sequence.
Definition: ad469x.c:408
#define AD469x_REG_CONFIG_IN_MODE(x)
Definition: ad469x.h:157
int32_t ad469x_set_reg_access_mode(struct ad469x_dev *dev, enum ad469x_reg_access access)
Configure register access mode.
Definition: ad469x.c:224
#define AD469x_TEST_DATA
Definition: ad469x.c:58
struct no_os_pwm_desc * trigger_pwm_desc
Definition: ad469x.h:318
Driver for the Analog Devices AXI CLKGEN.
ad469x_pin_pairing
Channel pin pairing options.
Definition: ad469x.h:229
int32_t ad469x_get_ain_high_z_status(struct ad469x_dev *dev, uint8_t ch, enum ad469x_ain_high_z *status)
Get the status of analog input high Z mode.
Definition: ad469x.c:1046
uint32_t * commands_data
Definition: spi_engine.h:169
int32_t ad469x_reset_dev(struct ad469x_dev *dev)
Resets the ad469x device.
Definition: ad469x.c:852
int32_t ad469x_adv_seq_osr(struct ad469x_dev *dev, uint16_t ch, enum ad469x_osr_ratios ratio)
Configure over sampling ratio in advanced sequencer mode.
Definition: ad469x.c:306
uint32_t period_ns
Definition: no_os_pwm.h:76
Header file of Delay functions.
int32_t ad469x_get_num_channels(struct ad469x_dev *dev, uint8_t *num_channels)
Definition: ad469x.c:272
#define AD469x_GP_MODE_BUSY_GP_EN_MASK
Definition: ad469x.h:127
Definition: clk_axi_clkgen.h:56
enum ad469x_channel_sequencing ch_sequence
Definition: ad469x.h:339
int32_t axi_clkgen_set_rate(struct axi_clkgen *clkgen, uint32_t rate)
axi_clkgen_set_rate
Definition: clk_axi_clkgen.c:419
#define AD469x_REG_CONFIG_IN_OSR_MASK
Definition: ad469x.h:150
int32_t ad469x_enter_conversion_mode(struct ad469x_dev *dev)
Enter conversion mode. To exit conversion mode send a 5 bit conversion mode command AD469x_CMD_REG_CO...
Definition: ad469x.c:665
int32_t ad469x_reset_dev(struct ad469x_dev *dev)
Resets the ad469x device.
Definition: ad469x.c:852
struct no_os_spi_init_param * spi_init
Definition: ad469x.h:262
Structure representing an offload message.
Definition: spi_engine.h:160
#define AD469x_GP_MODE_BUSY_GP_SEL_MASK
Definition: ad469x.h:129
Definition: ad9361_util.h:75
int32_t ad469x_spi_write_mask(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t mask, uint8_t data)
Definition: ad469x.c:200
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:123
struct no_os_gpio_desc * gpio_resetn
Definition: ad469x.h:331
enum ad469x_pin_pairing std_seq_pin_pairing
Definition: ad469x.h:341
@ AD469x_advanced_seq
Definition: ad469x.h:180
int32_t axi_clkgen_init(struct axi_clkgen **clk, const struct axi_clkgen_init *init)
axi_clkgen_init
Definition: clk_axi_clkgen.c:525
#define AD469x_REG_IF_CONFIG_C_MB_STRICT(x)
Definition: ad469x.h:147
Definition: clk_axi_clkgen.h:50
int32_t ad469x_set_reference(struct ad469x_dev *device, enum ad469x_ref_set ref_set)
Set the value of reference.
Definition: ad469x.c:909
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:53
int32_t ad469x_std_sequence_ch(struct ad469x_dev *dev, uint16_t ch_mask)
Configure standard sequencer channels.
Definition: ad469x.c:563
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:130
enum ad469x_supported_dev_ids dev_id
Definition: ad469x.h:286
int32_t ad469x_std_pin_pairing(struct ad469x_dev *dev, enum ad469x_pin_pairing pin_pair)
Configure the pin pairing option in standard sequencer mode.
Definition: ad469x.c:391
#define AD469x_CMD_CONFIG_CH_SEL(x)
Definition: ad469x.h:107
int32_t ad469x_spi_reg_read(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Definition: ad469x.c:93
struct no_os_gpio_init_param * gpio_convst
Definition: ad469x.h:276
@ ID_AD4698
Definition: ad469x.h:211
int32_t ad469x_spi_read_mask(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t mask, uint8_t *data)
Definition: ad469x.c:175
#define WRITE_READ(no_bytes)
Definition: spi_engine.h:71
const uint8_t ad469x_device_resol[]
Device resolution.
Definition: ad469x.c:63
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:121
@ AD469x_AIN_HIGH_Z_DISABLE
Definition: ad469x.h:252
uint32_t reg_access_speed
Definition: ad7616.h:218
int32_t ad469x_get_reference(struct ad469x_dev *device, enum ad469x_ref_set *ref_set)
Get the value of reference.
Definition: ad469x.c:885
struct no_os_gpio_init_param * gpio_resetn
Definition: ad469x.h:274
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:132
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
@ AD469x_4P5_5P1
Definition: ad469x.h:244
#define AD469x_SEQ_CTRL_NUM_SLOTS_AS(x)
Definition: ad469x.h:136
int32_t ad469x_std_seq_osr(struct ad469x_dev *dev, enum ad469x_osr_ratios ratio)
Configure over sampling ratio in standard sequencer mode.
Definition: ad469x.c:363
@ AD469x_3P75_4P5
Definition: ad469x.h:243
#define CS_HIGH
Definition: spi_engine.h:78
void spi_engine_set_speed(struct no_os_spi_desc *desc, uint32_t speed_hz)
Set SPI engine clock frequency.
Definition: spi_engine.c:152
#define AD469x_SETUP_CYC_CTRL_MASK
Definition: ad469x.h:115
@ AD469x_busy_gp3
Definition: ad469x.h:191
#define AD469x_REG_CONFIG_IN_HIZ_EN_MASK
Definition: ad469x.h:152
enum ad469x_supported_dev_ids dev_id
Definition: ad469x.h:329
int32_t ad469x_read_data(struct ad469x_dev *dev, uint8_t channel, uint32_t *buf, uint16_t samples)
Read from device. Enter register mode to read/write registers.
Definition: ad469x.c:799
int32_t no_os_pwm_enable(struct no_os_pwm_desc *desc)
Enable PWM signal generation.
Definition: no_os_pwm.c:104
int32_t ad469x_adv_sequence_set_num_slots(struct ad469x_dev *dev, uint8_t num_slots)
Configure advanced sequencer number of slots, temp channel not included.
Definition: ad469x.c:513
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:56
#define AD469x_REG_GP_MODE
Definition: ad469x.h:93
#define AD469x_REG_TEMP_CTRL_TEMP_EN(x)
Definition: ad469x.h:140
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:131
bool ad469x_is_temp_channel(struct ad469x_dev *dev, uint8_t channel)
Definition: ad469x.c:285
#define AD469x_REG_REF_CTRL
Definition: ad469x.h:88
struct spi_engine_offload_init_param * offload_init_param
Definition: ad7616.h:211
uint8_t reg_data_width
Definition: ad469x.h:282
#define AD469x_CMD_SEL_TEMP_SNSOR_CH
Definition: ad469x.h:106
struct no_os_pwm_init_param * trigger_pwm_init
Definition: ad7616.h:213
int32_t no_os_pwm_disable(struct no_os_pwm_desc *desc)
Disable PWM signal generation.
Definition: no_os_pwm.c:121
int32_t ad469x_set_channel_sequence(struct ad469x_dev *dev, enum ad469x_channel_sequencing seq)
Set channel sequence.
Definition: ad469x.c:408
ad469x_reg_access
Register access modes.
Definition: ad469x.h:198
#define AD469x_REG_CONFIG_IN(x)
Definition: ad469x.h:96
@ AD469x_AIN_HIGH_Z_ENABLE
Definition: ad469x.h:253
bool enable_extended_init
Definition: ad469x.h:304
uint8_t capture_data_width
Definition: ad469x.h:327
@ ID_AD4695
Definition: ad469x.h:208
ad469x_busy_gp_sel
Busy state, possible general purpose pin selections.
Definition: ad469x.h:187
@ AD469x_single_cycle
Definition: ad469x.h:174
enum ad469x_osr_ratios std_seq_osr
Definition: ad469x.h:344
int32_t ad469x_spi_write_mask(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t mask, uint8_t data)
Definition: ad469x.c:200
struct spi_engine_offload_init_param * offload_init_param
Definition: ad469x.h:320
int32_t ad469x_set_busy(struct ad469x_dev *dev, enum ad469x_busy_gp_sel gp_sel)
Configure converter busy indicator to the output of the specified port.
Definition: ad469x.c:634
uint8_t num_slots
Definition: ad469x.h:353
#define AD469x_SETUP_IF_MODE_CONV
Definition: ad469x.h:114
int32_t ad469x_adv_seq_osr(struct ad469x_dev *dev, uint16_t ch, enum ad469x_osr_ratios ratio)
Configure over sampling ratio in advanced sequencer mode.
Definition: ad469x.c:306
#define AD469x_GP_MODE_BUSY_GP_SEL(x)
Definition: ad469x.h:130
unsigned int no_os_hweight16(uint16_t word)
ad469x_ref_set
Reference input range control.
Definition: ad469x.h:239
Header file for ad469x Driver.
#define AD469x_REG_SEQ_CTRL
Definition: ad469x.h:89
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:110
#define AD469x_REG_CONFIG_IN_MODE_MASK
Definition: ad469x.h:156
#define AD469x_REG_STD_SEQ_CONFIG
Definition: ad469x.h:91
Structure holding SPI descriptor.
Definition: no_os_spi.h:177
#define AD469x_REG_IF_CONFIG_C_MB_STRICT_MASK
Definition: ad469x.h:146
num_channels
Definition: ad3552r.h:248
int32_t ad469x_adv_sequence_set_slot(struct ad469x_dev *dev, uint8_t slot, uint8_t channel)
Advanced sequencer, assign channel to a slot.
Definition: ad469x.c:541
struct ad469x_device_info dev_info[]
Definition: ad469x.c:75
#define AD469x_REG_TEMP_CTRL
Definition: ad469x.h:95
#define AD469x_REG_AS_SLOT_INX(x)
Definition: ad469x.h:143
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
enum ad469x_pin_pairing std_seq_pin_pairing
Definition: ad469x.h:288
int32_t ad469x_config(struct ad469x_dev *dev, struct ad469x_init_param *config_desc)
Definition: ad469x.c:925
#define AD469x_SEQ_CTRL_STD_SEQ_EN_MASK
Definition: ad469x.h:133
int32_t ad469x_remove(struct ad469x_dev *dev)
Free the memory allocated by ad469x_init().
Definition: ad469x.c:1200
uint32_t * commands
Definition: spi_engine.h:165
Structure representing an PWM generator device.
Definition: no_os_pwm.h:99
Structure representing an ad469x device.
Definition: ad469x.h:311
int32_t ad469x_init(struct ad469x_dev **device, struct ad469x_init_param *init_param)
Definition: ad469x.c:1071
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:57
#define AD469x_REG_CONFIG_IN_OSR(x)
Definition: ad469x.h:151
void(* dcache_invalidate_range)(uint32_t address, uint32_t bytes_count)
Definition: ad7616.h:236
uint32_t axi_clkgen_rate
Definition: ad7616.h:217
uint8_t max_data_ch
Definition: ad469x.c:71
@ AD469x_INx_REF_GND
Definition: ad469x.h:230
#define AD469x_SLOTS_NO
Definition: ad469x.h:163
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:49
@ AD469x_OSR_64
Definition: ad469x.h:222
#define AD469x_REG_SCRATCH_PAD
Definition: ad469x.h:74
struct no_os_gpio_desc * gpio_busy
Definition: ad469x.h:335
Header file of PWM Interface.
@ AD469x_BYTE_ACCESS
Definition: ad469x.h:199
int32_t ad469x_std_seq_osr(struct ad469x_dev *dev, enum ad469x_osr_ratios ratio)
Configure over sampling ratio in standard sequencer mode.
Definition: ad469x.c:363
int32_t ad469x_sequence_enable_temp(struct ad469x_dev *dev)
Enable temperature read at the end of the sequence, for standard and advanced sequencer.
Definition: ad469x.c:590
@ AD469x_OSR_16
Definition: ad469x.h:221
ad469x_osr_ratios
Supported oversampling ratios.
Definition: ad469x.h:218
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
@ AD469x_2P75_3P25
Definition: ad469x.h:241
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:75
#define AD469x_REG_IF_CONFIG_C
Definition: ad469x.h:78
@ AD469x_busy_gp0
Definition: ad469x.h:189
int32_t ad469x_spi_reg_read(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Definition: ad469x.c:93
#define AD469x_REG_CONFIG_IN_HIZ_EN(x)
Definition: ad469x.h:153
bool ad469x_is_temp_channel(struct ad469x_dev *dev, uint8_t channel)
Definition: ad469x.c:285
int32_t ad469x_std_pin_pairing(struct ad469x_dev *dev, enum ad469x_pin_pairing pin_pair)
Configure the pin pairing option in standard sequencer mode.
Definition: ad469x.c:391
@ AD469x_OSR_4
Definition: ad469x.h:220
#define AD469x_REG_REF_VREF_SET_MASK
Definition: ad469x.h:119
@ AD469x_OSR_1
Definition: ad469x.h:219
int32_t ad469x_spi_reg_write(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Definition: ad469x.c:134
#define AD469x_GP_MODE_BUSY_GP_EN(x)
Definition: ad469x.h:128
struct no_os_gpio_desc * gpio_convst
Definition: ad469x.h:333
uint8_t num_data_ch
Definition: ad469x.h:300
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:203
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
struct axi_clkgen_init * clkgen_init
Definition: ad7616.h:215
int32_t ad469x_seq_read_data(struct ad469x_dev *dev, uint32_t *buf, uint32_t samples)
Read from device when converter has the channel sequencer activated. Enter register mode to read/writ...
Definition: ad469x.c:765
@ AD469x_2P4_2P75
Definition: ad469x.h:240
int32_t ad469x_adv_sequence_set_slot(struct ad469x_dev *dev, uint8_t slot, uint8_t channel)
Advanced sequencer, assign channel to a slot.
Definition: ad469x.c:541
#define AD469x_SETUP_CYC_CTRL_SINGLE(x)
Definition: ad469x.h:116
struct no_os_spi_desc * spi_desc
Definition: ad469x.h:313
uint8_t num_data_ch
Definition: ad469x.h:355
@ AD469x_WORD_ACCESS
Definition: ad469x.h:200
#define AD469x_CMD_REG_CONFIG_MODE
Definition: ad469x.h:105
#define AD469x_SETUP_IF_MODE_MASK
Definition: ad469x.h:113
struct axi_clkgen_init * clkgen_init
Definition: ad469x.h:269
uint8_t capture_data_width
Definition: ad469x.h:284
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:805
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:122
#define AD469x_REG_AS_SLOT(x)
Definition: ad469x.h:102
Structure containing the init parameters needed by the offload module.
Definition: spi_engine.h:145
Header file of GPIO Interface.
int32_t ad469x_config(struct ad469x_dev *dev, struct ad469x_init_param *config_desc)
Definition: ad469x.c:925
#define AD469x_CHANNEL_NO
Definition: ad469x.h:162
uint32_t max_speed_hz
Definition: no_os_spi.h:183
struct no_os_gpio_init_param * gpio_busy
Definition: ad469x.h:278
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:58
int32_t ad469x_get_num_channels(struct ad469x_dev *dev, uint8_t *num_channels)
Definition: ad469x.c:272
enum ad469x_osr_ratios std_seq_osr
Definition: ad469x.h:293
#define AD469x_REG_STATUS_RESET_MASK
Definition: ad469x.h:110
int32_t axi_clkgen_remove(struct axi_clkgen *clkgen)
axi_clkgen_remove
Definition: clk_axi_clkgen.c:546
Header file of utility functions.
int32_t ad469x_spi_reg_write(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Definition: ad469x.c:134
uint32_t max_rate_ksps
Definition: ad469x.c:72
enum ad469x_osr_ratios adv_seq_osr_resol[AD469x_CHANNEL_NO]
Definition: ad469x.h:296
int32_t ad469x_configure_ain_high_z(struct ad469x_dev *dev, uint8_t ch, enum ad469x_ain_high_z status)
Configure analog input high Z mode.
Definition: ad469x.c:1030
uint32_t rx_addr
Definition: spi_engine.h:173
@ AD469x_INx_EVEN_ODD
Definition: ad469x.h:232
#define AD469x_SEQ_CTRL_NUM_SLOTS_AS_MASK
Definition: ad469x.h:135
int32_t ad469x_spi_read_mask(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t mask, uint8_t *data)
Definition: ad469x.c:175
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:153
int32_t ad469x_exit_conversion_mode(struct ad469x_dev *dev)
Exit conversion mode. Enter register mode to read/write registers.
Definition: ad469x.c:679
struct spi_engine_offload_init_param * offload_init_param
Definition: ad469x.h:265
uint8_t ch_slots[AD469x_SLOTS_NO]
Definition: ad469x.h:349
Structure containing the init parameters needed by the ad469x device.
Definition: ad469x.h:260
@ AD469x_standard_seq
Definition: ad469x.h:178
bool temp_enabled
Definition: ad469x.h:351
int32_t ad469x_get_ain_high_z_status(struct ad469x_dev *dev, uint8_t ch, enum ad469x_ain_high_z *status)
Get the status of analog input high Z mode.
Definition: ad469x.c:1046
int32_t ad469x_seq_read_data(struct ad469x_dev *dev, uint32_t *buf, uint32_t samples)
Read from device when converter has the channel sequencer activated. Enter register mode to read/writ...
Definition: ad469x.c:765
#define AD469x_REG_STATUS
Definition: ad469x.h:80
#define AD469x_REG_SETUP
Definition: ad469x.h:87
uint8_t reg_data_width
Definition: ad469x.h:325
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:131
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:81