no-OS
axi_adc_core.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef AXI_ADC_CORE_H_
40 #define AXI_ADC_CORE_H_
41 
42 /******************************************************************************/
43 /***************************** Include Files **********************************/
44 /******************************************************************************/
45 #include <stdint.h>
46 #include "no_os_util.h"
47 
48 /******************************************************************************/
49 /********************** Macros and Constants Definitions **********************/
50 /******************************************************************************/
51 #define AXI_ADC_REG_RSTN 0x0040
52 #define AXI_ADC_MMCM_RSTN NO_OS_BIT(1)
53 #define AXI_ADC_RSTN NO_OS_BIT(0)
54 
55 #define AXI_ADC_REG_CNTRL 0x0044
56 #define AXI_ADC_R1_MODE NO_OS_BIT(2)
57 #define AXI_ADC_DDR_EDGESEL NO_OS_BIT(1)
58 #define AXI_ADC_PIN_MODE NO_OS_BIT(0)
59 
60 #define AXI_ADC_REG_CLK_FREQ 0x0054
61 #define AXI_ADC_CLK_FREQ(x) (((x) & 0xFFFFFFFF) << 0)
62 #define AXI_ADC_TO_CLK_FREQ(x) (((x) >> 0) & 0xFFFFFFFF)
63 
64 #define AXI_ADC_REG_CLK_RATIO 0x0058
65 #define AXI_ADC_CLK_RATIO(x) (((x) & 0xFFFFFFFF) << 0)
66 #define AXI_ADC_TO_CLK_RATIO(x) (((x) >> 0) & 0xFFFFFFFF)
67 
68 #define AXI_ADC_REG_STATUS 0x005C
69 #define AXI_ADC_MUX_PN_ERR NO_OS_BIT(3)
70 #define AXI_ADC_MUX_PN_OOS NO_OS_BIT(2)
71 #define AXI_ADC_MUX_OVER_RANGE NO_OS_BIT(1)
72 #define AXI_ADC_STATUS NO_OS_BIT(0)
73 
74 #define AXI_ADC_REG_DELAY_CNTRL 0x0060
75 #define ADC_DELAY_SEL NO_OS_BIT(17)
76 #define ADC_DELAY_RWN NO_OS_BIT(16)
77 #define ADC_DELAY_ADDRESS(x) (((x) & 0xFF) << 8)
78 #define ADC_TO_DELAY_ADDRESS(x) (((x) >> 8) & 0xFF)
79 #define ADC_DELAY_WDATA(x) (((x) & 0x1F) << 0)
80 #define ADC_TO_DELAY_WDATA(x) (((x) >> 0) & 0x1F)
81 
82 #define AXI_ADC_REG_CHAN_CNTRL(c) (0x0400 + (c) * 0x40)
83 #define AXI_ADC_PN_SEL NO_OS_BIT(10)
84 #define AXI_ADC_IQCOR_ENB NO_OS_BIT(9)
85 #define AXI_ADC_DCFILT_ENB NO_OS_BIT(8)
86 #define AXI_ADC_FORMAT_SIGNEXT NO_OS_BIT(6)
87 #define AXI_ADC_FORMAT_TYPE NO_OS_BIT(5)
88 #define AXI_ADC_FORMAT_ENABLE NO_OS_BIT(4)
89 #define AXI_ADC_PN23_TYPE NO_OS_BIT(1)
90 #define AXI_ADC_ENABLE NO_OS_BIT(0)
91 
92 #define AXI_ADC_REG_CHAN_STATUS(c) (0x0404 + (c) * 0x40)
93 #define AXI_ADC_PN_ERR NO_OS_BIT(2)
94 #define AXI_ADC_PN_OOS NO_OS_BIT(1)
95 #define AXI_ADC_OVER_RANGE NO_OS_BIT(0)
96 
97 #define AXI_ADC_REG_CHAN_CNTRL_1(c) (0x0410 + (c) * 0x40)
98 #define AXI_ADC_DCFILT_OFFSET(x) (((x) & 0xFFFF) << 16)
99 #define AXI_ADC_TO_DCFILT_OFFSET(x) (((x) >> 16) & 0xFFFF)
100 #define AXI_ADC_DCFILT_COEFF(x) (((x) & 0xFFFF) << 0)
101 #define AXI_ADC_TO_DCFILT_COEFF(x) (((x) >> 0) & 0xFFFF)
102 
103 #define AXI_ADC_REG_CHAN_CNTRL_2(c) (0x0414 + (c) * 0x40)
104 #define AXI_ADC_IQCOR_COEFF_1(x) (((x) & 0xFFFF) << 16)
105 #define AXI_ADC_TO_IQCOR_COEFF_1(x) (((x) >> 16) & 0xFFFF)
106 #define AXI_ADC_IQCOR_COEFF_2(x) (((x) & 0xFFFF) << 0)
107 #define AXI_ADC_TO_IQCOR_COEFF_2(x) (((x) >> 0) & 0xFFFF)
108 
109 #define AXI_ADC_REG_CHAN_CNTRL_3(c) (0x0418 + (c) * 0x40)
110 #define AXI_ADC_ADC_PN_SEL(x) (((x) & 0xF) << 16)
111 #define AXI_ADC_TO_ADC_PN_SEL(x) (((x) >> 16) & 0xF)
112 #define AXI_ADC_ADC_DATA_SEL(x) (((x) & 0xF) << 0)
113 #define AXI_ADC_TO_ADC_DATA_SEL(x) (((x) >> 0) & 0xF)
114 
115 #define AXI_ADC_REG_DELAY(l) (0x0800 + (l) * 0x4)
116 
117 /******************************************************************************/
118 /*************************** Types Declarations *******************************/
119 /******************************************************************************/
120 
125 struct axi_adc {
127  const char *name;
129  uint32_t base;
131  uint8_t num_channels;
133  uint64_t clock_hz;
135  uint32_t mask;
136 };
137 
142 struct axi_adc_init {
144  const char *name;
146  uint32_t base;
148  uint8_t num_channels;
149 };
150 
162 };
163 
164 /******************************************************************************/
165 /************************ Functions Declarations ******************************/
166 /******************************************************************************/
168 int32_t axi_adc_init_begin(struct axi_adc **adc_core,
169  const struct axi_adc_init *init);
171 int32_t axi_adc_init_finish(struct axi_adc *adc);
173 int32_t axi_adc_init(struct axi_adc **adc_core,
174  const struct axi_adc_init *init);
176 int32_t axi_adc_remove(struct axi_adc *adc);
178 int32_t axi_adc_read(struct axi_adc *adc,
179  uint32_t reg_addr,
180  uint32_t *reg_data);
182 int32_t axi_adc_write(struct axi_adc *adc,
183  uint32_t reg_addr,
184  uint32_t reg_data);
186 int32_t axi_adc_set_pnsel(struct axi_adc *adc,
187  uint32_t chan,
188  enum axi_adc_pn_sel sel);
190 int32_t axi_adc_pn_mon(struct axi_adc *adc,
191  enum axi_adc_pn_sel sel,
192  uint32_t delay_ms);
194 int32_t axi_adc_get_sampling_freq(struct axi_adc *adc,
195  uint32_t chan,
196  uint64_t *sampling_freq);
198 void axi_adc_idelay_set(struct axi_adc *adc,
199  uint32_t lane,
200  uint32_t val);
202 int32_t axi_adc_delay_set(struct axi_adc *adc,
203  uint32_t no_of_lanes,
204  uint32_t delay);
206 int32_t axi_adc_delay_calibrate(struct axi_adc *core,
207  uint32_t no_of_lanes,
208  enum axi_adc_pn_sel sel);
210 int32_t axi_adc_set_calib_phase(struct axi_adc *adc,
211  uint32_t chan,
212  int32_t val,
213  int32_t val2);
215 int32_t axi_adc_get_calib_phase(struct axi_adc *adc,
216  uint32_t chan,
217  int32_t *val,
218  int32_t *val2);
220 int32_t axi_adc_set_calib_scale(struct axi_adc *adc,
221  uint32_t chan,
222  int32_t val,
223  int32_t val2);
225 int32_t axi_adc_get_calib_scale(struct axi_adc *adc,
226  uint32_t chan,
227  int32_t *val,
228  int32_t *val2);
230 int32_t axi_adc_set_calib_bias(struct axi_adc *adc,
231  uint32_t chan,
232  int32_t val,
233  int32_t val2);
235 int32_t axi_adc_get_calib_bias(struct axi_adc *adc,
236  uint32_t chan,
237  int32_t *val,
238  int32_t *val2);
240 int32_t axi_adc_update_active_channels(struct axi_adc *adc, uint32_t mask);
241 #endif
axi_adc_core.h
Driver for the Analog Devices AXI-ADC-CORE module.
no_os_gpio_platform_ops::gpio_ops_direction_input
int32_t(* gpio_ops_direction_input)(struct no_os_gpio_desc *)
Definition: no_os_gpio.h:143
axi_adc_read
int32_t axi_adc_read(struct axi_adc *adc, uint32_t reg_addr, uint32_t *reg_data)
AXI ADC Data read.
Definition: axi_adc_core.c:59
AXI_ADC_PN_END
@ AXI_ADC_PN_END
Definition: axi_adc_core.h:161
axi_adc_delay_calibrate
int32_t axi_adc_delay_calibrate(struct axi_adc *core, uint32_t no_of_lanes, enum axi_adc_pn_sel sel)
Calibrate Delay using specific PN sequence.
Definition: axi_adc_core.c:218
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
no_os_spi_transfer
int32_t no_os_spi_transfer(struct no_os_spi_desc *desc, struct no_os_spi_msg *msgs, uint32_t len)
Iterate over head list and send all spi messages.
Definition: no_os_spi.c:96
no_os_gpio_platform_ops::gpio_ops_get_value
int32_t(* gpio_ops_get_value)(struct no_os_gpio_desc *, uint8_t *)
Definition: no_os_gpio.h:151
no_os_i2c_platform_ops::i2c_ops_read
int32_t(* i2c_ops_read)(struct no_os_i2c_desc *, uint8_t *, uint8_t, uint8_t)
Definition: no_os_i2c.h:106
axi_adc_update_active_channels
int32_t axi_adc_update_active_channels(struct axi_adc *adc, uint32_t mask)
Update active AXI ADC channels.
Definition: axi_adc_core.c:515
axi_adc_set_pnsel
int32_t axi_adc_set_pnsel(struct axi_adc *adc, uint32_t chan, enum axi_adc_pn_sel sel)
Set AXI ADC PN sequence.
Definition: axi_adc_core.c:91
axi_adc_set_calib_phase
int32_t axi_adc_set_calib_phase(struct axi_adc *adc, uint32_t chan, int32_t val, int32_t val2)
Calibrate phase for specific AXI ADC channel.
Definition: axi_adc_core.c:409
sampling_freq
uint64_t sampling_freq
Definition: headless.c:78
no_os_callback_desc
Structure describing a callback to be registered.
Definition: no_os_irq.h:134
no_os_spi.h
Header file of SPI Interface.
no_os_irq.h
Header file of IRQ interface.
axi_adc_init
AXI ADC Initialization Parameters structure.
Definition: axi_adc_core.h:142
axi_adc_write
int32_t axi_adc_write(struct axi_adc *adc, uint32_t reg_addr, uint32_t reg_data)
AXI ADC Data Write.
Definition: axi_adc_core.c:75
AXI_ADC_RSTN
#define AXI_ADC_RSTN
Definition: axi_adc_core.h:53
no_os_i2c_platform_ops::i2c_ops_write
int32_t(* i2c_ops_write)(struct no_os_i2c_desc *, uint8_t *, uint8_t, uint8_t)
Definition: no_os_i2c.h:104
no_os_spi_msg
Definition: no_os_spi.h:90
NO_OS_IS_ERR_VALUE
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:56
no_os_delay.h
Header file of Delay functions.
no_os_i2c_write
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Write data to slave device.
Definition: no_os_i2c.c:85
no_os_irq_unregister_callback
int32_t no_os_irq_unregister_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback)
Unregisters a generic IRQ handling function.
Definition: no_os_irq.c:96
no_os_i2c_init
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: no_os_i2c.c:51
axi_adc
AXI ADC Device Descriptor.
Definition: axi_adc_core.h:125
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
axi_adc_init_begin
int32_t axi_adc_init_begin(struct axi_adc **adc_core, const struct axi_adc_init *init)
Begin AXI ADC Initialization.
Definition: axi_adc_core.c:544
AXI_ADC_REG_STATUS
#define AXI_ADC_REG_STATUS
Definition: axi_adc_core.h:68
no_os_irq_enable
int32_t no_os_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: no_os_irq.c:144
AXI_ADC_PN_RAMP_16
@ AXI_ADC_PN_RAMP_16
Definition: axi_adc_core.h:160
no_os_gpio_init_param::number
int32_t number
Definition: no_os_gpio.h:89
axi_adc::name
const char * name
Definition: axi_adc_core.h:127
AXI_ADC_ENABLE
#define AXI_ADC_ENABLE
Definition: axi_adc_core.h:90
no_os_irq_platform_ops::init
int32_t(* init)(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Definition: no_os_irq.h:164
AXI_ADC_TO_IQCOR_COEFF_1
#define AXI_ADC_TO_IQCOR_COEFF_1(x)
Definition: axi_adc_core.h:105
no_os_axi_io.h
Header file of AXI IO.
AXI_ADC_REG_CLK_RATIO
#define AXI_ADC_REG_CLK_RATIO
Definition: axi_adc_core.h:64
axi_adc_get_calib_phase_scale
int32_t axi_adc_get_calib_phase_scale(struct axi_adc *adc, uint32_t phase, uint32_t chan, int32_t *val, int32_t *val2)
Get the phase calibration values for AXI ADC channel.
Definition: axi_adc_core.c:361
axi_adc_init::base
uint32_t base
Definition: axi_adc_core.h:146
axi_adc_delay_set
int32_t axi_adc_delay_set(struct axi_adc *adc, uint32_t no_of_lanes, uint32_t delay)
Set input/output delay primitive for number of lines.
Definition: axi_adc_core.c:183
no_os_spi_init_param::platform_ops
const struct no_os_spi_platform_ops * platform_ops
Definition: no_os_spi.h:123
AXI_ADC_REG_DELAY
#define AXI_ADC_REG_DELAY(l)
Definition: axi_adc_core.h:115
axi_adc_init
int32_t axi_adc_init(struct axi_adc **adc_core, const struct axi_adc_init *init)
AXI ADC Main Initialization.
Definition: axi_adc_core.c:596
AXI_ADC_REG_RSTN
#define AXI_ADC_REG_RSTN
Definition: axi_adc_core.h:51
no_os_gpio_init_param::platform_ops
const struct no_os_gpio_platform_ops * platform_ops
Definition: no_os_gpio.h:93
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:95
axi_adc_set_calib_phase
int32_t axi_adc_set_calib_phase(struct axi_adc *adc, uint32_t chan, int32_t val, int32_t val2)
Calibrate phase for specific AXI ADC channel.
Definition: axi_adc_core.c:409
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:124
no_os_do_div
uint64_t no_os_do_div(uint64_t *n, uint64_t base)
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: delay.c:130
axi_adc_get_sampling_freq
int32_t axi_adc_get_sampling_freq(struct axi_adc *adc, uint32_t chan, uint64_t *sampling_freq)
Get the AXI ADC Sampling Frequency.
Definition: axi_adc_core.c:147
axi_adc_remove
int32_t axi_adc_remove(struct axi_adc *adc)
AXI ADC Resources deallocation.
Definition: axi_adc_core.c:636
axi_adc::num_channels
uint8_t num_channels
Definition: axi_adc_core.h:131
AXI_ADC_IQCOR_COEFF_2
#define AXI_ADC_IQCOR_COEFF_2(x)
Definition: axi_adc_core.h:106
no_os_error.h
Error codes definition.
axi_adc_write
int32_t axi_adc_write(struct axi_adc *adc, uint32_t reg_addr, uint32_t reg_data)
AXI ADC Data Write.
Definition: axi_adc_core.c:75
no_os_gpio_desc::platform_ops
const struct no_os_gpio_platform_ops * platform_ops
Definition: no_os_gpio.h:110
AXI_ADC_IQCOR_COEFF_1
#define AXI_ADC_IQCOR_COEFF_1(x)
Definition: axi_adc_core.h:104
AXI_ADC_REG_CHAN_CNTRL_3
#define AXI_ADC_REG_CHAN_CNTRL_3(c)
Definition: axi_adc_core.h:109
no_os_i2c_read
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Read data from slave device.
Definition: no_os_i2c.c:104
axi_adc_get_calib_scale
int32_t axi_adc_get_calib_scale(struct axi_adc *adc, uint32_t chan, int32_t *val, int32_t *val2)
Get the scale calibration values for AXI ADC channel.
Definition: axi_adc_core.c:457
axi_adc_idelay_set
void axi_adc_idelay_set(struct axi_adc *adc, uint32_t lane, uint32_t val)
Set input/output delay primitive for specific interface line.
Definition: axi_adc_core.c:168
axi_adc_read
int32_t axi_adc_read(struct axi_adc *adc, uint32_t reg_addr, uint32_t *reg_data)
AXI ADC Data read.
Definition: axi_adc_core.c:59
AXI_ADC_TO_DCFILT_OFFSET
#define AXI_ADC_TO_DCFILT_OFFSET(x)
Definition: axi_adc_core.h:99
no_os_gpio_platform_ops::gpio_ops_remove
int32_t(* gpio_ops_remove)(struct no_os_gpio_desc *)
Definition: no_os_gpio.h:141
AXI_ADC_REG_CHAN_CNTRL_2
#define AXI_ADC_REG_CHAN_CNTRL_2(c)
Definition: axi_adc_core.h:103
axi_adc_get_calib_bias
int32_t axi_adc_get_calib_bias(struct axi_adc *adc, uint32_t chan, int32_t *val, int32_t *val2)
Get the scale calibration values for AXI ADC channel.
Definition: axi_adc_core.c:497
no_os_irq_platform_ops::global_disable
int32_t(* global_disable)(struct no_os_irq_ctrl_desc *desc)
Definition: no_os_irq.h:176
no_os_irq_trig_level
no_os_irq_trig_level
Definition: no_os_irq.h:76
axi_adc_init::num_channels
uint8_t num_channels
Definition: axi_adc_core.h:148
AXI_ADC_REG_CHAN_STATUS
#define AXI_ADC_REG_CHAN_STATUS(c)
Definition: axi_adc_core.h:92
no_os_irq_ctrl_desc::platform_ops
const struct no_os_irq_platform_ops * platform_ops
Definition: no_os_irq.h:121
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:82
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:108
no_os_irq_platform_ops::enable
int32_t(* enable)(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Definition: no_os_irq.h:181
no_os_irq_init_param::platform_ops
const struct no_os_irq_platform_ops * platform_ops
Definition: no_os_irq.h:105
axi_adc_init_finish
int32_t axi_adc_init_finish(struct axi_adc *adc)
Begin AXI ADC Initialization.
Definition: axi_adc_core.c:567
AXI_ADC_REG_CHAN_CNTRL
#define AXI_ADC_REG_CHAN_CNTRL(c)
Definition: axi_adc_core.h:82
no_os_spi_platform_ops::transfer
int32_t(* transfer)(struct no_os_spi_desc *, struct no_os_spi_msg *, uint32_t)
Definition: no_os_spi.h:159
irq_id
irq_id
Interrupts IDs supported by the irq driver.
Definition: irq_extra.h:71
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:132
no_os_i2c_platform_ops::i2c_ops_init
int32_t(* i2c_ops_init)(struct no_os_i2c_desc **, const struct no_os_i2c_init_param *)
Definition: no_os_i2c.h:101
no_os_i2c_desc::platform_ops
const struct no_os_i2c_platform_ops * platform_ops
Definition: no_os_i2c.h:89
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: axi_io.c:59
no_os_irq_register_callback
int32_t no_os_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback)
Register a callback to handle the irq events.
Definition: no_os_irq.c:82
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:177
axi_adc_get_calib_phase
int32_t axi_adc_get_calib_phase(struct axi_adc *adc, uint32_t chan, int32_t *val, int32_t *val2)
Get the phase calibration values for AXI ADC channel.
Definition: axi_adc_core.c:425
AXI_ADC_PN_CUSTOM
@ AXI_ADC_PN_CUSTOM
Definition: axi_adc_core.h:158
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
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:70
no_os_irq_ctrl_init
int32_t no_os_irq_ctrl_init(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Initialize the IRQ interrupts.
Definition: no_os_irq.c:51
AXI_ADC_FORMAT_ENABLE
#define AXI_ADC_FORMAT_ENABLE
Definition: axi_adc_core.h:88
no_os_i2c_desc
Structure holding I2C descriptor.
Definition: no_os_i2c.h:81
axi_adc_delay_calibrate
int32_t axi_adc_delay_calibrate(struct axi_adc *adc, uint32_t no_of_lanes, enum axi_adc_pn_sel sel)
Calibrate Delay using specific PN sequence.
Definition: axi_adc_core.c:218
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:51
axi_adc_pn_mon
int32_t axi_adc_pn_mon(struct axi_adc *adc, enum axi_adc_pn_sel sel, uint32_t delay_ms)
Monitor the AXI ADC PN Sequence.
Definition: axi_adc_core.c:112
axi_adc_get_calib_scale
int32_t axi_adc_get_calib_scale(struct axi_adc *adc, uint32_t chan, int32_t *val, int32_t *val2)
Get the scale calibration values for AXI ADC channel.
Definition: axi_adc_core.c:457
axi_adc_idelay_set
void axi_adc_idelay_set(struct axi_adc *adc, uint32_t lane, uint32_t val)
Set input/output delay primitive for specific interface line.
Definition: axi_adc_core.c:168
no_os_irq_platform_ops::remove
int32_t(* remove)(struct no_os_irq_ctrl_desc *desc)
Definition: no_os_irq.h:185
no_os_i2c.h
Header file of I2C Interface.
axi_adc_set_calib_bias
int32_t axi_adc_set_calib_bias(struct axi_adc *adc, uint32_t chan, int32_t val, int32_t val2)
Calibrate bias for specific AXI ADC channel.
Definition: axi_adc_core.c:473
AXI_ADC_PN7
@ AXI_ADC_PN7
Definition: axi_adc_core.h:154
axi_adc_update_active_channels
int32_t axi_adc_update_active_channels(struct axi_adc *adc, uint32_t mask)
Update active AXI ADC channels.
Definition: axi_adc_core.c:515
axi_adc_set_calib_scale
int32_t axi_adc_set_calib_scale(struct axi_adc *adc, uint32_t chan, int32_t val, int32_t val2)
Calibrate scale for specific AXI ADC channel.
Definition: axi_adc_core.c:441
AXI_ADC_REG_CLK_FREQ
#define AXI_ADC_REG_CLK_FREQ
Definition: axi_adc_core.h:60
axi_adc_set_pnsel
int32_t axi_adc_set_pnsel(struct axi_adc *adc, uint32_t chan, enum axi_adc_pn_sel sel)
Set AXI ADC PN sequence.
Definition: axi_adc_core.c:91
axi_adc_get_calib_bias
int32_t axi_adc_get_calib_bias(struct axi_adc *adc, uint32_t chan, int32_t *val, int32_t *val2)
Get the scale calibration values for AXI ADC channel.
Definition: axi_adc_core.c:497
no_os_spi_platform_ops::remove
int32_t(* remove)(struct no_os_spi_desc *)
Definition: no_os_spi.h:161
axi_adc::clock_hz
uint64_t clock_hz
Definition: axi_adc_core.h:133
no_os_i2c_platform_ops::i2c_ops_remove
int32_t(* i2c_ops_remove)(struct no_os_i2c_desc *)
Definition: no_os_i2c.h:108
AXI_ADC_PN23A
@ AXI_ADC_PN23A
Definition: axi_adc_core.h:153
AXI_ADC_PN15
@ AXI_ADC_PN15
Definition: axi_adc_core.h:155
axi_adc_init
int32_t axi_adc_init(struct axi_adc **adc_core, const struct axi_adc_init *init)
AXI ADC Main Initialization.
Definition: axi_adc_core.c:596
AXI_ADC_MMCM_RSTN
#define AXI_ADC_MMCM_RSTN
Definition: axi_adc_core.h:52
axi_adc_set_calib_phase_scale
int32_t axi_adc_set_calib_phase_scale(struct axi_adc *adc, uint32_t phase, uint32_t chan, int32_t val, int32_t val2)
Calibrate phase for specific AXI ADC channel.
Definition: axi_adc_core.c:305
AXI_ADC_DCFILT_OFFSET
#define AXI_ADC_DCFILT_OFFSET(x)
Definition: axi_adc_core.h:98
no_os_i2c_remove
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: no_os_i2c.c:70
no_os_i2c_init_param
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
NULL
#define NULL
Definition: wrapper.h:64
no_os_irq_platform_ops::global_enable
int32_t(* global_enable)(struct no_os_irq_ctrl_desc *desc)
Definition: no_os_irq.h:174
AXI_ADC_PN31
@ AXI_ADC_PN31
Definition: axi_adc_core.h:157
no_os_irq_ctrl_remove
int32_t no_os_irq_ctrl_remove(struct no_os_irq_ctrl_desc *desc)
Free the resources allocated by no_os_irq_ctrl_init().
Definition: no_os_irq.c:70
axi_adc_init_finish
int32_t axi_adc_init_finish(struct axi_adc *adc)
Begin AXI ADC Initialization.
Definition: axi_adc_core.c:567
no_os_irq_init_param
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:101
no_os_irq_platform_ops::unregister_callback
int32_t(* unregister_callback)(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback)
Definition: no_os_irq.h:170
axi_adc_remove
int32_t axi_adc_remove(struct axi_adc *adc)
AXI ADC Resources deallocation.
Definition: axi_adc_core.c:636
AXI_ADC_REG_CHAN_CNTRL_1
#define AXI_ADC_REG_CHAN_CNTRL_1(c)
Definition: axi_adc_core.h:97
axi_adc_get_calib_phase
int32_t axi_adc_get_calib_phase(struct axi_adc *adc, uint32_t chan, int32_t *val, int32_t *val2)
Get the phase calibration values for AXI ADC channel.
Definition: axi_adc_core.c:425
no_os_spi_platform_ops::write_and_read
int32_t(* write_and_read)(struct no_os_spi_desc *, uint8_t *, uint16_t)
Definition: no_os_spi.h:157
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: axi_io.c:73
axi_adc_init_begin
int32_t axi_adc_init_begin(struct axi_adc **adc_core, const struct axi_adc_init *init)
Begin AXI ADC Initialization.
Definition: axi_adc_core.c:544
no_os_spi_desc::platform_ops
const struct no_os_spi_platform_ops * platform_ops
Definition: no_os_spi.h:143
AXI_ADC_PN_RAMP_NIBBLE
@ AXI_ADC_PN_RAMP_NIBBLE
Definition: axi_adc_core.h:159
no_os_gpio.h
Header file of GPIO Interface.
no_os_irq_global_disable
int32_t no_os_irq_global_disable(struct no_os_irq_ctrl_desc *desc)
Disable global interrupts.
Definition: no_os_irq.c:116
no_os_i2c_init_param::platform_ops
const struct no_os_i2c_platform_ops * platform_ops
Definition: no_os_i2c.h:72
axi_adc::base
uint32_t base
Definition: axi_adc_core.h:129
no_os_irq_disable
int32_t no_os_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific interrupt.
Definition: no_os_irq.c:155
no_os_irq_platform_ops::disable
int32_t(* disable)(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Definition: no_os_irq.h:183
no_os_gpio_get
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:55
axi_adc_pn_mon
int32_t axi_adc_pn_mon(struct axi_adc *adc, enum axi_adc_pn_sel sel, uint32_t delay_ms)
Monitor the AXI ADC PN Sequence.
Definition: axi_adc_core.c:112
axi_adc_delay_set
int32_t axi_adc_delay_set(struct axi_adc *adc, uint32_t no_of_lanes, uint32_t delay)
Set input/output delay primitive for number of lines.
Definition: axi_adc_core.c:183
no_os_irq_platform_ops::trigger_level_set
int32_t(* trigger_level_set)(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level trig)
Definition: no_os_irq.h:178
no_os_util.h
Implementation of utility functions.
no_os_gpio_get_direction
int32_t no_os_gpio_get_direction(struct no_os_gpio_desc *desc, uint8_t *direction)
Get the direction of the specified GPIO.
Definition: no_os_gpio.c:142
axi_adc_set_calib_bias
int32_t axi_adc_set_calib_bias(struct axi_adc *adc, uint32_t chan, int32_t val, int32_t val2)
Calibrate bias for specific AXI ADC channel.
Definition: axi_adc_core.c:473
no_os_gpio_platform_ops::gpio_ops_get
int32_t(* gpio_ops_get)(struct no_os_gpio_desc **, const struct no_os_gpio_init_param *)
Definition: no_os_gpio.h:135
no_os_spi_platform_ops::init
int32_t(* init)(struct no_os_spi_desc **, const struct no_os_spi_init_param *)
Definition: no_os_spi.h:155
axi_adc_pn_sel
axi_adc_pn_sel
Definition: axi_adc_core.h:151
axi_adc_set_calib_scale
int32_t axi_adc_set_calib_scale(struct axi_adc *adc, uint32_t chan, int32_t val, int32_t val2)
Calibrate scale for specific AXI ADC channel.
Definition: axi_adc_core.c:441
axi_adc::mask
uint32_t mask
Definition: axi_adc_core.h:135
no_os_gpio_platform_ops::gpio_ops_get_optional
int32_t(* gpio_ops_get_optional)(struct no_os_gpio_desc **, const struct no_os_gpio_init_param *)
Definition: no_os_gpio.h:138
no_os_irq_ctrl_desc
Definition: no_os_irq.h:117
no_os_irq_platform_ops::register_callback
int32_t(* register_callback)(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback)
Definition: no_os_irq.h:167
AXI_ADC_FORMAT_SIGNEXT
#define AXI_ADC_FORMAT_SIGNEXT
Definition: axi_adc_core.h:86
AXI_ADC_ADC_PN_SEL
#define AXI_ADC_ADC_PN_SEL(x)
Definition: axi_adc_core.h:110
axi_adc_get_sampling_freq
int32_t axi_adc_get_sampling_freq(struct axi_adc *adc, uint32_t chan, uint64_t *sampling_freq)
Get the AXI ADC Sampling Frequency.
Definition: axi_adc_core.c:147
axi_adc_init::name
const char * name
Definition: axi_adc_core.h:144
no_os_irq_trigger_level_set
int32_t no_os_irq_trigger_level_set(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level trig)
Set interrupt trigger level.
Definition: no_os_irq.c:128
AXI_ADC_PN9
@ AXI_ADC_PN9
Definition: axi_adc_core.h:152
no_os_gpio_platform_ops::gpio_ops_set_value
int32_t(* gpio_ops_set_value)(struct no_os_gpio_desc *, uint8_t)
Definition: no_os_gpio.h:149
AXI_ADC_TO_IQCOR_COEFF_2
#define AXI_ADC_TO_IQCOR_COEFF_2(x)
Definition: axi_adc_core.h:107
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:112
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:160
no_os_irq_global_enable
int32_t no_os_irq_global_enable(struct no_os_irq_ctrl_desc *desc)
Enable global interrupts.
Definition: no_os_irq.c:107
AXI_ADC_PN23
@ AXI_ADC_PN23
Definition: axi_adc_core.h:156