no-OS
Classes | Macros | Enumerations | Functions
axi_adc_core.h File Reference

Driver for the Analog Devices AXI-ADC-CORE module. More...

#include <stdint.h>
#include "no_os_util.h"
Include dependency graph for axi_adc_core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  axi_adc
 AXI ADC Device Descriptor. More...
 
struct  axi_adc_init
 AXI ADC Initialization Parameters structure. More...
 

Macros

#define AXI_ADC_REG_RSTN   0x0040
 
#define AXI_ADC_MMCM_RSTN   NO_OS_BIT(1)
 
#define AXI_ADC_RSTN   NO_OS_BIT(0)
 
#define AXI_ADC_REG_CNTRL   0x0044
 
#define AXI_ADC_R1_MODE   NO_OS_BIT(2)
 
#define AXI_ADC_DDR_EDGESEL   NO_OS_BIT(1)
 
#define AXI_ADC_PIN_MODE   NO_OS_BIT(0)
 
#define AXI_ADC_REG_CNTRL_3   0x004C
 
#define AXI_ADC_CRC_EN   NO_OS_BIT(8)
 
#define AXI_ADC_REG_CLK_FREQ   0x0054
 
#define AXI_ADC_CLK_FREQ(x)   (((x) & 0xFFFFFFFF) << 0)
 
#define AXI_ADC_TO_CLK_FREQ(x)   (((x) >> 0) & 0xFFFFFFFF)
 
#define AXI_ADC_REG_CLK_RATIO   0x0058
 
#define AXI_ADC_CLK_RATIO(x)   (((x) & 0xFFFFFFFF) << 0)
 
#define AXI_ADC_TO_CLK_RATIO(x)   (((x) >> 0) & 0xFFFFFFFF)
 
#define AXI_ADC_REG_STATUS   0x005C
 
#define AXI_ADC_MUX_PN_ERR   NO_OS_BIT(3)
 
#define AXI_ADC_MUX_PN_OOS   NO_OS_BIT(2)
 
#define AXI_ADC_MUX_OVER_RANGE   NO_OS_BIT(1)
 
#define AXI_ADC_STATUS   NO_OS_BIT(0)
 
#define AXI_ADC_REG_DELAY_CNTRL   0x0060
 
#define ADC_DELAY_SEL   NO_OS_BIT(17)
 
#define ADC_DELAY_RWN   NO_OS_BIT(16)
 
#define ADC_DELAY_ADDRESS(x)   (((x) & 0xFF) << 8)
 
#define ADC_TO_DELAY_ADDRESS(x)   (((x) >> 8) & 0xFF)
 
#define ADC_DELAY_WDATA(x)   (((x) & 0x1F) << 0)
 
#define ADC_TO_DELAY_WDATA(x)   (((x) >> 0) & 0x1F)
 
#define AXI_ADC_REG_CHAN_CNTRL(c)   (0x0400 + (c) * 0x40)
 
#define AXI_ADC_PN_SEL   NO_OS_BIT(10)
 
#define AXI_ADC_IQCOR_ENB   NO_OS_BIT(9)
 
#define AXI_ADC_DCFILT_ENB   NO_OS_BIT(8)
 
#define AXI_ADC_FORMAT_SIGNEXT   NO_OS_BIT(6)
 
#define AXI_ADC_FORMAT_TYPE   NO_OS_BIT(5)
 
#define AXI_ADC_FORMAT_ENABLE   NO_OS_BIT(4)
 
#define AXI_ADC_PN23_TYPE   NO_OS_BIT(1)
 
#define AXI_ADC_ENABLE   NO_OS_BIT(0)
 
#define AXI_ADC_REG_CHAN_STATUS(c)   (0x0404 + (c) * 0x40)
 
#define AXI_ADC_PN_ERR   NO_OS_BIT(2)
 
#define AXI_ADC_PN_OOS   NO_OS_BIT(1)
 
#define AXI_ADC_OVER_RANGE   NO_OS_BIT(0)
 
#define AXI_ADC_REG_CHAN_CNTRL_1(c)   (0x0410 + (c) * 0x40)
 
#define AXI_ADC_DCFILT_OFFSET(x)   (((x) & 0xFFFFL) << 16)
 
