no-OS
|
Implementation of iio_adc_demo. More...
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include "no_os_error.h"
#include "no_os_util.h"
#include "iio_adc_demo.h"
#include "iio.h"
Macros | |
#define | ADC_DEMO_ATTR(_name, _priv) |
#define | IIO_DEMO_ADC_CHANNEL(_idx) |
Functions | |
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. More... | |
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. More... | |
int32_t | adc_submit_samples (struct iio_device_data *dev_data) |
function for reading samples from the device. More... | |
int32_t | adc_demo_trigger_handler (struct iio_device_data *dev_data) |
Handles trigger: reads one data-set and writes it to the buffer. More... | |
Variables | |
struct scan_type | adc_scan_type |
struct iio_attribute | adc_channel_attributes [] |
struct iio_attribute | iio_adc_global_attributes [] |
struct iio_device | adc_demo_iio_descriptor |
Implementation of iio_adc_demo.
Copyright 2021(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define ADC_DEMO_ATTR | ( | _name, | |
_priv | |||
) |
#define IIO_DEMO_ADC_CHANNEL | ( | _idx | ) |
int32_t adc_demo_trigger_handler | ( | struct iio_device_data * | dev_data | ) |
Handles trigger: reads one data-set and writes it to the buffer.
dev_data | - The iio device data structure. |
int32_t adc_submit_samples | ( | struct iio_device_data * | dev_data | ) |
function for reading samples from the device.
dev_data | - The iio device data structure. |
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.
device- | Physical instance of a iio_demo_device. |
buf | - Where value is stored. |
len | - Maximum length of value to be stored in buf. |
channel | - Channel properties. |
attr_id | - Attribute ID |
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.
device | - Physical instance of a iio_demo_device. |
buf | - Value to be written to attribute. |
len | - Length of the data in "buf". |
channel | - Channel properties. |
attr_id | - Attribute ID |
struct iio_attribute adc_channel_attributes[] |
struct iio_device adc_demo_iio_descriptor |
struct scan_type adc_scan_type |
struct iio_attribute iio_adc_global_attributes[] |