#include <stdio.h>
#include <stdbool.h>
#include "ad713x.h"
Go to the source code of this file.
◆ AD7134_CONV_TIMEOUT
#define AD7134_CONV_TIMEOUT 10000 |
◆ AD713X_DATA_PACKET_CONFIG_DCLK_FREQ_MODE_RD
#define AD713X_DATA_PACKET_CONFIG_DCLK_FREQ_MODE_RD |
( |
|
x | ) |
(((x) >> 0) & 0xF) |
◆ AD713X_DATA_PACKET_CONFIG_FRAME_RD
#define AD713X_DATA_PACKET_CONFIG_FRAME_RD |
( |
|
x | ) |
(((x) >> 4) & 0x7) |
◆ AD713X_DEV_CONFIG_PWR_MODE_RD
#define AD713X_DEV_CONFIG_PWR_MODE_RD |
( |
|
x | ) |
(((x) >> 1) & 0x1) |
◆ AD713X_DIG_INT_CONFIG_FORMAT_MODE_RD
#define AD713X_DIG_INT_CONFIG_FORMAT_MODE_RD |
( |
|
x | ) |
(((x) >> 0) & 0x3) |
◆ AD713X_DIGFILTER_SEL_CH_MODE_RD
#define AD713X_DIGFILTER_SEL_CH_MODE_RD |
( |
|
x, |
|
|
|
ch |
|
) |
| (((x) >> (2 * ch)) & 0x3) |
◆ ad7134_data_capture_init()
int32_t ad7134_data_capture_init |
( |
struct ad713x_dev * |
dev | ) |
|
Perform the data capture initialization.
- Parameters
-
dev[in] | - AD7134 Device descriptor. |
- Returns
- 0 in case of success, negative error code otherwise
This function configures the AD7134 registers to capture the data
◆ ad7134_perform_conv_and_read_sample()
int32_t ad7134_perform_conv_and_read_sample |
( |
uint8_t |
input_chn, |
|
|
uint16_t * |
adc_data |
|
) |
| |
Read ADC single sample data.
- Parameters
-
input_chn[in] | - Channel for which data is to read |
adc_data[out] | - Pointer to adc data read variable |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad7134_read_all_channels()
int32_t ad7134_read_all_channels |
( |
uint16_t * |
chn_data | ) |
|
Read all chahnnels over DOUT0 and DOUT1 pins using bit-banging method.
- Parameters
-
chn_data[out] | - Pointer to adc data read variable |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad7134_read_data()
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.
- Parameters
-
adc_data[out] | - Pointer to adc data read variable |
curr_chn[in] | - Channel for which data is to read |
- Returns
- 0 in case of success, negative error code otherwise