no-OS
iio_adc_demo.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef IIO_DEMO_ADC
41 #define IIO_DEMO_ADC
42 
43 #include <stdlib.h>
44 #include "iio_types.h"
45 #include "adc_demo.h"
46 
48 extern struct iio_trigger adc_iio_sw_trig_desc;
50 
51 #endif /* IIO_DEMO_ADC */
ADC_CHANNEL_ATTR
@ ADC_CHANNEL_ATTR
Definition: adc_demo.h:96
adc_iio_timer_trig_desc
struct iio_trigger adc_iio_timer_trig_desc
Definition: iio_adc_demo_trig.c:67
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:114
iio_channel
Struct describing the scan type.
Definition: iio_types.h:177
scan_type::sign
char sign
Definition: iio_types.h:162
iio_device_data::dev
void * dev
Definition: iio_types.h:234
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
device
Definition: ad9361_util.h:75
adc_demo_trigger_handler
int32_t adc_demo_trigger_handler(struct iio_device_data *dev_data)
Handles trigger: reads one data-set and writes it to the buffer.
Definition: iio_adc_demo.c:188
adc_iio_sw_trig_desc
struct iio_trigger adc_iio_sw_trig_desc
Definition: iio_adc_demo_trig.c:61
adc_demo_desc::ext_buff
uint16_t ** ext_buff
Definition: adc_demo.h:77
adc_channel_attributes
struct iio_attribute adc_channel_attributes[]
Definition: iio_adc_demo.c:241
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:53
no_os_str_to_uint32
uint32_t no_os_str_to_uint32(const char *str)
TOTAL_ADC_CHANNELS
#define TOTAL_ADC_CHANNELS
Definition: adc_demo.h:58
get_adc_demo_attr
int get_adc_demo_attr(void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t attr_id)
get attributes for adc.
Definition: iio_adc_demo.c:82
adc_demo_desc::adc_global_attr
uint32_t adc_global_attr
Definition: adc_demo.h:69
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
close_adc_channels
int32_t close_adc_channels(void *dev)
close all channels
Definition: adc_demo.c:141
ADC_GLOBAL_ATTR
@ ADC_GLOBAL_ATTR
Definition: adc_demo.h:97
IIO_DEMO_ADC_CHANNEL
#define IIO_DEMO_ADC_CHANNEL(_idx)
Definition: iio_adc_demo.c:251
ADC_DEMO_ATTR
#define ADC_DEMO_ATTR(_name, _priv)
Definition: iio_adc_demo.c:226
iio_buffer::size
uint32_t size
Definition: iio_types.h:222
adc_demo.h
Header file of ADC Demo Driver.
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:138
adc_demo_desc::adc_ch_attr
uint32_t adc_ch_attr[MAX_ADC_ADDR]
Definition: adc_demo.h:71
adc_demo_iio_descriptor
struct iio_device adc_demo_iio_descriptor
Definition: iio_adc_demo.c:281
adc_demo_desc::active_ch
uint32_t active_ch
Definition: adc_demo.h:73
adc_demo_desc::ext_buff_len
uint32_t ext_buff_len
Definition: adc_demo.h:75
adc_demo_reg_read
int32_t adc_demo_reg_read(struct adc_demo_desc *desc, uint8_t reg_index, uint8_t *readval)
read function for the adc demo driver
Definition: adc_demo.c:162
iio_device_data::buffer
struct iio_buffer * buffer
Definition: iio_types.h:235
set_adc_demo_attr
int set_adc_demo_attr(void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t attr_id)
set attributes for adc.
Definition: iio_adc_demo.c:113
adc_scan_type
struct scan_type adc_scan_type
Definition: iio_adc_demo.c:233
iio_channel::attributes
struct iio_attribute * attributes
Definition: iio_types.h:195
iio_types.h
Header file for iio_types.
iio_device::num_ch
uint16_t num_ch
Definition: iio_types.h:259
update_adc_channels
int32_t update_adc_channels(void *dev, uint32_t mask)
active adc channels
Definition: adc_demo.c:121
adc_demo_desc
Definition: adc_demo.h:65
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
iio_adc_demo.h
Header file of ADC Demo iio.
adc_demo_reg_write
int32_t adc_demo_reg_write(struct adc_demo_desc *desc, uint8_t reg_index, uint8_t writeval)
write function for the adc demo driver
Definition: adc_demo.c:180
adc_submit_samples
int32_t adc_submit_samples(struct iio_device_data *dev_data)
function for reading samples from the device.
Definition: iio_adc_demo.c:143
iio_adc_global_attributes
struct iio_attribute iio_adc_global_attributes[]
Definition: iio_adc_demo.c:246
sine_lut
const uint16_t sine_lut[128]
Definition: adc_demo.c:52
scan_type
Definition: iio_types.h:160
no_os_util.h
Header file of utility functions.
iio_device_data
Definition: iio_types.h:233
adc_demo_iio_descriptor
struct iio_device adc_demo_iio_descriptor
Definition: iio_adc_demo.c:281
iio_buffer_push_scan
int iio_buffer_push_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1365