precision-converters-firmware
|
Source file for the AD717x IIO Application. More...
#include <stdio.h>
#include <string.h>
#include "ad717x_user_config.h"
#include "app_config.h"
#include "ad717x_iio.h"
#include "ad717x.h"
#include "iio.h"
#include "no_os_util.h"
#include "no_os_error.h"
#include "common.h"
#include "iio_trigger.h"
#include "ad717x_support.h"
Macros | |
#define | AD717x_RESOLUTION 24 |
#define | ADC_MAX_COUNT_UNIPOLAR (uint32_t)((1 << AD717x_RESOLUTION) - 1) |
#define | ADC_MAX_COUNT_BIPOLAR (uint32_t)(1 << (AD717x_RESOLUTION-1)) |
#define | BYTES_PER_SAMPLE sizeof(uint32_t) |
#define | CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8) |
#define | AD717x_RAW_ATTR_ID 0 |
#define | AD717x_SCALE_ATTR_ID 1 |
#define | AD717x_OFFSET_ATTR_ID 2 |
#define | AD717x_SAMPLING_FREQUENCY_ID 3 |
#define | AD717x_DATA_BUFFER_SIZE (8192) |
#define | AD717x_SCAN |
#define | AD717x_CHANNEL(_name, _priv) |
#define | IIO_AD717x_CHANNEL(_idx) |
#define | DATA_BUFFER_SIZE (32768) |
#define | AD717X_IIO_TRIGGER_NAME "ad717x_iio_trigger" |
#define | NUM_OF_IIO_DEVICES 1 |
#define | AD717x_CONV_TIMEOUT 10000 |
Functions | |
int32_t | ad717x_trigger_cont_data_capture (void) |
Function to prepare the ADC for continuous capture. More... | |
int32_t | ad717x_stop_cont_data_capture (void) |
Function to stop continuous data capture. More... | |
int32_t | ad717x_trigger_handler (struct iio_device_data *iio_dev_data) |
int32_t | iio_ad717x_init (struct iio_device **desc) |
Init for reading/writing and parameterization of a AD717x IIO device. More... | |
int32_t | ad717x_iio_initialize (void) |
Initialize the AD717x IIO Interface. More... | |
void | ad717x_iio_event_handler (void) |
Run the AD717x IIO event handler. More... | |
Variables | |
int8_t | adc_data_buffer [DATA_BUFFER_SIZE] |
ad717x_dev * | p_ad717x_dev_inst = NULL |
Source file for the AD717x IIO Application.
Copyright (c) 2021-23 Analog Devices, Inc. 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 AD717x_CHANNEL | ( | _name, | |
_priv | |||
) |
#define AD717x_CONV_TIMEOUT 10000 |
#define AD717x_DATA_BUFFER_SIZE (8192) |
#define AD717X_IIO_TRIGGER_NAME "ad717x_iio_trigger" |
#define AD717x_OFFSET_ATTR_ID 2 |
#define AD717x_RAW_ATTR_ID 0 |
#define AD717x_RESOLUTION 24 |
#define AD717x_SAMPLING_FREQUENCY_ID 3 |
#define AD717x_SCALE_ATTR_ID 1 |
#define AD717x_SCAN |
#define ADC_MAX_COUNT_BIPOLAR (uint32_t)(1 << (AD717x_RESOLUTION-1)) |
#define ADC_MAX_COUNT_UNIPOLAR (uint32_t)((1 << AD717x_RESOLUTION) - 1) |
#define BYTES_PER_SAMPLE sizeof(uint32_t) |
#define CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8) |
#define DATA_BUFFER_SIZE (32768) |
#define IIO_AD717x_CHANNEL | ( | _idx | ) |
#define NUM_OF_IIO_DEVICES 1 |
void ad717x_iio_event_handler | ( | void | ) |
Run the AD717x IIO event handler.
int32_t ad717x_iio_initialize | ( | void | ) |
Initialize the AD717x IIO Interface.
int32_t ad717x_stop_cont_data_capture | ( | void | ) |
Function to stop continuous data capture.
int32_t ad717x_trigger_cont_data_capture | ( | void | ) |
Function to prepare the ADC for continuous capture.
int32_t ad717x_trigger_handler | ( | struct iio_device_data * | iio_dev_data | ) |
int32_t iio_ad717x_init | ( | struct iio_device ** | desc | ) |
Init for reading/writing and parameterization of a AD717x IIO device.
desc[in,out] | IIO device descriptor |
int8_t adc_data_buffer[DATA_BUFFER_SIZE] |
ad717x_dev* p_ad717x_dev_inst = NULL |