precision-converters-firmware
|
Source file for for AD7134 No-OS driver support. More...
#include <stdio.h>
#include "ad7134_support.h"
#include "no_os_gpio.h"
#include "no_os_error.h"
#include "no_os_delay.h"
#include "app_config.h"
#include "ad7134_iio.h"
Macros | |
#define | GPIO_MIN_DBNCE_CNT (2U) |
#define | ODR_TRIGGER_WAIT_DBNCE_CNT (20000U) |
#define | DUAL_CHN_MODE_OFFSET (2) |
#define | LT6373_GPIO_DIR_CTRL_VAL 0xFF |
#define | LT6373_GPIO_DATA_VAL 0x84 |
#define | DCLK_FREQ_SELECT 5 |
#define | MCLK_FREQ (48000000) |
#define | MCLK_DIVISOR (2) |
#define | ODR_INT_VAL (uint32_t)(MCLK_FREQ / MCLK_DIVISOR / SAMPLING_RATE) |
#define | ODR_VAL_INT_LSB (uint8_t)(ODR_INT_VAL) |
#define | ODR_VAL_INT_MID (uint8_t)(ODR_INT_VAL >> 8) |
#define | ODR_VAL_INT_MSB (uint8_t)(ODR_INT_VAL >> 16) |
#define | ODR_VAL_FLT_LSB 0x00 |
#define | ODR_VAL_FLT_MID0 0x00 |
#define | ODR_VAL_FLT_MID1 0x00 |
#define | ODR_VAL_FLT_MSB 0x00 |
Functions | |
int32_t | ad7134_data_capture_init (struct ad713x_dev *dev) |
Perform the data capture initialization. More... | |
int32_t | ad7134_read_data (uint16_t *adc_data, uint8_t curr_chn) |
Read ADC data over DOUT0 and DOUT1 pins using bit-banging method. More... | |
int32_t | ad7134_read_tdm_data (uint16_t *adc_data, uint8_t curr_chn) |
Read ADC data over SAI TDM Peripheral. More... | |
int32_t | ad7134_read_all_channels (uint16_t *chn_data) |
Read all chahnnels over DOUT0 and DOUT1 pins using bit-banging method. More... | |
int32_t | ad7134_perform_conv_and_read_sample (uint8_t input_chn, uint16_t *adc_data) |
Read ADC single sample data. More... | |
Source file for for AD7134 No-OS driver support.
Copyright (c) 2023 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 DCLK_FREQ_SELECT 5 |
#define DUAL_CHN_MODE_OFFSET (2) |
#define GPIO_MIN_DBNCE_CNT (2U) |
#define LT6373_GPIO_DATA_VAL 0x84 |
#define LT6373_GPIO_DIR_CTRL_VAL 0xFF |
#define MCLK_DIVISOR (2) |
#define MCLK_FREQ (48000000) |
#define ODR_INT_VAL (uint32_t)(MCLK_FREQ / MCLK_DIVISOR / SAMPLING_RATE) |
#define ODR_TRIGGER_WAIT_DBNCE_CNT (20000U) |
#define ODR_VAL_FLT_LSB 0x00 |
#define ODR_VAL_FLT_MID0 0x00 |
#define ODR_VAL_FLT_MID1 0x00 |
#define ODR_VAL_FLT_MSB 0x00 |
#define ODR_VAL_INT_LSB (uint8_t)(ODR_INT_VAL) |
#define ODR_VAL_INT_MID (uint8_t)(ODR_INT_VAL >> 8) |
#define ODR_VAL_INT_MSB (uint8_t)(ODR_INT_VAL >> 16) |
int32_t ad7134_data_capture_init | ( | struct ad713x_dev * | dev | ) |
Perform the data capture initialization.
dev[in] | - AD7134 Device descriptor. |
This function configures the AD7134 registers to capture the data
int32_t ad7134_perform_conv_and_read_sample | ( | uint8_t | input_chn, |
uint16_t * | adc_data | ||
) |
Read ADC single sample data.
input_chn[in] | - Channel for which data is to read |
adc_data[out] | - Pointer to adc data read variable |
int32_t ad7134_read_all_channels | ( | uint16_t * | chn_data | ) |
Read all chahnnels over DOUT0 and DOUT1 pins using bit-banging method.
chn_data[out] | - Pointer to adc data read variable |
int32_t ad7134_read_data | ( | uint16_t * | adc_data, |
uint8_t | curr_chn | ||
) |
Read ADC data over DOUT0 and DOUT1 pins using bit-banging method.
adc_data[out] | - Pointer to adc data read variable |
curr_chn[in] | - Channel for which data is to read |
int32_t ad7134_read_tdm_data | ( | uint16_t * | adc_data, |
uint8_t | curr_chn | ||
) |
Read ADC data over SAI TDM Peripheral.
adc_data[out] | - Pointer to adc data read variable |
curr_chn[in] | - Channel for which data is to read |