39#define AD9467_READ (1 << 15)
40#define AD9467_WRITE (0 << 15)
41#define AD9467_CNT(x) (((x) - 1) << 13)
42#define AD9467_ADDR(x) ((x) & 0X1FFF)
45#define AD9467_REG_CHIP_PORT_CFG 0x00
46#define AD9467_REG_CHIP_ID 0x01
47#define AD9467_REG_CHIP_GRADE 0x02
50#define AD9467_REG_DEVICE_UPDATE 0xFF
53#define AD9467_REG_MODES 0x08
54#define AD9467_REG_TEST_IO 0x0D
55#define AD9467_REG_ADC_INPUT 0x0F
56#define AD9467_REG_OFFSET 0x10
57#define AD9467_REG_OUT_MODE 0x14
58#define AD9467_REG_OUT_ADJ 0x15
59#define AD9467_REG_OUT_PHASE 0x16
60#define AD9467_REG_OUT_DELAY 0x17
61#define AD9467_REG_V_REF 0x18
62#define AD9467_REG_ANALOG_INPUT 0x2C
63#define AD9467_REG_BUFF_CURRENT_1 0x36
64#define AD9467_REG_BUFF_CURRENT_2 0x107
67#define AD9467_CHIP_PORT_CGF_LSB_FIRST (1 << 6)
68#define AD9467_CHIP_PORT_CGF_SOFT_RST (1 << 5)
71#define AD9467_CHIP_GRADE_BITS(x) (((x) & 0x3) << 4)
74#define AD9467_DEVICE_UPDATE_SW (1 << 0)
77#define AD9467_MODES_INT_PD_MODE(x) (((x) & 0x3) << 0)
80#define AD9467_TEST_IO_RST_PN_LONG (1 << 5)
81#define AD9467_TEST_IO_RST_PN_SHORT (1 << 4)
82#define AD9467_TEST_IO_OUT_TEST(x) (((x) & 0xF) << 0)
85#define AD9467_ADC_INPUT_XVREF (1 << 7)
86#define AD9467_ADC_INPUT_ANALOG_DSCN (1 << 2)
89#define AD9467_OUT_MODE_DOUT_DISBL (1 << 4)
90#define AD9467_OUT_MODE_OUT_INV (1 << 2)
91#define AD9467_OUT_MODE_DATA_FORMAT(x) (((x) & 0x3) << 0)
94#define AD9467_OUT_ADJ_LVDS (1 << 3)
95#define AD9467_OUT_ADJ_OUT_CURRENT(x) (((x) & 0x7) << 0)
98#define AD9467_OUT_PHASE_DCO_INV (1 << 7)
101#define AD9467_OUT_DELAY_DCO_DLY_EN (1 << 7)
102#define AD9467_OUT_DELAY_OUT_DLY(x) (((x) & 0x1F) << 0)
105#define AD9467_V_REF_IN_FS_RANGE(x) (((x) & 0xF) << 0)
108#define AD9467_ANALOG_INPUT_COUPLING (1 << 2)
111#define AD9467_BUFF_CURRENT_1(x) (((x) & 0x3F) << 2)
114#define AD9467_BUFF_CURRENT_2(x) (((x) & 0x3F) << 2)
142 uint16_t register_address,
208 int32_t coupling_mode,
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
int32_t ad9467_analog_input_disconnect(struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
Disconnects (1) or connects (0) the analog input from or to the the ADC channel.
Definition ad9467.c:394
int32_t ad9467_remove(struct ad9467_dev *dev)
Free the resources allocated by ad9467_setup().
Definition ad9467.c:85
int32_t ad9467_read(struct ad9467_dev *dev, uint16_t reg_addr, uint8_t *reg_val)
Reads data from a register.
Definition ad9467.c:132
int32_t ad9467_test_mode(struct ad9467_dev *dev, int32_t mode, int32_t *ret_mode)
Sets the ADC's test mode.
Definition ad9467.c:238
int32_t ad9467_external_ref(struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
Enables (1) or disables (0) the external voltage reference.
Definition ad9467.c:355
int32_t ad9467_full_scale_range(struct ad9467_dev *dev, float v_fs, float *ret_stat)
Configures the full-scale input voltage selection.
Definition ad9467.c:749
int32_t ad9467_output_disable(struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
Disables (1) or enables (0) the data output.
Definition ad9467.c:462
int32_t ad9467_coarse_lvds_adj(struct ad9467_dev *dev, int32_t lvds_adj, int32_t *ret_stat)
Determines LVDS output properties.
Definition ad9467.c:578
int32_t ad9467_buffer_current_1(struct ad9467_dev *dev, int32_t percentage, int32_t *ret_stat)
Changes the input buffer current(1).
Definition ad9467.c:847
int32_t ad9467_dco_output_clock_delay(struct ad9467_dev *dev, int32_t delay, int32_t *ret_stat)
Configures the clock delay setting.
Definition ad9467.c:696
int32_t ad9467_output_invert(struct ad9467_dev *dev, int32_t invert, int32_t *ret_stat)
Activates the inverted (1) or normal (0) output mode.
Definition ad9467.c:500
int32_t ad9467_pwr_mode(struct ad9467_dev *dev, int32_t mode, int32_t *ret_mode)
Configures the power mode.
Definition ad9467.c:194
int32_t ad9467_output_current_adj(struct ad9467_dev *dev, int32_t adj, int32_t *ret_stat)
Sets the output current adjustment.
Definition ad9467.c:621
int32_t ad9467_analog_input_coupling(struct ad9467_dev *dev, int32_t coupling_mode, int32_t *ret_stat)
Sets the AC coupling(0) or DC coupling(1) mode.
Definition ad9467.c:797
int32_t ad9467_output_format(struct ad9467_dev *dev, int32_t format, int32_t *ret_stat)
Specifies the output format.
Definition ad9467.c:540
int32_t ad9467_write(struct ad9467_dev *dev, uint16_t reg_addr, uint8_t reg_val)
Writes data into a register.
Definition ad9467.c:105
int32_t ad9467_reset_pn23(struct ad9467_dev *dev, int32_t rst, int32_t *ret_stat)
Sets (1) or clears (0) the reset long PN sequence bit(PN23).
Definition ad9467.c:316
uint32_t ad9467_set_bits_to_reg(struct ad9467_dev *dev, uint16_t register_address, uint8_t bits_value, uint8_t mask)
Sets a bit or a group of bits inside a register without modifying the other bits.
Definition ad9467.c:163
int32_t ad9467_buffer_current_2(struct ad9467_dev *dev, int32_t percentage, int32_t *ret_stat)
Changes the input buffer current(2).
Definition ad9467.c:900
int32_t ad9467_dco_clock_invert(struct ad9467_dev *dev, int32_t invert, int32_t *ret_stat)
Activates the normal (0) or inverted (1) DCO clock.
Definition ad9467.c:659
int32_t ad9467_reset_pn9(struct ad9467_dev *dev, int32_t rst, int32_t *ret_stat)
Sets (1) or clears (0) the reset short PN sequence bit(PN9).
Definition ad9467.c:277
int32_t ad9467_setup(struct ad9467_dev **device, struct ad9467_init_param init_param)
Configures the test mode and the output mode to a default state.
Definition ad9467.c:47
int32_t ad9467_offset_adj(struct ad9467_dev *dev, int32_t adj, int32_t *ret_stat)
Sets the offset adjustment.
Definition ad9467.c:430
int32_t ad9467_transfer(struct ad9467_dev *dev)
Initiates a transfer and waits for the operation to end.
Definition ad9467.c:937
Header file of SPI Interface.
struct no_os_spi_desc * spi_desc
Definition ad9467.h:118
struct no_os_spi_init_param spi_init
Definition ad9467.h:123
Definition ad9361_util.h:63
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128
enum no_os_spi_mode mode
Definition no_os_spi.h:136