no-OS
iio_dac_demo.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef IIO_DEMO_DAC
41 #define IIO_DEMO_DAC
42 
43 #include <stdlib.h>
44 #include "iio_types.h"
45 #include "dac_demo.h"
46 
48 extern struct iio_trigger dac_iio_sw_trig_desc;
50 
51 #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:82
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:156
dac_channel_attributes
struct iio_attribute dac_channel_attributes[]
Definition: iio_dac_demo.c:250
dac_demo_desc::loopback_buffer_len
uint32_t loopback_buffer_len
Definition: dac_demo.h:74
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:114
close_dac_channels
int32_t close_dac_channels(void *dev)
close all channels
Definition: dac_demo.c:118
iio_dac_demo.h
Header file of DAC Demo iio.
iio_channel
Struct describing the scan type.
Definition: iio_types.h:177
scan_type::sign
char sign
Definition: iio_types.h:162
iio_buffer_pop_scan
int iio_buffer_pop_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1374
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:138
iio_device_data::dev
void * dev
Definition: iio_types.h:234
dac_demo_desc::dac_global_attr
uint32_t dac_global_attr
Definition: dac_demo.h:68
update_dac_channels
int32_t update_dac_channels(void *dev, int32_t mask)
update number of active channels
Definition: dac_demo.c:100
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:101
iio_buffer::bytes_per_scan
uint32_t bytes_per_scan
Definition: iio_types.h:224
dac_demo_desc
Definition: dac_demo.h:64
dac_demo_iio_descriptor
struct iio_device dac_demo_iio_descriptor
Definition: iio_dac_demo.c:279
device
Definition: ad9361_util.h:75
dac_global_attributes
struct iio_attribute dac_global_attributes[]
Definition: iio_dac_demo.c:255
dac_iio_sw_trig_desc
struct iio_trigger dac_iio_sw_trig_desc
Definition: iio_dac_demo_trig.c:61
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:110
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:96
dac_iio_timer_trig_desc
struct iio_trigger dac_iio_timer_trig_desc
Definition: iio_dac_demo_trig.c:67
dac_demo_iio_descriptor
struct iio_device dac_demo_iio_descriptor
Definition: iio_dac_demo.c:279
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:76
dac_demo_desc::dac_ch_attr
uint32_t dac_ch_attr[MAX_DAC_ADDR]
Definition: dac_demo.h:70
iio_buffer::size
uint32_t size
Definition: iio_types.h:222
dac_demo_desc::active_ch
uint32_t active_ch
Definition: dac_demo.h:72
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:138
DAC_DEMO_ATTR
#define DAC_DEMO_ATTR(_name, _priv)
Definition: iio_dac_demo.c:224
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:153
iio_device_data::buffer
struct iio_buffer * buffer
Definition: iio_types.h:235
iio_channel::attributes
struct iio_attribute * attributes
Definition: iio_types.h:195
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:199
iio_device::num_ch
uint16_t num_ch
Definition: iio_types.h:259
DAC_CHANNEL_ATTR
@ DAC_CHANNEL_ATTR
Definition: dac_demo.h:95
iio_trigger
Definition: iio_types.h:238
NULL
#define NULL
Definition: wrapper.h:64
iio_ch_info::ch_num
int16_t ch_num
Definition: iio_types.h:103
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:254
TOTAL_DAC_CHANNELS
#define TOTAL_DAC_CHANNELS
Definition: dac_demo.h:57
scan_type
Definition: iio_types.h:160
no_os_util.h
Header file of utility functions.
iio_device_data
Definition: iio_types.h:233
IIO_DEMO_DAC_CHANNEL
#define IIO_DEMO_DAC_CHANNEL(_idx)
Definition: iio_dac_demo.c:231
dac_demo.h
Header file of DAC Demo Driver.
dac_scan_type
struct scan_type dac_scan_type
Definition: iio_dac_demo.c:242