precision-converters-firmware
|
Implementation of AD5754R IIO application interfaces. More...
#include <stdlib.h>
#include <string.h>
#include "app_config.h"
#include "ad5754r_iio.h"
#include "ad5754r_user_config.h"
#include "cn0586_support.h"
#include "common.h"
#include "no_os_error.h"
#include "no_os_util.h"
#include "no_os_delay.h"
#include "no_os_gpio.h"
#include "no_os_pwm.h"
#include "no_os_alloc.h"
#include "iio_trigger.h"
Macros | |
#define | AD5754R_IIO_TRIGGER_NAME "ad5754r_iio_trigger" |
#define | AD5754R_CHN_ATTR(_name, _priv) |
#define | AD5754R_CHN_AVAIL_ATTR(_name, _priv) |
#define | CN0586_CHN_ATTR(_name, _priv) |
#define | CN0586_CHN_AVAIL_ATTR(_name, _priv) |
#define | AD5754R_DAC_CH(_name, _idx) |
#define | NUM_OF_IIO_DEVICES 2 |
#define | BYTES_PER_SAMPLE sizeof(uint16_t) |
#define | CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8) |
#define | BYTE_SIZE (uint32_t)8 |
#define | BYTE_MASK (uint32_t)0xff |
#define | DATA_BUFFER_SIZE (32768) |
#define | AD5754R_ATTRS_OFFSET 6 |
Enumerations | |
enum | ad5754r_attribute_ids { HVOUT_STATE , HVOUT_RANGE , HVOUT_VOLTS , DAC_CH_RAW , DAC_CH_REG , DAC_CH_SCALE , DAC_CH_OFFSET , DAC_CH_POWERUP , DAC_CH_RANGE , DAC_INT_REF_POWERUP , DAC_CLEAR_SETTING , DAC_SDO_DIS , DAC_UPDATE_RATE , DAC_CLAMP_EN , DAC_TSD_EN , DAC_OC_TSD , DAC_ALL_CH_CLR , DAC_SW_LDAC , DAC_HW_LDAC } |
Functions | |
int | ad5754r_reconfig_ldac (struct ad5754r_dev *device) |
Reconfigure LDAC pin as GPIO output. More... | |
int32_t | ad5754r_iio_init (void) |
Initialize the IIO interface for AD5754R IIO device. More... | |
void | ad5754r_iio_event_handler (void) |
Run the AD5754r IIO event handler. More... | |
Variables | |
struct cn0586_dev * | cn0586_dev_inst = NULL |
struct ad5754r_dev * | ad5754r_dev_inst = NULL |
struct scan_type | iio_ad5754r_scan_type |
Implementation of AD5754R IIO application interfaces.
Copyright (c) 2024 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 AD5754R_ATTRS_OFFSET 6 |
#define AD5754R_CHN_ATTR | ( | _name, | |
_priv | |||
) |
#define AD5754R_CHN_AVAIL_ATTR | ( | _name, | |
_priv | |||
) |
#define AD5754R_DAC_CH | ( | _name, | |
_idx | |||
) |
#define AD5754R_IIO_TRIGGER_NAME "ad5754r_iio_trigger" |
#define BYTE_MASK (uint32_t)0xff |
#define BYTE_SIZE (uint32_t)8 |
#define BYTES_PER_SAMPLE sizeof(uint16_t) |
#define CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8) |
#define CN0586_CHN_ATTR | ( | _name, | |
_priv | |||
) |
#define CN0586_CHN_AVAIL_ATTR | ( | _name, | |
_priv | |||
) |
#define DATA_BUFFER_SIZE (32768) |
#define NUM_OF_IIO_DEVICES 2 |
void ad5754r_iio_event_handler | ( | void | ) |
Run the AD5754r IIO event handler.
This function monitors the new IIO client event.
int32_t ad5754r_iio_init | ( | void | ) |
Initialize the IIO interface for AD5754R IIO device.
int ad5754r_reconfig_ldac | ( | struct ad5754r_dev * | device | ) |
Reconfigure LDAC pin as GPIO output.
device[in] | - AD5754R device instance |
struct ad5754r_dev* ad5754r_dev_inst = NULL |
struct cn0586_dev* cn0586_dev_inst = NULL |
struct scan_type iio_ad5754r_scan_type |