Go to the documentation of this file.
49 #define MAX_ADC_ADDR 16
51 #ifndef TOTAL_ADC_CHANNELS
52 #define TOTAL_ADC_CHANNELS 2
@ ADC_CHANNEL_ATTR
Definition: adc_demo.h:90
int32_t adc_demo_remove(struct adc_demo_desc *desc)
free allocated resources
Definition: adc_demo.c:100
int32_t adc_demo_init(struct adc_demo_desc **desc, struct adc_demo_init_param *param)
init function for the adc demo driver
Definition: adc_demo.c:76
uint32_t ext_buff_len
Definition: adc_demo.h:84
Header file of IRQ interface.
int32_t update_adc_channels(void *dev, uint32_t mask)
active adc channels
Definition: adc_demo.c:116
uint16_t ** ext_buff
Definition: adc_demo.h:86
uint16_t ** ext_buff
Definition: adc_demo.h:71
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
#define TOTAL_ADC_CHANNELS
Definition: adc_demo.h:52
uint32_t adc_global_attr
Definition: adc_demo.h:63
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
int32_t close_adc_channels(void *dev)
close all channels
Definition: adc_demo.c:136
@ ADC_GLOBAL_ATTR
Definition: adc_demo.h:91
Header file of ADC Demo Driver.
uint32_t adc_ch_attr[MAX_ADC_ADDR]
Definition: adc_demo.h:65
uint32_t active_ch
Definition: adc_demo.h:67
int32_t close_adc_channels(void *dev)
close all channels
Definition: adc_demo.c:136
uint32_t ext_buff_len
Definition: adc_demo.h:69
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_adc_demo_attributes
Definition: adc_demo.h:89
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
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
uint32_t dev_global_attr
Definition: adc_demo.h:80
int32_t update_adc_channels(void *dev, uint32_t mask)
active adc channels
Definition: adc_demo.c:116
Definition: adc_demo.h:59
int32_t adc_submit_samples(struct iio_device_data *dev_data)
function for reading samples from the device.
Definition: iio_adc_demo.c:137
uint8_t reg[MAX_ADC_ADDR]
Definition: adc_demo.h:61
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
uint32_t dev_ch_attr[MAX_ADC_ADDR]
Definition: adc_demo.h:82
const uint16_t sine_lut[128]
Definition: adc_demo.c:47
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
#define MAX_ADC_ADDR
Definition: adc_demo.h:49
int32_t adc_demo_init(struct adc_demo_desc **desc, struct adc_demo_init_param *param)
init function for the adc demo driver
Definition: adc_demo.c:76
int32_t adc_demo_remove(struct adc_demo_desc *desc)
free allocated resources
Definition: adc_demo.c:100
Header file of utility functions.
Definition: iio_types.h:226
Definition: adc_demo.h:78
const uint16_t sine_lut[128]
Definition: adc_demo.c:47