#define AXI_ADC_TO_DCFILT_OFFSET(x)   (((x) >> 16) & 0xFFFF)
 
#define AXI_ADC_DCFILT_COEFF(x)   (((x) & 0xFFFF) << 0)
 
#define AXI_ADC_TO_DCFILT_COEFF(x)   (((x) >> 0) & 0xFFFF)
 
#define AXI_ADC_REG_CHAN_CNTRL_2(c)   (0x0414 + (c) * 0x40)
 
#define AXI_ADC_IQCOR_COEFF_1(x)   (((x) & 0xFFFFL) << 16)
 
#define AXI_ADC_TO_IQCOR_COEFF_1(x)   (((x) >> 16) & 0xFFFF)
 
#define AXI_ADC_IQCOR_COEFF_2(x)   (((x) & 0xFFFF) << 0)
 
#define AXI_ADC_TO_IQCOR_COEFF_2(x)   (((x) >> 0) & 0xFFFF)
 
#define AXI_ADC_REG_CHAN_CNTRL_3(c)   (0x0418 + (c) * 0x40)
 
#define AXI_ADC_ADC_PN_SEL(x)   (((x) & 0xF) << 16)
 
#define AXI_ADC_TO_ADC_PN_SEL(x)   (((x) >> 16) & 0xF)
 
#define AXI_ADC_ADC_DATA_SEL(x)   (((x) & 0xF) << 0)
 
#define AXI_ADC_TO_ADC_DATA_SEL(x)   (((x) >> 0) & 0xF)
 
#define AXI_ADC_REG_DELAY(l)   (0x0800 + (l) * 0x4)
 

Enumerations

enum  axi_adc_pn_sel {
  AXI_ADC_PN9 = 0,
  AXI_ADC_PN23A = 1,
  AXI_ADC_PN7 = 4,
  AXI_ADC_PN15 = 5,
  AXI_ADC_PN23 = 6,
  AXI_ADC_PN31 = 7,
  AXI_ADC_PN_CUSTOM = 9,
  AXI_ADC_PN_RAMP_NIBBLE = 10,
  AXI_ADC_PN_RAMP_16 = 11,
  AXI_ADC_PN_END = 12
}
 

Functions

int32_t axi_adc_init_begin (struct axi_adc **adc_core, const struct axi_adc_init *init)
 Begin AXI ADC Initialization. More...
 
int32_t axi_adc_init_finish (struct axi_adc *adc)
 Begin AXI ADC Initialization. More...
 
int32_t axi_adc_init (struct axi_adc **adc_core, const struct axi_adc_init *init)
 AXI ADC Main Initialization. More...
 
int32_t axi_adc_remove (struct axi_adc *adc)
 AXI ADC Resources deallocation. More...
 
int32_t axi_adc_read (struct axi_adc *adc, uint32_t reg_addr, uint32_t *reg_data)
 AXI ADC Data read. More...
 
int32_t axi_adc_write (struct axi_adc *adc, uint32_t reg_addr, uint32_t reg_data)
 AXI ADC Data Write. More...
 
int32_t axi_adc_set_pnsel (struct axi_adc *adc, uint32_t chan, enum axi_adc_pn_sel sel)
 Set AXI ADC PN sequence. More...
 
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. More...
 
int32_t axi_adc_get_sampling_freq (struct axi_adc *adc, uint32_t chan, uint64_t *sampling_freq)
 Get the AXI ADC Sampling Frequency. More...
 
void axi_adc_idelay_set (struct axi_adc *adc, uint32_t lane, uint32_t val)
 Set input/output delay primitive for specific interface line. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
int32_t axi_adc_update_active_channels (struct axi_adc *adc, uint32_t mask)
 Update active AXI ADC channels. More...
 

Detailed Description

Driver for the Analog Devices AXI-ADC-CORE module.

