ecg7 2.0.0.0
|
API for configuring and manipulating ECG 7 Click driver. More...
Topics | |
ECG 7 Settings | |
Settings of ECG 7 Click driver. | |
ECG 7 MikroBUS Map | |
MikroBUS pin mapping of ECG 7 Click driver. | |
Functions | |
void | ecg7_cfg_setup (ecg7_cfg_t *cfg) |
ECG 7 configuration object setup function. | |
void | ecg7_drv_interface_selection (ecg7_cfg_t *cfg, ecg7_drv_t drv_sel) |
ECG 7 driver interface setup function. | |
err_t | ecg7_init (ecg7_t *ctx, ecg7_cfg_t *cfg) |
ECG 7 initialization function. | |
err_t | ecg7_read_raw_adc (ecg7_t *ctx, uint16_t *raw_adc) |
ECG 7 read raw ADC value function. | |
err_t | ecg7_read_voltage (ecg7_t *ctx, float *voltage) |
ECG 7 read voltage level function. | |
err_t | ecg7_set_vref (ecg7_t *ctx, float vref) |
ECG 7 set vref function. | |
API for configuring and manipulating ECG 7 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void ecg7_cfg_setup | ( | ecg7_cfg_t * | cfg | ) |
ECG 7 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ecg7_cfg_t object definition for detailed explanation. |
void ecg7_drv_interface_selection | ( | ecg7_cfg_t * | cfg, |
ecg7_drv_t | drv_sel ) |
ECG 7 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See ecg7_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See ecg7_drv_t object definition for detailed explanation. |
err_t ecg7_init | ( | ecg7_t * | ctx, |
ecg7_cfg_t * | cfg ) |
ECG 7 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ecg7_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ecg7_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ecg7_read_raw_adc | ( | ecg7_t * | ctx, |
uint16_t * | raw_adc ) |
ECG 7 read raw ADC value function.
This function reads raw ADC value.
[in] | ctx | : Click context object. See ecg7_t object definition for detailed explanation. |
[out] | raw_adc | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ecg7_read_voltage | ( | ecg7_t * | ctx, |
float * | voltage ) |
ECG 7 read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level.
[in] | ctx | : Click context object. See ecg7_t object definition for detailed explanation. |
[out] | voltage | : Output voltage level [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ecg7_set_vref | ( | ecg7_t * | ctx, |
float | vref ) |
ECG 7 set vref function.
This function sets the voltage reference for ECG 7 click driver.
[in] | ctx | : Click context object. See ecg7_t object definition for detailed explanation. |
[in] | vref | : Reference voltage (volts). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.