precision-converters-firmware
|
AD738x IIO application interface module. More...
#include <stdbool.h>
#include <string.h>
#include <stdio.h>
#include "app_config.h"
#include "ad738x_iio.h"
#include "ad738x_user_config.h"
#include "common.h"
#include "iio.h"
#include "iio_types.h"
#include "iio_trigger.h"
#include "no_os_error.h"
#include "no_os_delay.h"
Macros | |
#define | AD738X_CHN_ATTR(_name, _priv) |
#define | AD738X_CH(_name, _idx, _type) |
#define | NUM_OF_IIO_DEVICES 1 |
#define | BYTES_PER_SAMPLE 2 |
#define | CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8) |
#define | AD738X_MIN_SAMPLING_FREQ (100 / ADC_CHANNELS) |
#define | AD738X_DEF_IIO_SCALE (ADC_REF_VOLTAGE / ADC_MAX_COUNT_BIPOLAR) * 1000 |
#define | AD738X_IIO_TRIGGER_NAME "ad738x_iio_trigger" |
#define | DATA_BUFFER_SIZE (32768) |
Enumerations | |
enum | ad738x_attribute_id { RAW_ATTR_ID , SCALE_ATTR_ID , OFFSET_ATTR_ID , SAMPLING_FREQ_ATTR_ID } |
Functions | |
int32_t | ad738x_trigger_handler (struct iio_device_data *iio_dev_data) |
Push data into IIO buffer when trigger handler IRQ is invoked. More... | |
int32_t | ad738x_iio_initialize (void) |
Initialize the IIO interface for AD738x IIO device. More... | |
void | ad738x_iio_event_handler (void) |
Run the AD738x IIO event handler. More... | |
Variables | |
struct ad738x_dev * | ad738x_dev_inst = NULL |
AD738x IIO application interface module.
Copyright (c) 2022-23 Analog Devices, Inc.
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 AD738X_CH | ( | _name, | |
_idx, | |||
_type | |||
) |
#define AD738X_CHN_ATTR | ( | _name, | |
_priv | |||
) |
#define AD738X_DEF_IIO_SCALE (ADC_REF_VOLTAGE / ADC_MAX_COUNT_BIPOLAR) * 1000 |
#define AD738X_IIO_TRIGGER_NAME "ad738x_iio_trigger" |
#define AD738X_MIN_SAMPLING_FREQ (100 / ADC_CHANNELS) |
#define BYTES_PER_SAMPLE 2 |
#define CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8) |
#define DATA_BUFFER_SIZE (32768) |
#define NUM_OF_IIO_DEVICES 1 |
enum ad738x_attribute_id |
void ad738x_iio_event_handler | ( | void | ) |
Run the AD738x IIO event handler.
This function monitors the new IIO client event
int32_t ad738x_iio_initialize | ( | void | ) |
Initialize the IIO interface for AD738x IIO device.
int32_t ad738x_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 |
struct ad738x_dev* ad738x_dev_inst = NULL |