39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_analog_in.h"
52#include "drv_i2c_master.h"
74#define ECG7_ADC_RESOLUTION 0x0FFF
75#define ECG7_VREF_3V3 3.3
76#define ECG7_VREF_5V 5.0
83#define ECG7_SET_DEV_ADDR 0x4D
101#define ECG7_MAP_MIKROBUS( cfg, mikrobus ) \
102 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
103 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
104 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA );
ecg7_drv_t
ECG 7 Click driver selector.
Definition ecg7.h:114
@ ECG7_DRV_SEL_I2C
Definition ecg7.h:116
@ ECG7_DRV_SEL_ADC
Definition ecg7.h:115
ecg7_return_value_t
ECG 7 Click return value data.
Definition ecg7.h:161
@ ECG7_OK
Definition ecg7.h:162
@ ECG7_ERROR
Definition ecg7.h:163
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_voltage(ecg7_t *ctx, float *voltage)
ECG 7 read voltage level function.
void ecg7_cfg_setup(ecg7_cfg_t *cfg)
ECG 7 configuration object setup function.
err_t ecg7_read_raw_adc(ecg7_t *ctx, uint16_t *raw_adc)
ECG 7 read raw ADC value function.
err_t ecg7_set_vref(ecg7_t *ctx, float vref)
ECG 7 set vref function.
ECG 7 Click configuration object.
Definition ecg7.h:141
ecg7_drv_t drv_sel
Definition ecg7.h:152
analog_in_resolution_t resolution
Definition ecg7.h:146
float vref
Definition ecg7.h:147
uint32_t i2c_speed
Definition ecg7.h:149
pin_name_t scl
Definition ecg7.h:143
pin_name_t sda
Definition ecg7.h:144
pin_name_t an
Definition ecg7.h:142
uint8_t i2c_address
Definition ecg7.h:150
ECG 7 Click context object.
Definition ecg7.h:125
ecg7_drv_t drv_sel
Definition ecg7.h:132
float vref
Definition ecg7.h:131
i2c_master_t i2c
Definition ecg7.h:127
uint8_t slave_address
Definition ecg7.h:129
pin_name_t chip_select
Definition ecg7.h:130
analog_in_t adc
Definition ecg7.h:126