precision-converters-firmware
|
Implementation of AD2S1210 IIO application interfaces. More...
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include "iio.h"
#include "iio_trigger.h"
#include "ad2s1210_iio.h"
#include "app_config.h"
#include "ad2s1210_user_config.h"
#include "common.h"
#include "no_os_error.h"
#include "no_os_util.h"
Macros | |
#define | AD2S1210_CHN_ATTR(_name, _priv) |
#define | AD2S1210_CH(_name, _idx, _type, _ch_out) |
#define | NUM_OF_IIO_DEVICES 1 |
#define | BYTES_PER_SAMPLE 2 |
#define | CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8) |
#define | AD2S1210_IIO_TRIGGER_NAME "ad2s1210_iio_trigger" |
#define | DATA_BUFFER_SIZE (32768) /* 32kbytes */ |
Enumerations | |
enum | ad2s1210_attribute_id { RAW_ATTR_ID , SCALE_ATTR_ID , SAMPLING_FREQ_ATTR_ID , LABEL_ATTR_ID , HYSTERESIS_ATTR_ID , HYSTERESIS_AVAILABLE_ATTR_ID , FREQ_ATTR_ID , FREQ_AVAIL_ATTR_ID } |
Functions | |
int32_t | ad2s1210_trigger_handler (struct iio_device_data *iio_dev_data) |
Push data into IIO buffer when trigger handler IRQ is invoked. More... | |
int32_t | ad2s1210_iio_initialize (void) |
Initialize the IIO interface for AD2S1210 IIO device. More... | |
void | ad2s1210_iio_event_handler (void) |
Run the AD2S1210 IIO event handler. More... | |
Variables | |
struct ad2s1210_dev * | ad2s1210_dev_inst |
uint32_t | active_chn_count |
struct scan_type | chn_scan [RESOLVER_CHANNELS] |
Implementation of AD2S1210 IIO application interfaces.
Copyright (c) 2023 Analog Devices, Inc. Copyright (c) 2023 BayLibre, SAS. All rights reserved.
This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.
#define AD2S1210_CH | ( | _name, | |
_idx, | |||
_type, | |||
_ch_out | |||
) |
#define AD2S1210_CHN_ATTR | ( | _name, | |
_priv | |||
) |
#define AD2S1210_IIO_TRIGGER_NAME "ad2s1210_iio_trigger" |
#define BYTES_PER_SAMPLE 2 |
#define CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8) |
#define DATA_BUFFER_SIZE (32768) /* 32kbytes */ |
#define NUM_OF_IIO_DEVICES 1 |
void ad2s1210_iio_event_handler | ( | void | ) |
Run the AD2S1210 IIO event handler.
This function monitors the new IIO client event
int32_t ad2s1210_iio_initialize | ( | void | ) |
Initialize the IIO interface for AD2S1210 IIO device.
int32_t ad2s1210_trigger_handler | ( | struct iio_device_data * | iio_dev_data | ) |
Push data into IIO buffer when trigger handler IRQ is invoked.
iio_dev_data[in] | - IIO device data instance |
uint32_t active_chn_count |
struct ad2s1210_dev* ad2s1210_dev_inst |
struct scan_type chn_scan[RESOLVER_CHANNELS] |