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_i2c_master.h"
78#define HEARTRATE7_REG0H 0x00
79#define HEARTRATE7_REG1H 0x01
80#define HEARTRATE7_REG2H 0x02
81#define HEARTRATE7_REG3H 0x03
82#define HEARTRATE7_REG4H 0x04
83#define HEARTRATE7_REG5H 0x05
84#define HEARTRATE7_REG6H 0x06
85#define HEARTRATE7_REG7H 0x07
86#define HEARTRATE7_REG8H 0x08
87#define HEARTRATE7_REG9H 0x09
88#define HEARTRATE7_REGAH 0x0A
89#define HEARTRATE7_REGBH 0x0B
90#define HEARTRATE7_REGCH 0x0C
91#define HEARTRATE7_REGDH 0x0D
92#define HEARTRATE7_REGEH 0x0E
93#define HEARTRATE7_REGFH 0x0F
94#define HEARTRATE7_REG10H 0x10
95#define HEARTRATE7_REG11H 0x11
96#define HEARTRATE7_REG12H 0x12
97#define HEARTRATE7_REG13H 0x13
98#define HEARTRATE7_REG14H 0x14
99#define HEARTRATE7_REG15H 0x15
100#define HEARTRATE7_REG16H 0x16
101#define HEARTRATE7_REG17H 0x17
102#define HEARTRATE7_REG18H 0x18
103#define HEARTRATE7_REG19H 0x19
104#define HEARTRATE7_REG1AH 0x1A
105#define HEARTRATE7_REG1BH 0x1B
106#define HEARTRATE7_REG1CH 0x1C
107#define HEARTRATE7_REG1DH 0x1D
108#define HEARTRATE7_REG1EH 0x1E
109#define HEARTRATE7_REG20H 0x20
110#define HEARTRATE7_REG21H 0x21
111#define HEARTRATE7_REG22H 0x22
112#define HEARTRATE7_REG23H 0x23
113#define HEARTRATE7_REG29H 0x29
114#define HEARTRATE7_REG2AH 0x2A
115#define HEARTRATE7_REG2BH 0x2B
116#define HEARTRATE7_REG2CH 0x2C
117#define HEARTRATE7_REG2DH 0x2D
118#define HEARTRATE7_REG2EH 0x2E
119#define HEARTRATE7_REG2FH 0x2F
120#define HEARTRATE7_REG31H 0x31
127#define HEARTRATE7_REG32H 0x32
128#define HEARTRATE7_REG33H 0x33
129#define HEARTRATE7_REG34H 0x34
130#define HEARTRATE7_REG35H 0x35
137#define HEARTRATE7_REG36H 0x36
138#define HEARTRATE7_REG37H 0x37
139#define HEARTRATE7_REG39H 0x39
140#define HEARTRATE7_REG3AH 0x3A
141#define HEARTRATE7_REG3DH 0x3D
142#define HEARTRATE7_REG3FH 0x3F
143#define HEARTRATE7_REG40H 0x40
162#define HEARTRATE7_SET_DEV_ADDR 0x58
180#define HEARTRATE7_MAP_MIKROBUS( cfg, mikrobus ) \
181 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
182 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
183 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
184 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
void heartrate7_hw_reset(heartrate7_t *ctx)
Heart Rate 7 hardware reset function.
uint32_t heartrate7_get_led1_val(heartrate7_t *ctx)
Heart Rate 7 get LED1 data function.
err_t heartrate7_default_cfg(heartrate7_t *ctx)
Heart Rate 7 default configuration function.
err_t heartrate7_generic_write(heartrate7_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
Heart Rate 7 I2C writing function.
err_t heartrate7_init(heartrate7_t *ctx, heartrate7_cfg_t *cfg)
Heart Rate 7 initialization function.
uint32_t heartrate7_read_reg(heartrate7_t *ctx, uint8_t reg_addr)
Heart Rate 7 register reading function.
err_t heartrate7_generic_read(heartrate7_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
Heart Rate 7 I2C reading function.
uint32_t heartrate7_get_led2_aled2_val(heartrate7_t *ctx)
Heart Rate 7 get LED2_ALED2 data function.
uint32_t heartrate7_get_led2_val(heartrate7_t *ctx)
Heart Rate 7 get LED2 data function.
uint32_t heartrate7_get_led1_aled1_val(heartrate7_t *ctx)
Heart Rate 7 get LED1_ALED1 data function.
uint32_t heartrate7_get_aled1_val(heartrate7_t *ctx)
Heart Rate 7 get ALED1 data function.
void heartrate7_sw_reset(heartrate7_t *ctx)
Heart Rate 7 software reset function.
void heartrate7_cfg_setup(heartrate7_cfg_t *cfg)
Heart Rate 7 configuration object setup function.
uint32_t heartrate7_get_aled2_val_led3v_al(heartrate7_t *ctx)
Heart Rate 7 get ALED2 data function.
void heartrate7_write_reg(heartrate7_t *ctx, uint8_t reg_addr, uint32_t write_data)
Heart Rate 7 register writing function.
heartrate7_return_value_t
Heart Rate 7 Click return value data.
Definition heartrate7.h:231
@ HEARTRATE7_OK
Definition heartrate7.h:232
@ HEARTRATE7_ERROR
Definition heartrate7.h:233
Heart Rate 7 Click configuration object.
Definition heartrate7.h:214
uint32_t i2c_speed
Definition heartrate7.h:221
pin_name_t scl
Definition heartrate7.h:215
pin_name_t int_pin
Definition heartrate7.h:219
pin_name_t sda
Definition heartrate7.h:216
pin_name_t rst
Definition heartrate7.h:218
uint8_t i2c_address
Definition heartrate7.h:222
Heart Rate 7 Click context object.
Definition heartrate7.h:194
digital_in_t int_pin
Definition heartrate7.h:199
i2c_master_t i2c
Definition heartrate7.h:202
digital_out_t rst
Definition heartrate7.h:196
uint8_t slave_address
Definition heartrate7.h:205