#include <errno.h>
#include "no_os_util.h"
#include "ad7124.h"
Go to the source code of this file.
|
int | ad7124_get_polarity (struct ad7124_dev *dev, uint8_t chn, enum ad7124_input_polarity *polarity) |
| Get the polarity of input channel. More...
|
|
int | ad7124_single_read (struct ad7124_dev *device, uint8_t id, int32_t *adc_raw_data) |
| Perform Single Conversion. More...
|
|
int | ad7124_read_converted_data (struct ad7124_dev *dev, uint32_t *sd_adc_code) |
| Read ADC Converted data. More...
|
|
int | ad7124_trigger_data_capture (struct ad7124_dev *ad7124_dev_inst) |
| Function to prepare the ADC for data capture. More...
|
|
int | ad7124_enable_cont_read (struct ad7124_dev *device, bool cont_read_en) |
| Enable/Disable continuous read mode. More...
|
|
int | ad7124_stop_data_capture (struct ad7124_dev *ad7124_dev_inst) |
| Function to stop data capture. More...
|
|
int | ad7124_get_3db_frequency (struct ad7124_dev *ad7124_dev_inst, uint8_t chn, uint16_t *frequency) |
| Get the 3db cutoff frequency. More...
|
|
int | ad7124_set_3db_frequency (struct ad7124_dev *ad7124_dev_inst, uint8_t chn, uint16_t frequency) |
| Set the 3db cutoff frequency. More...
|
|
int | ad7124_update_sampling_rate (struct ad7124_dev *ad7124_dev_inst, uint16_t *frequency) |
| Update Sampling rate when more than one channel is enabled. More...
|
|
◆ AD7124_CONV_TIMEOUT
#define AD7124_CONV_TIMEOUT 1000000 |
◆ ad7124_input_polarity
Enumerator |
---|
AD7124_UNIPOLAR | |
AD7124_BIPOLAR | |
◆ ad7124_enable_cont_read()
int ad7124_enable_cont_read |
( |
struct ad7124_dev * |
device, |
|
|
bool |
cont_read_en |
|
) |
| |
Enable/Disable continuous read mode.
- Parameters
-
device[in] | - The AD7124 Device descriptor |
cont_read_en[in] | - Continuous read enable status (True/False) |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad7124_get_3db_frequency()
int ad7124_get_3db_frequency |
( |
struct ad7124_dev * |
ad7124_dev_inst, |
|
|
uint8_t |
chn, |
|
|
uint16_t * |
frequency |
|
) |
| |
Get the 3db cutoff frequency.
- Parameters
-
ad7124_dev_inst[in] | - AD7124 device instance. |
chn[in] | - Input channel. |
frequency[in,out] | - Frequency. |
- Returns
- 0 in case of success, negative error code otherwise.
◆ ad7124_get_polarity()
Get the polarity of input channel.
- Parameters
-
dev[in] | - AD7124 device instance |
chn[in] | - Input channel |
polarity[in,out] | - Channel polarity |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad7124_read_converted_data()
int ad7124_read_converted_data |
( |
struct ad7124_dev * |
dev, |
|
|
uint32_t * |
sd_adc_code |
|
) |
| |
Read ADC Converted data.
- Parameters
-
dev[in] | - The AD7124 Device descriptor |
sd_adc_code[in,out] | - Converted Sample |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad7124_set_3db_frequency()
int ad7124_set_3db_frequency |
( |
struct ad7124_dev * |
ad7124_dev_inst, |
|
|
uint8_t |
chn, |
|
|
uint16_t |
frequency |
|
) |
| |
Set the 3db cutoff frequency.
- Parameters
-
ad7124_dev_inst[in] | - AD7124 device instance. |
chn[in] | - Input channel. |
frequency[in] | - Frequency |
- Returns
- 0 in case of success, negative error code otherwise.
◆ ad7124_single_read()
int ad7124_single_read |
( |
struct ad7124_dev * |
device, |
|
|
uint8_t |
id, |
|
|
int32_t * |
adc_raw_data |
|
) |
| |
Perform Single Conversion.
- Parameters
-
device[in] | - AD7124 Device Descriptor |
id[in] | - Channel ID (number) requested |
adc_raw_data[out] | ADC Raw Value |
- Returns
- 0 in case of success, negative error code otherwise.
◆ ad7124_stop_data_capture()
int ad7124_stop_data_capture |
( |
struct ad7124_dev * |
ad7124_dev_inst | ) |
|
Function to stop data capture.
- Parameters
-
ad7124_dev_inst[in] | - AD7124 device instance |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad7124_trigger_data_capture()
int ad7124_trigger_data_capture |
( |
struct ad7124_dev * |
ad7124_dev_inst | ) |
|
Function to prepare the ADC for data capture.
- Parameters
-
ad7124_dev_inst[in] | - AD7124 device instance |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad7124_update_sampling_rate()
int ad7124_update_sampling_rate |
( |
struct ad7124_dev * |
ad7124_dev_inst, |
|
|
uint16_t * |
frequency |
|
) |
| |
Update Sampling rate when more than one channel is enabled.
- Parameters
-
ad7124_dev_inst[in] | - AD7124 device instance. |
frequency | - Updated Frequency. |
- Returns
- 0 in case of success, negative error code otherwise.