Author
DBogdan (drago.nosp@m.s.bo.nosp@m.gdan@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

Copyright 2018(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ ADC_DELAY_ADDRESS

#define ADC_DELAY_ADDRESS (   x)    (((x) & 0xFF) << 8)

◆ ADC_DELAY_RWN

#define ADC_DELAY_RWN   NO_OS_BIT(16)

◆ ADC_DELAY_SEL

#define ADC_DELAY_SEL   NO_OS_BIT(17)

◆ ADC_DELAY_WDATA

#define ADC_DELAY_WDATA (   x)    (((x) & 0x1F) << 0)

◆ ADC_TO_DELAY_ADDRESS

#define ADC_TO_DELAY_ADDRESS (   x)    (((x) >> 8) & 0xFF)

◆ ADC_TO_DELAY_WDATA

#define ADC_TO_DELAY_WDATA (   x)    (((x) >> 0) & 0x1F)

◆ AXI_ADC_ADC_DATA_SEL

#define AXI_ADC_ADC_DATA_SEL (   x)    (((x) & 0xF) << 0)

◆ AXI_ADC_ADC_PN_SEL

#define AXI_ADC_ADC_PN_SEL (   x)    (((x) & 0xF) << 16)

◆ AXI_ADC_CLK_FREQ

#define AXI_ADC_CLK_FREQ (   x)    (((x) & 0xFFFFFFFF) << 0)

◆ AXI_ADC_CLK_RATIO

#define AXI_ADC_CLK_RATIO (   x)    (((x) & 0xFFFFFFFF) << 0)

◆ AXI_ADC_CRC_EN

#define AXI_ADC_CRC_EN   NO_OS_BIT(8)

◆ AXI_ADC_DCFILT_COEFF

#define AXI_ADC_DCFILT_COEFF (   x)    (((x) & 0xFFFF) << 0)

◆ AXI_ADC_DCFILT_ENB

#define AXI_ADC_DCFILT_ENB   NO_OS_BIT(8)

◆ AXI_ADC_DCFILT_OFFSET

#define AXI_ADC_DCFILT_OFFSET (   x)    (((x) & 0xFFFFL) << 16)

◆ AXI_ADC_DDR_EDGESEL

#define AXI_ADC_DDR_EDGESEL   NO_OS_BIT(1)

◆ AXI_ADC_ENABLE

#define AXI_ADC_ENABLE   NO_OS_BIT(0)

◆ AXI_ADC_FORMAT_ENABLE

#define AXI_ADC_FORMAT_ENABLE   NO_OS_BIT(4)

◆ AXI_ADC_FORMAT_SIGNEXT

#define AXI_ADC_FORMAT_SIGNEXT   NO_OS_BIT(6)

◆ AXI_ADC_FORMAT_TYPE

#define AXI_ADC_FORMAT_TYPE   NO_OS_BIT(5)

◆ AXI_ADC_IQCOR_COEFF_1

#define AXI_ADC_IQCOR_COEFF_1 (   x)    (((x) & 0xFFFFL) << 16)

◆ AXI_ADC_IQCOR_COEFF_2

#define AXI_ADC_IQCOR_COEFF_2 (   x)    (((x) & 0xFFFF) << 0)

◆ AXI_ADC_IQCOR_ENB

#define AXI_ADC_IQCOR_ENB   NO_OS_BIT(9)

◆ AXI_ADC_MMCM_RSTN

#define AXI_ADC_MMCM_RSTN   NO_OS_BIT(1)

◆ AXI_ADC_MUX_OVER_RANGE

#define AXI_ADC_MUX_OVER_RANGE   NO_OS_BIT(1)

◆ AXI_ADC_MUX_PN_ERR

#define AXI_ADC_MUX_PN_ERR   NO_OS_BIT(3)

◆ AXI_ADC_MUX_PN_OOS

#define AXI_ADC_MUX_PN_OOS   NO_OS_BIT(2)

◆ AXI_ADC_OVER_RANGE

#define AXI_ADC_OVER_RANGE   NO_OS_BIT(0)

◆ AXI_ADC_PIN_MODE

#define AXI_ADC_PIN_MODE   NO_OS_BIT(0)

◆ AXI_ADC_PN23_TYPE

#define AXI_ADC_PN23_TYPE   NO_OS_BIT(1)

◆ AXI_ADC_PN_ERR

#define AXI_ADC_PN_ERR   NO_OS_BIT(2)

◆ AXI_ADC_PN_OOS

#define AXI_ADC_PN_OOS   NO_OS_BIT(1)

◆ AXI_ADC_PN_SEL

#define AXI_ADC_PN_SEL   NO_OS_BIT(10)

◆ AXI_ADC_R1_MODE

#define AXI_ADC_R1_MODE   NO_OS_BIT(2)

◆ AXI_ADC_REG_CHAN_CNTRL

#define AXI_ADC_REG_CHAN_CNTRL (   c)    (0x0400 + (c) * 0x40)

◆ AXI_ADC_REG_CHAN_CNTRL_1

#define AXI_ADC_REG_CHAN_CNTRL_1 (   c)    (0x0410 + (c) * 0x40)

◆ AXI_ADC_REG_CHAN_CNTRL_2

#define AXI_ADC_REG_CHAN_CNTRL_2 (   c)    (0x0414 + (c) * 0x40)

◆ AXI_ADC_REG_CHAN_CNTRL_3

#define AXI_ADC_REG_CHAN_CNTRL_3 (   c)    (0x0418 + (c) * 0x40)

◆ AXI_ADC_REG_CHAN_STATUS

#define AXI_ADC_REG_CHAN_STATUS (   c)    (0x0404 + (c) * 0x40)

◆ AXI_ADC_REG_CLK_FREQ

#define AXI_ADC_REG_CLK_FREQ   0x0054

◆ AXI_ADC_REG_CLK_RATIO

#define AXI_ADC_REG_CLK_RATIO   0x0058

◆ AXI_ADC_REG_CNTRL

#define AXI_ADC_REG_CNTRL   0x0044

◆ AXI_ADC_REG_CNTRL_3

#define AXI_ADC_REG_CNTRL_3   0x004C

◆ AXI_ADC_REG_DELAY

#define AXI_ADC_REG_DELAY (   l)    (0x0800 + (l) * 0x4)

◆ AXI_ADC_REG_DELAY_CNTRL

#define AXI_ADC_REG_DELAY_CNTRL   0x0060

◆ AXI_ADC_REG_RSTN

#define AXI_ADC_REG_RSTN   0x0040

◆ AXI_ADC_REG_STATUS

#define AXI_ADC_REG_STATUS   0x005C

◆ AXI_ADC_RSTN

#define AXI_ADC_RSTN   NO_OS_BIT(0)

◆ AXI_ADC_STATUS

#define AXI_ADC_STATUS   NO_OS_BIT(0)

◆ AXI_ADC_TO_ADC_DATA_SEL

#define AXI_ADC_TO_ADC_DATA_SEL (   x)    (((x) >> 0) & 0xF)

◆ AXI_ADC_TO_ADC_PN_SEL

#define AXI_ADC_TO_ADC_PN_SEL (   x)    (((x) >> 16) & 0xF)

◆ AXI_ADC_TO_CLK_FREQ

#define AXI_ADC_TO_CLK_FREQ (   x)    (((x) >> 0) & 0xFFFFFFFF)

◆ AXI_ADC_TO_CLK_RATIO

#define AXI_ADC_TO_CLK_RATIO (   x)    (((x) >> 0) & 0xFFFFFFFF)

◆ AXI_ADC_TO_DCFILT_COEFF

#define AXI_ADC_TO_DCFILT_COEFF (   x)    (((x) >> 0) & 0xFFFF)

◆ AXI_ADC_TO_DCFILT_OFFSET

#define AXI_ADC_TO_DCFILT_OFFSET (   x)    (((x) >> 16) & 0xFFFF)

◆ AXI_ADC_TO_IQCOR_COEFF_1

#define AXI_ADC_TO_IQCOR_COEFF_1 (   x)    (((x) >> 16) & 0xFFFF)

◆ AXI_ADC_TO_IQCOR_COEFF_2

#define AXI_ADC_TO_IQCOR_COEFF_2 (   x)    (((x) >> 0) & 0xFFFF)

Enumeration Type Documentation

◆ axi_adc_pn_sel

Enumerator
AXI_ADC_PN9 
AXI_ADC_PN23A 
AXI_ADC_PN7 
AXI_ADC_PN15 
AXI_ADC_PN23 
AXI_ADC_PN31 
AXI_ADC_PN_CUSTOM 
AXI_ADC_PN_RAMP_NIBBLE 
AXI_ADC_PN_RAMP_16 
AXI_ADC_PN_END 

Function Documentation

◆ 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.

Calibrate Delay using specific PN sequence

Parameters
adc- The device structure.
no_of_lanes- The AXI ADC number of lanes.
sel- PN sequence.
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ 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.

Set input/output delay primitive for number of lines

Parameters
adc- The device structure.
no_of_lanes- The AXI ADC number of lanes.
delay- Delay value.
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ 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.

Get the bias calibration values for AXI ADC channel

Parameters
adc- The device structure.
chan- AXI ADC channel.
val- Integer value
val2- Fractional value
Returns
Returns 0 in case of success or negative error code otherwise.

◆ 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.

Get the phase calibration values for AXI ADC channel

Parameters
adc- The device structure.
chan- AXI ADC channel.
val- Integer value
val2- Fractional value
Returns
Returns 0 in case of success or negative error code otherwise.

◆ 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.

Get the scale calibration values for AXI ADC channel

Parameters
adc- The device structure.
chan- AXI ADC channel.
val- Integer value
val2- Fractional value
Returns
Returns 0 in case of success or negative error code otherwise.

◆ 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.

Get the AXI ADC Sampling Frequency

Parameters
adc- The device structure.
chan- The AXI ADC channel.
sampling_freq- Sampling frequency value.
Returns
Returns 0 in case of success or negative error code otherwise.

◆ 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.

Set input/output delay primitive for specific interface line

Parameters
adc- The device structure.
lane- The AXI ADC interface line.
val- Delay value.
Here is the caller graph for this function:

◆ axi_adc_init()

int32_t axi_adc_init ( struct axi_adc **  adc_core,
const struct axi_adc_init init 
)

AXI ADC Main Initialization.

AXI ADC Main Initialization

Parameters
adc_core- The device structure.
init- Initialization parameters.
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ 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.

Begin AXI ADC Initialization

Parameters
adc_core- The device structure.
init- Initialization parameters.
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ axi_adc_init_finish()

int32_t axi_adc_init_finish ( struct axi_adc adc)

Begin AXI ADC Initialization.

Finish AXI ADC Initialization

Parameters
adc- The device structure.
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ 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.

Monitor the AXI ADC PN Sequence

Parameters
adc- The device structure.
sel- PN sequence.
delay_ms- Delay in ms.
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ axi_adc_read()

int32_t axi_adc_read ( struct axi_adc adc,
uint32_t  reg_addr,
uint32_t *  reg_data 
)

AXI ADC Data read.

AXI ADC Read

Parameters
adc- The device structure.
reg_addr- The register address.
reg_data- Read data value.
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ axi_adc_remove()

int32_t axi_adc_remove ( struct axi_adc adc)

AXI ADC Resources deallocation.

Resources Deallocation

Parameters
adc- The device structure.
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ 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.

Calibrate bias for specific AXI ADC channel

Parameters
adc- The device structure.
chan- AXI ADC channel.
val- Integer value
val2- Fractional value
Returns
Returns 0 in case of success or negative error code otherwise.

◆ 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.

Calibrate phase for specific AXI ADC channel

Parameters
adc- The device structure.
chan- AXI ADC channel.
val- Integer value
val2- Fractional value
Returns
Returns 0 in case of success or negative error code otherwise.

◆ 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.

Calibrate scale for specific AXI ADC channel

Parameters
adc- The device structure.
chan- AXI ADC channel.
val- Integer value
val2- Fractional value
Returns
Returns 0 in case of success or negative error code otherwise.

◆ 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.

Set AXI ADC PN sequence

Parameters
adc- The device structure.
chan- The AXI ADC channel.
sel- PN sequence.
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ axi_adc_update_active_channels()

int32_t axi_adc_update_active_channels ( struct axi_adc adc,
uint32_t  mask 
)

Update active AXI ADC channels.

Update active AXI ADC channels

Parameters
adc- The device structure.
mask- Channel mask.
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ axi_adc_write()

int32_t axi_adc_write ( struct axi_adc adc,
uint32_t  reg_addr,
uint32_t  reg_data 
)

AXI ADC Data Write.

AXI ADC Write

Parameters
adc- The device structure.
reg_addr- The register address.
reg_data- Data value to be written.
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function: