Go to the documentation of this file.
49 #if !defined(USE_STANDARD_SPI)
63 #define AD469x_REG_IF_CONFIG_A 0x000
64 #define AD469x_REG_IF_CONFIG_B 0x001
65 #define AD469x_REG_DEVICE_TYPE 0x003
66 #define AD469x_REG_DEVICE_ID_L 0x004
67 #define AD469x_REG_DEVICE_ID_H 0x005
68 #define AD469x_REG_SCRATCH_PAD 0x00A
69 #define AD469x_REG_VENDOR_L 0x00C
70 #define AD469x_REG_VENDOR_H 0x00D
71 #define AD469x_REG_LOOP_MODE 0x00E
72 #define AD469x_REG_IF_CONFIG_C 0x010
73 #define AD469x_REG_IF_STATUS 0x011
74 #define AD469x_REG_STATUS 0x014
75 #define AD469x_REG_ALERT_STATUS1 0x015
76 #define AD469x_REG_ALERT_STATUS2 0x016
77 #define AD469x_REG_ALERT_STATUS3 0x017
78 #define AD469x_REG_ALERT_STATUS4 0x018
79 #define AD469x_REG_CLAMP_STATUS1 0x01A
80 #define AD469x_REG_CLAMP_STATUS2 0x01B
81 #define AD469x_REG_SETUP 0x020
82 #define AD469x_REG_REF_CTRL 0x021
83 #define AD469x_REG_SEQ_CTRL 0x022
84 #define AD469x_REG_AC_CTRL 0x023
85 #define AD469x_REG_STD_SEQ_CONFIG 0x024
86 #define AD469x_REG_GPIO_CTRL 0x026
87 #define AD469x_REG_GP_MODE 0x027
88 #define AD469x_REG_GPIO_STATE 0x028
89 #define AD469x_REG_TEMP_CTRL 0x029
90 #define AD469x_REG_CONFIG_IN(x) ((x & 0x0F) | 0x30)
91 #define AD469x_REG_THRESHOLD_UB(x) ((x << 1) | 0x40)
92 #define AD469x_REG_THRESHOLD_LB(x) ((x << 1) | 0x60)
93 #define AD469x_REG_HYST_IN(x) ((x << 1) | 0x80)
94 #define AD469x_REG_OFFSET_IN(x) ((x << 1) | 0xA0)
95 #define AD469x_REG_GAIN_IN(x) ((x << 1) | 0x0C0)
96 #define AD469x_REG_AS_SLOT(x) ((x & 0x7F) | 0x100)
99 #define AD469x_CMD_REG_CONFIG_MODE (0x0A << 3)
100 #define AD469x_CMD_SEL_TEMP_SNSOR_CH (0x0F << 3)
101 #define AD469x_CMD_CONFIG_CH_SEL(x) ((0x10 | (0x0F & x)) << 3)
104 #define AD469x_REG_STATUS_RESET_MASK (0x01 << 5)
107 #define AD469x_SETUP_IF_MODE_MASK (0x01 << 2)
108 #define AD469x_SETUP_IF_MODE_CONV (0x01 << 2)
109 #define AD469x_SETUP_CYC_CTRL_MASK (0x01 << 1)
110 #define AD469x_SETUP_CYC_CTRL_SINGLE(x) ((x & 0x01) << 1)
113 #define AD469x_REG_REF_VREF_SET_MASK (0x07 << 2)
114 #define AD469x_REG_REF_VREF_SET(x) ((x & 0x07) << 2)
115 #define AD469x_REG_REF_VREF_REFHIZ_MASK (0x07 << 1)
116 #define AD469x_REG_REF_VREF_REFHIZ(x) ((x & 0x01) << 1)
117 #define AD469x_REG_REF_VREF_REFBUF_MASK 0x01
118 #define AD469x_REG_REF_VREF_REFBUF(x) (x & 0x01)
121 #define AD469x_GP_MODE_BUSY_GP_EN_MASK (0x01 << 1)
122 #define AD469x_GP_MODE_BUSY_GP_EN(x) ((x & 0x01) << 1)
123 #define AD469x_GP_MODE_BUSY_GP_SEL_MASK (0x01 << 4)
124 #define AD469x_GP_MODE_BUSY_GP_SEL(x) ((x & 0x01) << 4)
127 #define AD469x_SEQ_CTRL_STD_SEQ_EN_MASK (0x01 << 7)
128 #define AD469x_SEQ_CTRL_STD_SEQ_EN(x) ((x & 0x01) << 7)
129 #define AD469x_SEQ_CTRL_NUM_SLOTS_AS_MASK (0x7f << 0)
130 #define AD469x_SEQ_CTRL_NUM_SLOTS_AS(x) ((x & 0x7f) << 0)
133 #define AD469x_REG_TEMP_CTRL_TEMP_EN_MASK (0x01 << 0)
134 #define AD469x_REG_TEMP_CTRL_TEMP_EN(x) ((x & 0x01) << 0)
137 #define AD469x_REG_AS_SLOT_INX(x) ((x & 0x0f) << 0)
140 #define AD469x_REG_IF_CONFIG_C_MB_STRICT_MASK (0x01 << 5)
141 #define AD469x_REG_IF_CONFIG_C_MB_STRICT(x) ((x & 0x01) << 5)
144 #define AD469x_REG_CONFIG_IN_OSR_MASK (0x03 << 0)
145 #define AD469x_REG_CONFIG_IN_OSR(x) ((x & 0x03) << 0)
146 #define AD469x_REG_CONFIG_IN_HIZ_EN_MASK (0x01 << 3)
147 #define AD469x_REG_CONFIG_IN_HIZ_EN(x) ((x & 0x01) << 3)
148 #define AD469x_REG_CONFIG_IN_PAIR_MASK (0x03 << 4)
149 #define AD469x_REG_CONFIG_IN_PAIR(x) ((x & 0x03) << 4)
150 #define AD469x_REG_CONFIG_IN_MODE_MASK (0x01 << 6)
151 #define AD469x_REG_CONFIG_IN_MODE(x) ((x & 0x01) << 6)
152 #define AD469x_REG_CONFIG_IN_TD_EN_MASK (0x01 << 7)
153 #define AD469x_REG_CONFIG_IN_TD_EN(x) ((x & 0x01) << 7)
155 #define AD469x_CHANNEL(x) (NO_OS_BIT(x) & 0xFFFF)
156 #define AD469x_CHANNEL_NO 16
157 #define AD469x_SLOTS_NO 0x80
257 #if !defined(USE_STANDARD_SPI)
308 #if !defined(USE_STANDARD_SPI)
const char * name
Definition: clk_axi_clkgen.h:51
@ ID_AD4696
Definition: ad469x.h:203
uint32_t axi_clkgen_rate
Definition: ad469x.h:265
int32_t ad469x_init(struct ad469x_dev **device, struct ad469x_init_param *init_param)
Definition: ad469x.c:1065
#define AD469x_REG_TEMP_CTRL_TEMP_EN_MASK
Definition: ad469x.h:133
void(* dcache_invalidate_range)(uint32_t address, uint32_t bytes_count)
Definition: ad469x.h:331
@ AD469x_two_cycle
Definition: ad469x.h:170
ad469x_channel_sequencing
Channel sequencing modes.
Definition: ad469x.h:166
@ ID_AD4697
Definition: ad469x.h:204
void(* dcache_invalidate_range)(uint32_t address, uint32_t bytes_count)
Definition: ad469x.h:292
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
uint32_t no_commands
Definition: spi_engine.h:165
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:66
int32_t ad469x_std_sequence_ch(struct ad469x_dev *dev, uint16_t ch_mask)
Configure standard sequencer channels.
Definition: ad469x.c:557
enum ad469x_channel_sequencing ch_sequence
Definition: ad469x.h:284
@ AD469x_3P25_3P75
Definition: ad469x.h:236
bool temp_enabled
Definition: ad469x.h:296
int32_t ad469x_set_reference(struct ad469x_dev *device, enum ad469x_ref_set ref_set)
Set the value of reference.
Definition: ad469x.c:903
uint32_t reg_access_speed
Definition: ad469x.h:317
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:584
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:659
@ AD469x_INx_COM
Definition: ad469x.h:225
struct no_os_pwm_init_param * trigger_pwm_init
Definition: ad469x.h:261
ad469x_supported_dev_ids
Supported devices.
Definition: ad469x.h:201
enum ad469x_osr_ratios adv_seq_osr_resol[AD469x_CHANNEL_NO]
Definition: ad469x.h:341
int32_t ad469x_exit_conversion_mode(struct ad469x_dev *dev)
Exit conversion mode. Enter register mode to read/write registers.
Definition: ad469x.c:673
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:507
int32_t ad469x_config_extended(struct ad469x_dev *dev, struct ad469x_init_param *config_desc)
Definition: ad469x.c:961
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:628
#define NO_OS_GENMASK(h, l)
Definition: no_os_util.h:82
#define AD469x_SEQ_CTRL_STD_SEQ_EN(x)
Definition: ad469x.h:128
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 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:606
ad469x_ain_high_z
Analog input high impedance mode.
Definition: ad469x.h:245
struct axi_clkgen * clkgen
Definition: ad469x.h:310
#define CS_LOW
Definition: spi_engine.h:73
int32_t ad469x_remove(struct ad469x_dev *dev)
Free the memory allocated by ad469x_init().
Definition: ad469x.c:1194
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:1024
uint32_t reg_access_speed
Definition: ad469x.h:274
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:606
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
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:793
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
int32_t ad469x_get_reference(struct ad469x_dev *device, enum ad469x_ref_set *ref_set)
Get the value of reference.
Definition: ad469x.c:879
int32_t ad469x_set_channel_sequence(struct ad469x_dev *dev, enum ad469x_channel_sequencing seq)
Set channel sequence.
Definition: ad469x.c:402
#define AD469x_REG_CONFIG_IN_MODE(x)
Definition: ad469x.h:151
int32_t ad469x_set_reg_access_mode(struct ad469x_dev *dev, enum ad469x_reg_access access)
Configure register access mode.
Definition: ad469x.c:218
#define AD469x_TEST_DATA
Definition: ad469x.c:52
struct no_os_pwm_desc * trigger_pwm_desc
Definition: ad469x.h:312
Driver for the Analog Devices AXI CLKGEN.
ad469x_pin_pairing
Channel pin pairing options.
Definition: ad469x.h:223
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:1040
uint32_t * commands_data
Definition: spi_engine.h:167
int32_t ad469x_reset_dev(struct ad469x_dev *dev)
Resets the ad469x device.
Definition: ad469x.c:846
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:300
uint32_t period_ns
Definition: no_os_pwm.h:70
Header file of Delay functions.
int32_t ad469x_get_num_channels(struct ad469x_dev *dev, uint8_t *num_channels)
Definition: ad469x.c:266
#define AD469x_GP_MODE_BUSY_GP_EN_MASK
Definition: ad469x.h:121
Definition: clk_axi_clkgen.h:50
enum ad469x_channel_sequencing ch_sequence
Definition: ad469x.h:333
int32_t axi_clkgen_set_rate(struct axi_clkgen *clkgen, uint32_t rate)
axi_clkgen_set_rate
Definition: clk_axi_clkgen.c:414
#define AD469x_REG_CONFIG_IN_OSR_MASK
Definition: ad469x.h:144
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:659
int32_t ad469x_reset_dev(struct ad469x_dev *dev)
Resets the ad469x device.
Definition: ad469x.c:846
struct no_os_spi_init_param * spi_init
Definition: ad469x.h:256
Structure representing an offload message.
Definition: spi_engine.h:158
#define AD469x_GP_MODE_BUSY_GP_SEL_MASK
Definition: ad469x.h:123
Definition: ad9361_util.h:69
int32_t ad469x_spi_write_mask(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t mask, uint8_t data)
Definition: ad469x.c:194
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
struct no_os_gpio_desc * gpio_resetn
Definition: ad469x.h:325
enum ad469x_pin_pairing std_seq_pin_pairing
Definition: ad469x.h:335
@ AD469x_advanced_seq
Definition: ad469x.h:174
int32_t axi_clkgen_init(struct axi_clkgen **clk, const struct axi_clkgen_init *init)
axi_clkgen_init
Definition: clk_axi_clkgen.c:520
#define AD469x_REG_IF_CONFIG_C_MB_STRICT(x)
Definition: ad469x.h:141
Definition: clk_axi_clkgen.h:44
int32_t ad469x_set_reference(struct ad469x_dev *device, enum ad469x_ref_set ref_set)
Set the value of reference.
Definition: ad469x.c:903
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
int32_t ad469x_std_sequence_ch(struct ad469x_dev *dev, uint16_t ch_mask)
Configure standard sequencer channels.
Definition: ad469x.c:557
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
enum ad469x_supported_dev_ids dev_id
Definition: ad469x.h:280
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:385
#define AD469x_CMD_CONFIG_CH_SEL(x)
Definition: ad469x.h:101
int32_t ad469x_spi_reg_read(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Definition: ad469x.c:87
struct no_os_gpio_init_param * gpio_convst
Definition: ad469x.h:270
@ ID_AD4698
Definition: ad469x.h:205
int32_t ad469x_spi_read_mask(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t mask, uint8_t *data)
Definition: ad469x.c:169
#define WRITE_READ(no_bytes)
Definition: spi_engine.h:65
const uint8_t ad469x_device_resol[]
Device resolution.
Definition: ad469x.c:57
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
@ AD469x_AIN_HIGH_Z_DISABLE
Definition: ad469x.h:246
uint32_t reg_access_speed
Definition: ad7616.h:212
int32_t ad469x_get_reference(struct ad469x_dev *device, enum ad469x_ref_set *ref_set)
Get the value of reference.
Definition: ad469x.c:879
struct no_os_gpio_init_param * gpio_resetn
Definition: ad469x.h:268
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
@ AD469x_4P5_5P1
Definition: ad469x.h:238
#define AD469x_SEQ_CTRL_NUM_SLOTS_AS(x)
Definition: ad469x.h:130
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:357
@ AD469x_3P75_4P5
Definition: ad469x.h:237
#define CS_HIGH
Definition: spi_engine.h:72
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
#define AD469x_SETUP_CYC_CTRL_MASK
Definition: ad469x.h:109
@ AD469x_busy_gp3
Definition: ad469x.h:185
#define AD469x_REG_CONFIG_IN_HIZ_EN_MASK
Definition: ad469x.h:146
enum ad469x_supported_dev_ids dev_id
Definition: ad469x.h:323
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:793
int32_t no_os_pwm_enable(struct no_os_pwm_desc *desc)
Enable PWM signal generation.
Definition: no_os_pwm.c:98
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:507
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:52
#define AD469x_REG_GP_MODE
Definition: ad469x.h:87
#define AD469x_REG_TEMP_CTRL_TEMP_EN(x)
Definition: ad469x.h:134
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
bool ad469x_is_temp_channel(struct ad469x_dev *dev, uint8_t channel)
Definition: ad469x.c:279
#define AD469x_REG_REF_CTRL
Definition: ad469x.h:82
struct spi_engine_offload_init_param * offload_init_param
Definition: ad7616.h:205
uint8_t reg_data_width
Definition: ad469x.h:276
#define AD469x_CMD_SEL_TEMP_SNSOR_CH
Definition: ad469x.h:100
struct no_os_pwm_init_param * trigger_pwm_init
Definition: ad7616.h:207
int32_t no_os_pwm_disable(struct no_os_pwm_desc *desc)
Disable PWM signal generation.
Definition: no_os_pwm.c:115
int32_t ad469x_set_channel_sequence(struct ad469x_dev *dev, enum ad469x_channel_sequencing seq)
Set channel sequence.
Definition: ad469x.c:402
ad469x_reg_access
Register access modes.
Definition: ad469x.h:192
#define AD469x_REG_CONFIG_IN(x)
Definition: ad469x.h:90
@ AD469x_AIN_HIGH_Z_ENABLE
Definition: ad469x.h:247
bool enable_extended_init
Definition: ad469x.h:298
uint8_t capture_data_width
Definition: ad469x.h:321
@ ID_AD4695
Definition: ad469x.h:202
ad469x_busy_gp_sel
Busy state, possible general purpose pin selections.
Definition: ad469x.h:181
@ AD469x_single_cycle
Definition: ad469x.h:168
enum ad469x_osr_ratios std_seq_osr
Definition: ad469x.h:338
int32_t ad469x_spi_write_mask(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t mask, uint8_t data)
Definition: ad469x.c:194
struct spi_engine_offload_init_param * offload_init_param
Definition: ad469x.h:314
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:628
uint8_t num_slots
Definition: ad469x.h:347
#define AD469x_SETUP_IF_MODE_CONV
Definition: ad469x.h:108
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:300
#define AD469x_GP_MODE_BUSY_GP_SEL(x)
Definition: ad469x.h:124
unsigned int no_os_hweight16(uint16_t word)
ad469x_ref_set
Reference input range control.
Definition: ad469x.h:233
Header file for ad469x Driver.
#define AD469x_REG_SEQ_CTRL
Definition: ad469x.h:83
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
#define AD469x_REG_CONFIG_IN_MODE_MASK
Definition: ad469x.h:150
#define AD469x_REG_STD_SEQ_CONFIG
Definition: ad469x.h:85
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
#define AD469x_REG_IF_CONFIG_C_MB_STRICT_MASK
Definition: ad469x.h:140
num_channels
Definition: ad3552r.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:535
struct ad469x_device_info dev_info[]
Definition: ad469x.c:69
#define AD469x_REG_TEMP_CTRL
Definition: ad469x.h:89
#define AD469x_REG_AS_SLOT_INX(x)
Definition: ad469x.h:137
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
enum ad469x_pin_pairing std_seq_pin_pairing
Definition: ad469x.h:282
int32_t ad469x_config(struct ad469x_dev *dev, struct ad469x_init_param *config_desc)
Definition: ad469x.c:919
#define AD469x_SEQ_CTRL_STD_SEQ_EN_MASK
Definition: ad469x.h:127
int32_t ad469x_remove(struct ad469x_dev *dev)
Free the memory allocated by ad469x_init().
Definition: ad469x.c:1194
uint32_t * commands
Definition: spi_engine.h:163
Structure representing an PWM generator device.
Definition: no_os_pwm.h:93
Structure representing an ad469x device.
Definition: ad469x.h:305
int32_t ad469x_init(struct ad469x_dev **device, struct ad469x_init_param *init_param)
Definition: ad469x.c:1065
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
#define AD469x_REG_CONFIG_IN_OSR(x)
Definition: ad469x.h:145
void(* dcache_invalidate_range)(uint32_t address, uint32_t bytes_count)
Definition: ad7616.h:230
uint32_t axi_clkgen_rate
Definition: ad7616.h:211
uint8_t max_data_ch
Definition: ad469x.c:65
@ AD469x_INx_REF_GND
Definition: ad469x.h:224
#define AD469x_SLOTS_NO
Definition: ad469x.h:157
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
@ AD469x_OSR_64
Definition: ad469x.h:216
#define AD469x_REG_SCRATCH_PAD
Definition: ad469x.h:68
struct no_os_gpio_desc * gpio_busy
Definition: ad469x.h:329
Header file of PWM Interface.
@ AD469x_BYTE_ACCESS
Definition: ad469x.h:193
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:357
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:584
@ AD469x_OSR_16
Definition: ad469x.h:215
ad469x_osr_ratios
Supported oversampling ratios.
Definition: ad469x.h:212
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
@ AD469x_2P75_3P25
Definition: ad469x.h:235
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 AD469x_REG_IF_CONFIG_C
Definition: ad469x.h:72
@ AD469x_busy_gp0
Definition: ad469x.h:183
int32_t ad469x_spi_reg_read(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Definition: ad469x.c:87
#define AD469x_REG_CONFIG_IN_HIZ_EN(x)
Definition: ad469x.h:147
bool ad469x_is_temp_channel(struct ad469x_dev *dev, uint8_t channel)
Definition: ad469x.c:279
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:385
@ AD469x_OSR_4
Definition: ad469x.h:214
#define AD469x_REG_REF_VREF_SET_MASK
Definition: ad469x.h:113
@ AD469x_OSR_1
Definition: ad469x.h:213
int32_t ad469x_spi_reg_write(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Definition: ad469x.c:128
#define AD469x_GP_MODE_BUSY_GP_EN(x)
Definition: ad469x.h:122
struct no_os_gpio_desc * gpio_convst
Definition: ad469x.h:327
uint8_t num_data_ch
Definition: ad469x.h:294
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
struct axi_clkgen_init * clkgen_init
Definition: ad7616.h:209
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:759
@ AD469x_2P4_2P75
Definition: ad469x.h:234
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:535
#define AD469x_SETUP_CYC_CTRL_SINGLE(x)
Definition: ad469x.h:110
struct no_os_spi_desc * spi_desc
Definition: ad469x.h:307
uint8_t num_data_ch
Definition: ad469x.h:349
@ AD469x_WORD_ACCESS
Definition: ad469x.h:194
#define AD469x_CMD_REG_CONFIG_MODE
Definition: ad469x.h:99
#define AD469x_SETUP_IF_MODE_MASK
Definition: ad469x.h:107
struct axi_clkgen_init * clkgen_init
Definition: ad469x.h:263
uint8_t capture_data_width
Definition: ad469x.h:278
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
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
#define AD469x_REG_AS_SLOT(x)
Definition: ad469x.h:96
Structure containing the init parameters needed by the offload module.
Definition: spi_engine.h:143
Header file of GPIO Interface.
int32_t ad469x_config(struct ad469x_dev *dev, struct ad469x_init_param *config_desc)
Definition: ad469x.c:919
#define AD469x_CHANNEL_NO
Definition: ad469x.h:156
uint32_t max_speed_hz
Definition: no_os_spi.h:198
struct no_os_gpio_init_param * gpio_busy
Definition: ad469x.h:272
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
int32_t ad469x_get_num_channels(struct ad469x_dev *dev, uint8_t *num_channels)
Definition: ad469x.c:266
enum ad469x_osr_ratios std_seq_osr
Definition: ad469x.h:287
#define AD469x_REG_STATUS_RESET_MASK
Definition: ad469x.h:104
int32_t axi_clkgen_remove(struct axi_clkgen *clkgen)
axi_clkgen_remove
Definition: clk_axi_clkgen.c:541
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:128
uint32_t max_rate_ksps
Definition: ad469x.c:66
enum ad469x_osr_ratios adv_seq_osr_resol[AD469x_CHANNEL_NO]
Definition: ad469x.h:290
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:1024
uint32_t rx_addr
Definition: spi_engine.h:171
@ AD469x_INx_EVEN_ODD
Definition: ad469x.h:226
#define AD469x_SEQ_CTRL_NUM_SLOTS_AS_MASK
Definition: ad469x.h:129
int32_t ad469x_spi_read_mask(struct ad469x_dev *dev, uint16_t reg_addr, uint8_t mask, uint8_t *data)
Definition: ad469x.c:169
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 ad469x_exit_conversion_mode(struct ad469x_dev *dev)
Exit conversion mode. Enter register mode to read/write registers.
Definition: ad469x.c:673
struct spi_engine_offload_init_param * offload_init_param
Definition: ad469x.h:259
uint8_t ch_slots[AD469x_SLOTS_NO]
Definition: ad469x.h:343
Structure containing the init parameters needed by the ad469x device.
Definition: ad469x.h:254
@ AD469x_standard_seq
Definition: ad469x.h:172
bool temp_enabled
Definition: ad469x.h:345
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:1040
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:759
#define AD469x_REG_STATUS
Definition: ad469x.h:74
#define AD469x_REG_SETUP
Definition: ad469x.h:81
uint8_t reg_data_width
Definition: ad469x.h:319
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