precision-converters-firmware
|
Implementation of AD7689 IIO application interfaces. More...
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include "ad7689_iio.h"
#include "app_config.h"
#include "ad7689_user_config.h"
#include "ad7689_support.h"
#include "common.h"
#include "no_os_error.h"
#include "no_os_delay.h"
#include "iio_trigger.h"
Macros | |
#define | ADC_DEFAULT_SCALE ((ADC_DEFAULT_REF_VOLTAGE / ADC_MAX_COUNT_UNIPOLAR) * 1000) |
#define | TEMPERATURE_SENSITIVITY 0.283 |
#define | ROOM_TEMPERATURE 25.0 |
#define | TEMPERATURE_CONV_SCALE |
#define | NUM_OF_IIO_DEVICES 1 |
#define | AD7689_IIO_TRIGGER_NAME "ad7689_iio_trigger" |
#define | BYTES_PER_SAMPLE sizeof(uint16_t) |
#define | CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8) |
#define | IIO_RAW_ATTR_ID 0 |
#define | IIO_SCALE_ATTR_ID 1 |
#define | IIO_OFFSET_ATTR_ID 2 |
#define | END_OF_CHN 0xff |
#define | DATA_BUFFER_SIZE (32768) |
Functions | |
int32_t | iio_ad7689_trigger_handler (struct iio_device_data *iio_dev_data) |
Push data into IIO buffer when trigger handler IRQ is invoked. More... | |
int32_t | ad7689_iio_initialize (void) |
Initialize the IIO interface for AD7689 IIO device. More... | |
void | ad7689_iio_event_handler (void) |
Run the AD7689 IIO event handler. More... | |
Variables | |
struct ad7689_dev * | p_ad7689_dev_inst = NULL |
struct ad7689_config | ad7689_current_config |
struct iio_attribute | channel_input_attributes [] |
struct scan_type | chn_scan |
Implementation of AD7689 IIO application interfaces.
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 AD7689_IIO_TRIGGER_NAME "ad7689_iio_trigger" |
#define ADC_DEFAULT_SCALE ((ADC_DEFAULT_REF_VOLTAGE / ADC_MAX_COUNT_UNIPOLAR) * 1000) |
#define BYTES_PER_SAMPLE sizeof(uint16_t) |
#define CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8) |
#define DATA_BUFFER_SIZE (32768) |
#define END_OF_CHN 0xff |
#define IIO_OFFSET_ATTR_ID 2 |
#define IIO_RAW_ATTR_ID 0 |
#define IIO_SCALE_ATTR_ID 1 |
#define NUM_OF_IIO_DEVICES 1 |
#define ROOM_TEMPERATURE 25.0 |
#define TEMPERATURE_CONV_SCALE |
#define TEMPERATURE_SENSITIVITY 0.283 |
void ad7689_iio_event_handler | ( | void | ) |
Run the AD7689 IIO event handler.
This function monitors the new IIO client event
int32_t ad7689_iio_initialize | ( | void | ) |
Initialize the IIO interface for AD7689 IIO device.
int32_t iio_ad7689_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 ad7689_config ad7689_current_config |
struct iio_attribute channel_input_attributes[] |
struct scan_type chn_scan |
struct ad7689_dev* p_ad7689_dev_inst = NULL |