ecg7 2.0.0.0
ecg7.h File Reference

This file contains API for ECG 7 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_analog_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  ecg7_t
 ECG 7 Click context object. More...
 
struct  ecg7_cfg_t
 ECG 7 Click configuration object. More...
 

Macros

#define ECG7_ADC_RESOLUTION   0x0FFF
 ECG 7 ADC setting.
 
#define ECG7_VREF_3V3   3.3
 
#define ECG7_VREF_5V   5.0
 
#define ECG7_SET_DEV_ADDR   0x4D
 ECG 7 device address setting.
 
#define ECG7_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  ecg7_drv_t { ECG7_DRV_SEL_ADC , ECG7_DRV_SEL_I2C }
 ECG 7 Click driver selector. More...
 
enum  ecg7_return_value_t { ECG7_OK = 0 , ECG7_ERROR = -1 }
 ECG 7 Click return value data. More...
 

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.
 

Detailed Description

This file contains API for ECG 7 Click Driver.

Enumeration Type Documentation

◆ ecg7_drv_t

enum ecg7_drv_t

ECG 7 Click driver selector.

Selects target driver interface of ECG 7 Click driver.

Enumerator
ECG7_DRV_SEL_ADC 

ADC driver descriptor.

ECG7_DRV_SEL_I2C 

I2C driver descriptor.

◆ ecg7_return_value_t

ECG 7 Click return value data.

Predefined enum values for driver return values.

Enumerator
ECG7_OK 
ECG7_ERROR