Go to the documentation of this file.
34 #ifndef IIO_AXI_DAC_H_
35 #define IIO_AXI_DAC_H_
93 #endif // IIO_AXI_DAC_H_
int32_t axi_dac_dds_set_calib_scale(struct axi_dac *dac, uint32_t chan, int32_t val, int32_t val2)
Calibrate scale for specific AXI DAC channel.
Definition: axi_dac_core.c:909
int32_t iio_axi_dac_init(struct iio_axi_dac_desc **desc, struct iio_axi_dac_init_param *param)
Registers a iio_axi_dac_desc for reading/writing and parameterization of axi_dac device.
Definition: iio_axi_dac.c:659
#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
int32_t axi_dac_dds_get_calib_scale(struct axi_dac *dac, uint32_t chan, int32_t *val, int32_t *val2)
Get the scale calibration values for AXI DAC channel.
Definition: axi_dac_core.c:925
struct iio_channel * channels
Definition: iio_types.h:254
int32_t iio_axi_dac_prepare_transfer(void *dev, uint32_t mask)
Update active channels.
Definition: iio_axi_dac.c:464
struct iio_device dev_descriptor
Definition: iio_axi_dac.h:62
Structure holding channel attributess.
Definition: iio_types.h:103
@ AXI_DAC_DATA_SEL_DDS
Definition: axi_dac_core.h:84
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:50
struct axi_dac * dac
Definition: iio_axi_dac.h:54
int32_t axi_dac_dds_set_phase(struct axi_dac *dac, uint32_t chan, uint32_t phase)
AXI DAC Set DDS phase for specific channel.
Definition: axi_dac_core.c:663
Definition: ad9361_util.h:69
int32_t axi_dac_dds_set_frequency(struct axi_dac *dac, uint32_t chan, uint32_t freq_hz)
AXI DAC Set DDS frequency for specific channel.
Definition: axi_dac_core.c:614
int32_t(* write_dev)(void *dev, void *buff, uint32_t nb_samples)
Definition: iio_types.h:270
@ IIO_ALTVOLTAGE
Definition: iio_types.h:67
enum iio_chan_type ch_type
Definition: iio_types.h:172
int32_t axi_dac_dds_set_scale(struct axi_dac *dac, uint32_t chan, int32_t scale_micro_units)
AXI DAC Set DDS scale for specific channel.
Definition: axi_dac_core.c:714
Driver for the Analog Devices AXI-DAC-CORE module.
void iio_axi_dac_get_dev_descriptor(struct iio_axi_dac_desc *desc, struct iio_device **dev_descriptor)
Create structure describing a device, channels and attributes.
Definition: iio_axi_dac.c:646
@ CH_VOLTGE
Definition: iio_axi_dac.c:524
Definition: iio_axi_dac.h:71
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
uint32_t no_os_str_to_uint32(const char *str)
void(* dcache_flush_range)(uint32_t address, uint32_t bytes_count)
Definition: iio_axi_dac.h:60
Definition: axi_dmac.h:102
int32_t axi_dac_dds_get_calib_phase(struct axi_dac *dac, uint32_t chan, int32_t *val, int32_t *val2)
Get the phase calibration values for AXI DAC channel.
Definition: axi_dac_core.c:957
int channel
Definition: iio_types.h:174
int32_t(* pre_enable)(void *dev, uint32_t mask)
Definition: iio_types.h:274
const char * name
Definition: iio_types.h:131
int32_t axi_dac_set_datasel(struct axi_dac *dac, int32_t chan, enum axi_dac_data_sel sel)
AXI DAC Set Data type for specific channel.
Definition: axi_dac_core.c:590
struct axi_dmac * dmac
Definition: iio_axi_dac.h:56
const char * name
Definition: iio_types.h:170
@ CH_ALTVOLTGE
Definition: iio_axi_dac.c:525
Driver for the Analog Devices AXI-DMAC core.
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
void iio_axi_dac_get_dev_descriptor(struct iio_axi_dac_desc *desc, struct iio_device **dev_descriptor)
Create structure describing a device, channels and attributes.
Definition: iio_axi_dac.c:646
uint32_t dest_addr
Definition: axi_dmac.h:107
struct axi_dmac * tx_dmac
Definition: iio_axi_dac.h:75
AXI DAC Device Descriptor.
Definition: axi_dac_core.h:53
uint8_t num_channels
Definition: axi_dac_core.h:59
int32_t iio_axi_dac_remove(struct iio_axi_dac_desc *desc)
Release resources.
Definition: iio_axi_dac.c:699
@ IIO_VOLTAGE
Definition: iio_types.h:65
Definition: iio_axi_dac.h:53
struct axi_dac * tx_dac
Definition: iio_axi_dac.h:73
int32_t iio_axi_dac_remove(struct iio_axi_dac_desc *desc)
Release resources.
Definition: iio_axi_dac.c:699
Header file for iio_types.
uint16_t num_ch
Definition: iio_types.h:252
struct scan_type * scan_type
Definition: iio_types.h:184
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
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
@ CYCLIC
Definition: axi_dmac.h:99
#define NULL
Definition: wrapper.h:64
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
int32_t iio_axi_dac_init(struct iio_axi_dac_desc **desc, struct iio_axi_dac_init_param *init)
Registers a iio_axi_dac_desc for reading/writing and parameterization of axi_dac device.
Definition: iio_axi_dac.c:659
Header file of iio_axi_dac.
#define STORAGE_BITS
Definition: iio_axi_dac.c:52
char(* ch_names)[20]
Definition: iio_axi_dac.h:64
int32_t axi_dac_dds_get_scale(struct axi_dac *dac, uint32_t chan, int32_t *scale_micro_units)
AXI DAC Get DDS scale for specific channel.
Definition: axi_dac_core.c:745
int32_t iio_axi_dac_write_data(void *dev, void *buff, uint32_t nb_samples)
Update active channels.
Definition: iio_axi_dac.c:493
Definition: iio_types.h:151
void(* dcache_flush_range)(uint32_t address, uint32_t bytes_count)
Definition: iio_axi_dac.h:77
int32_t axi_dmac_transfer_start(struct axi_dmac *dmac, struct axi_dma_transfer *dma_transfer)
Definition: axi_dmac.c:385
uint32_t mask
Definition: iio_axi_dac.h:58
@ AXI_DAC_DATA_SEL_DMA
Definition: axi_dac_core.h:86
unsigned int no_os_hweight32(uint32_t word)
int32_t axi_dac_dds_set_calib_phase(struct axi_dac *dac, uint32_t chan, int32_t val, int32_t val2)
Calibrate phase for specific AXI DAC channel.
Definition: axi_dac_core.c:941
uint32_t size
Definition: axi_dmac.h:103
int32_t axi_dac_dds_get_phase(struct axi_dac *dac, uint32_t chan, uint32_t *phase)
AXI DAC Get DDS phase for specific channel.
Definition: axi_dac_core.c:688
Definition: axi_dmac.h:110
struct iio_attribute * attributes
Definition: iio_types.h:256
int32_t axi_dac_dds_get_frequency(struct axi_dac *dac, uint32_t chan, uint32_t *freq)
AXI DAC Get DDS frequency for specific channel.
Definition: axi_dac_core.c:638
ch_type
Definition: iio_axi_dac.c:523