Go to the documentation of this file.
48 #define MAX_DAC_ADDR 16
50 #ifndef TOTAL_DAC_CHANNELS
51 #define TOTAL_DAC_CHANNELS 2
iio_dac_demo_attributes
Definition: dac_demo.h:88
int32_t dac_demo_reg_write(struct dac_demo_desc *desc, uint8_t reg_index, uint8_t writeval)
write function for the dac demo driver
Definition: dac_demo.c:151
uint32_t loopback_buffer_len
Definition: dac_demo.h:68
int32_t close_dac_channels(void *dev)
close all channels
Definition: dac_demo.c:113
#define MAX_DAC_ADDR
Definition: dac_demo.h:48
int32_t dac_demo_reg_read(struct dac_demo_desc *desc, uint8_t reg_index, uint8_t *readval)
read function for the dac demo driver
Definition: dac_demo.c:133
uint32_t dac_global_attr
Definition: dac_demo.h:62
int32_t update_dac_channels(void *dev, int32_t mask)
update number of active channels
Definition: dac_demo.c:95
Structure holding channel attributess.
Definition: iio_types.h:103
int set_dac_demo_attr(void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
set attributes for dac.
Definition: iio_dac_demo.c:193
Definition: dac_demo.h:58
int32_t update_dac_channels(void *dev, int32_t mask)
update number of active channels
Definition: dac_demo.c:95
int32_t dac_demo_remove(struct dac_demo_desc *desc)
free allocated resources
Definition: dac_demo.c:79
int get_dac_demo_attr(void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
get attributes for dac.
Definition: iio_dac_demo.c:76
Definition: ad9361_util.h:69
int32_t dac_demo_trigger_handler(struct iio_device_data *dev_data)
Handles trigger: reads one data-set from iio buffer and writes it to the dac buffer.
Definition: iio_dac_demo.c:147
int32_t dac_demo_remove(struct dac_demo_desc *desc)
free allocated resources
Definition: dac_demo.c:79
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
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
@ DAC_GLOBAL_ATTR
Definition: dac_demo.h:90
uint32_t loopback_buffer_len
Definition: dac_demo.h:83
uint16_t ** loopback_buffers
Definition: dac_demo.h:70
uint32_t dac_ch_attr[MAX_DAC_ADDR]
Definition: dac_demo.h:64
int32_t close_dac_channels(void *dev)
close all channels
Definition: dac_demo.c:113
int32_t dac_demo_init(struct dac_demo_desc **desc, struct dac_demo_init_param *param)
init function for the dac demo driver
Definition: dac_demo.c:55
uint32_t dev_global_attr
Definition: dac_demo.h:79
uint32_t active_ch
Definition: dac_demo.h:66
uint32_t dev_ch_attr[MAX_DAC_ADDR]
Definition: dac_demo.h:81
uint16_t ** loopback_buffers
Definition: dac_demo.h:85
int32_t dac_demo_reg_read(struct dac_demo_desc *desc, uint8_t reg_index, uint8_t *readval)
read function for the dac demo driver
Definition: dac_demo.c:133
int32_t dac_demo_init(struct dac_demo_desc **desc, struct dac_demo_init_param *param)
init function for the dac demo driver
Definition: dac_demo.c:55
Header file for iio_types.
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
@ DAC_CHANNEL_ATTR
Definition: dac_demo.h:89
#define TOTAL_DAC_CHANNELS
Definition: dac_demo.h:51
int32_t dac_demo_reg_write(struct dac_demo_desc *desc, uint8_t reg_index, uint8_t writeval)
write function for the dac demo driver
Definition: dac_demo.c:151
Header file of utility functions.
Definition: iio_types.h:226
uint8_t reg[MAX_DAC_ADDR]
Definition: dac_demo.h:60
int32_t dac_submit_samples(struct iio_device_data *dev_data)
function for writing samples to the device.
Definition: iio_dac_demo.c:104
Definition: dac_demo.h:77
Header file of DAC Demo Driver.