no-OS
iio_dac_demo.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef IIO_DEMO_DAC
35 #define IIO_DEMO_DAC
36 
37 #include <stdlib.h>
38 #include "iio_types.h"
39 #include "dac_demo.h"
40 
42 extern struct iio_trigger dac_iio_sw_trig_desc;
44 
45 #endif /* IIO_DEMO_DAC */
get_dac_demo_attr
int get_dac_demo_attr(void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t attr_id)
get attributes for dac.
Definition: iio_dac_demo.c:76
dac_demo_reg_write
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
dac_channel_attributes
struct iio_attribute dac_channel_attributes[]
Definition: iio_dac_demo.c:244
dac_demo_desc::loopback_buffer_len
uint32_t loopback_buffer_len
Definition: dac_demo.h:68
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
close_dac_channels
int32_t close_dac_channels(void *dev)
close all channels
Definition: dac_demo.c:113
iio_dac_demo.h
Header file of DAC Demo iio.
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
scan_type::sign
char sign
Definition: iio_types.h:153
iio_buffer_pop_scan
int iio_buffer_pop_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1416
dac_demo_reg_read
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
iio_device_data::dev
void * dev
Definition: iio_types.h:227
dac_demo_desc::dac_global_attr
uint32_t dac_global_attr
Definition: dac_demo.h:62
update_dac_channels
int32_t update_dac_channels(void *dev, int32_t mask)
update number of active channels
Definition: dac_demo.c:95
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:103
iio_buffer::bytes_per_scan
uint32_t bytes_per_scan
Definition: iio_types.h:215
dac_demo_desc
Definition: dac_demo.h:58
dac_demo_iio_descriptor
struct iio_device dac_demo_iio_descriptor
Definition: iio_dac_demo.c:273
device
Definition: ad9361_util.h:69
dac_global_attributes
struct iio_attribute dac_global_attributes[]
Definition: iio_dac_demo.c:249
dac_iio_sw_trig_desc
struct iio_trigger dac_iio_sw_trig_desc
Definition: iio_dac_demo_trig.c:55
dac_submit_samples
int32_t dac_submit_samples(struct iio_device_data *dev_data)
function for writing samples to the device.
Definition: iio_dac_demo.c:104
no_os_str_to_uint32
uint32_t no_os_str_to_uint32(const char *str)
DAC_GLOBAL_ATTR
@ DAC_GLOBAL_ATTR
Definition: dac_demo.h:90
dac_iio_timer_trig_desc
struct iio_trigger dac_iio_timer_trig_desc
Definition: iio_dac_demo_trig.c:61
dac_demo_iio_descriptor
struct iio_device dac_demo_iio_descriptor
Definition: iio_dac_demo.c:273
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
dac_demo_desc::loopback_buffers
uint16_t ** loopback_buffers
Definition: dac_demo.h:70
dac_demo_desc::dac_ch_attr
uint32_t dac_ch_attr[MAX_DAC_ADDR]
Definition: dac_demo.h:64
iio_buffer::size
uint32_t size
Definition: iio_types.h:213
dac_demo_desc::active_ch
uint32_t active_ch
Definition: dac_demo.h:66
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
DAC_DEMO_ATTR
#define DAC_DEMO_ATTR(_name, _priv)
Definition: iio_dac_demo.c:218
dac_demo_trigger_handler
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
iio_device_data::buffer
struct iio_buffer * buffer
Definition: iio_types.h:228
iio_channel::attributes
struct iio_attribute * attributes
Definition: iio_types.h:186
iio_types.h
Header file for iio_types.
set_dac_demo_attr
int set_dac_demo_attr(void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t attr_id)
set attributes for dac.
Definition: iio_dac_demo.c:193
iio_device::num_ch
uint16_t num_ch
Definition: iio_types.h:252
DAC_CHANNEL_ATTR
@ DAC_CHANNEL_ATTR
Definition: dac_demo.h:89
iio_trigger
Definition: iio_types.h:231
NULL
#define NULL
Definition: wrapper.h:64
iio_ch_info::ch_num
int16_t ch_num
Definition: iio_types.h:105
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
TOTAL_DAC_CHANNELS
#define TOTAL_DAC_CHANNELS
Definition: dac_demo.h:51
scan_type
Definition: iio_types.h:151
no_os_util.h
Header file of utility functions.
iio_device_data
Definition: iio_types.h:226
IIO_DEMO_DAC_CHANNEL
#define IIO_DEMO_DAC_CHANNEL(_idx)
Definition: iio_dac_demo.c:225
dac_demo.h
Header file of DAC Demo Driver.
dac_scan_type
struct scan_type dac_scan_type
Definition: iio_dac_demo.c:236