no-OS
iio_adc_demo.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef IIO_DEMO_ADC
35 #define IIO_DEMO_ADC
36 
37 #include <stdlib.h>
38 #include "iio_types.h"
39 #include "adc_demo.h"
40 
42 extern struct iio_trigger adc_iio_sw_trig_desc;
44 
45 #endif /* IIO_DEMO_ADC */
ADC_CHANNEL_ATTR
@ ADC_CHANNEL_ATTR
Definition: adc_demo.h:90
adc_iio_timer_trig_desc
struct iio_trigger adc_iio_timer_trig_desc
Definition: iio_adc_demo_trig.c:61
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
scan_type::sign
char sign
Definition: iio_types.h:153
iio_device_data::dev
void * dev
Definition: iio_types.h:227
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
device
Definition: ad9361_util.h:69
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:182
adc_iio_sw_trig_desc
struct iio_trigger adc_iio_sw_trig_desc
Definition: iio_adc_demo_trig.c:55
adc_demo_desc::ext_buff
uint16_t ** ext_buff
Definition: adc_demo.h:71
adc_channel_attributes
struct iio_attribute adc_channel_attributes[]
Definition: iio_adc_demo.c:235
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
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:52
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:76
adc_demo_desc::adc_global_attr
uint32_t adc_global_attr
Definition: adc_demo.h:63
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:136
ADC_GLOBAL_ATTR
@ ADC_GLOBAL_ATTR
Definition: adc_demo.h:91
IIO_DEMO_ADC_CHANNEL
#define IIO_DEMO_ADC_CHANNEL(_idx)
Definition: iio_adc_demo.c:245
ADC_DEMO_ATTR
#define ADC_DEMO_ATTR(_name, _priv)
Definition: iio_adc_demo.c:220
iio_buffer::size
uint32_t size
Definition: iio_types.h:213
adc_demo.h
Header file of ADC Demo Driver.
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
adc_demo_desc::adc_ch_attr
uint32_t adc_ch_attr[MAX_ADC_ADDR]
Definition: adc_demo.h:65
adc_demo_iio_descriptor
struct iio_device adc_demo_iio_descriptor
Definition: iio_adc_demo.c:275
adc_demo_desc::active_ch
uint32_t active_ch
Definition: adc_demo.h:67
adc_demo_desc::ext_buff_len
uint32_t ext_buff_len
Definition: adc_demo.h:69
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:157
iio_device_data::buffer
struct iio_buffer * buffer
Definition: iio_types.h:228
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:107
adc_scan_type
struct scan_type adc_scan_type
Definition: iio_adc_demo.c:227
iio_channel::attributes
struct iio_attribute * attributes
Definition: iio_types.h:186
iio_types.h
Header file for iio_types.
iio_device::num_ch
uint16_t num_ch
Definition: iio_types.h:252
update_adc_channels
int32_t update_adc_channels(void *dev, uint32_t mask)
active adc channels
Definition: adc_demo.c:116
adc_demo_desc
Definition: adc_demo.h:59
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
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:175
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:137
iio_adc_global_attributes
struct iio_attribute iio_adc_global_attributes[]
Definition: iio_adc_demo.c:240
sine_lut
const uint16_t sine_lut[128]
Definition: adc_demo.c:47
scan_type
Definition: iio_types.h:151
no_os_util.h
Header file of utility functions.
iio_device_data
Definition: iio_types.h:226
adc_demo_iio_descriptor
struct iio_device adc_demo_iio_descriptor
Definition: iio_adc_demo.c:275
iio_buffer_push_scan
int iio_buffer_push_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1434