Go to the documentation of this file.
34 #ifndef IIO_AXI_ADC_H_
35 #define IIO_AXI_ADC_H_
64 uint64_t *sampling_freq_hz);
86 uint64_t *sampling_freq_hz);
107 #endif // IIO_AXI_ADC_H_
Driver for the Analog Devices AXI-ADC-CORE module.
int32_t(* read_dev)(void *dev, void *buff, uint32_t nb_samples)
Definition: iio_types.h:265
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
Struct describing the scan type.
Definition: iio_types.h:168
char sign
Definition: iio_types.h:153
struct iio_channel * channels
Definition: iio_types.h:254
struct iio_device dev_descriptor
Definition: iio_axi_adc.h:66
Structure holding channel attributess.
Definition: iio_types.h:103
struct axi_dmac * rx_dmac
Definition: iio_axi_adc.h:81
int32_t axi_dmac_transfer_wait_completion(struct axi_dmac *dmac, uint32_t timeout_ms)
Definition: axi_dmac.c:525
uint8_t storagebits
Definition: iio_types.h:157
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:50
AXI ADC Device Descriptor.
Definition: axi_adc_core.h:122
void(* dcache_invalidate_range)(uint32_t address, uint32_t bytes_count)
Definition: iio_axi_adc.h:83
Definition: ad9361_util.h:69
struct axi_dmac * dmac
Definition: iio_axi_adc.h:59
enum iio_chan_type ch_type
Definition: iio_types.h:172
iio configuration.
Definition: iio_axi_adc.h:77
struct scan_type * scan_type_common
Definition: iio_axi_adc.h:70
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
int32_t iio_axi_adc_remove(struct iio_axi_adc_desc *desc)
Release resources.
Definition: iio_axi_adc.c:530
iio_axi_adc_descriptor
Definition: iio_axi_adc.h:53
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:433
Definition: axi_dmac.h:102
int channel
Definition: iio_types.h:174
uint8_t num_channels
Definition: axi_adc_core.h:130
int32_t(* pre_enable)(void *dev, uint32_t mask)
Definition: iio_types.h:274
int32_t iio_axi_adc_init(struct iio_axi_adc_desc **desc, struct iio_axi_adc_init_param *init)
Registers a iio_axi_adc_desc for reading/writing and parameterization of axi_adc device.
Definition: iio_axi_adc.c:476
const char * name
Definition: iio_types.h:131
int(* get_sampling_frequency)(struct axi_adc *dev, uint32_t chan, uint64_t *sampling_freq_hz)
Definition: iio_axi_adc.h:63
const char * name
Definition: iio_types.h:170
int32_t iio_axi_adc_prepare_transfer(void *dev, uint32_t mask)
Update active channels.
Definition: iio_axi_adc.c:328
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:521
Driver for the Analog Devices AXI-DMAC core.
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
Header file of iio_axi_adc.
int32_t iio_axi_adc_remove(struct iio_axi_adc_desc *desc)
Release resources.
Definition: iio_axi_adc.c:530
int32_t no_os_str_to_int32(const char *str)
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:449
@ IIO_VOLTAGE
Definition: iio_types.h:65
void(* dcache_invalidate_range)(uint32_t address, uint32_t bytes_count)
Definition: iio_axi_adc.h:61
struct scan_type * scan_type_common
Definition: iio_axi_adc.h:89
uint32_t mask
Definition: iio_axi_adc.h:57
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:481
int32_t axi_adc_update_active_channels(struct axi_adc *adc, uint32_t mask)
Update active AXI ADC channels.
Definition: axi_adc_core.c:539
int32_t iio_axi_adc_init(struct iio_axi_adc_desc **desc, struct iio_axi_adc_init_param *param)
Registers a iio_axi_adc_desc for reading/writing and parameterization of axi_adc device.
Definition: iio_axi_adc.c:476
Header file for iio_types.
uint16_t num_ch
Definition: iio_types.h:252
struct scan_type * scan_type
Definition: iio_types.h:184
@ NO
Definition: axi_dmac.h:98
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
struct axi_adc * rx_adc
Definition: iio_axi_adc.h:79
#define NULL
Definition: wrapper.h:64
char(* ch_names)[20]
Definition: iio_axi_adc.h:68
int scan_index
Definition: iio_types.h:182
int16_t ch_num
Definition: iio_types.h:105
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
struct axi_adc * adc
Definition: iio_axi_adc.h:55
int get_sampling_frequency(struct axi_adc *dev, uint32_t chan, uint64_t *sampling_freq_hz)
Definition: headless.c:75
Definition: iio_types.h:151
#define STORAGE_BITS
Definition: iio_axi_adc.c:52
int32_t axi_dmac_transfer_start(struct axi_dmac *dmac, struct axi_dma_transfer *dma_transfer)
Definition: axi_dmac.c:385
void iio_axi_adc_get_dev_descriptor(struct iio_axi_adc_desc *desc, struct iio_device **dev_descriptor)
Get device descriptor.
Definition: iio_axi_adc.c:463
unsigned int no_os_hweight32(uint32_t word)
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:497
int(* get_sampling_frequency)(struct axi_adc *dev, uint32_t chan, uint64_t *sampling_freq_hz)
Definition: iio_axi_adc.h:85
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:465
void iio_axi_adc_get_dev_descriptor(struct iio_axi_adc_desc *desc, struct iio_device **dev_descriptor)
Get device descriptor.
Definition: iio_axi_adc.c:463
uint32_t size
Definition: axi_dmac.h:103
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:171
Definition: axi_dmac.h:110
struct iio_attribute * attributes
Definition: iio_types.h:256
int32_t iio_axi_adc_read_dev(void *dev, void *buff, uint32_t nb_samples)
Update active channels.
Definition: iio_axi_adc.c:344