no-OS
|
Implementation of iio_dac_demo. More...
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include "no_os_error.h"
#include "no_os_util.h"
#include "iio_dac_demo.h"
#include "iio.h"
Macros | |
#define | DAC_DEMO_ATTR(_name, _priv) |
#define | IIO_DEMO_DAC_CHANNEL(_idx) |
Functions | |
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. More... | |
int32_t | dac_submit_samples (struct iio_device_data *dev_data) |
function for writing samples to the device. More... | |
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. More... | |
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. More... | |
Variables | |
struct scan_type | dac_scan_type |
struct iio_attribute | dac_channel_attributes [] |
struct iio_attribute | dac_global_attributes [] |
struct iio_device | dac_demo_iio_descriptor |
Implementation of iio_dac_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 DAC_DEMO_ATTR | ( | _name, | |
_priv | |||
) |
#define IIO_DEMO_DAC_CHANNEL | ( | _idx | ) |
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.
dev_data | - The iio device data structure. |
int32_t dac_submit_samples | ( | struct iio_device_data * | dev_data | ) |
function for writing samples to the device.
dev_data | - The iio device data structure. |
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.
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_dac_demo_attr | ( | void * | device, |
char * | buf, | ||
uint32_t | len, | ||
const struct iio_ch_info * | channel, | ||
intptr_t | attr_id | ||
) |
set attributes for dac.
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 dac_channel_attributes[] |
struct iio_device dac_demo_iio_descriptor |
struct iio_attribute dac_global_attributes[] |
struct scan_type dac_scan_type |