heartrate7 2.0.0.0
heartrate7.h File Reference

This file contains API for Heart Rate 7 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  heartrate7_t
 Heart Rate 7 Click context object. More...
 
struct  heartrate7_cfg_t
 Heart Rate 7 Click configuration object. More...
 

Macros

#define HEARTRATE7_REG0H   0x00
 Heart Rate 7 description register.
 
#define HEARTRATE7_REG1H   0x01
 
#define HEARTRATE7_REG2H   0x02
 
#define HEARTRATE7_REG3H   0x03
 
#define HEARTRATE7_REG4H   0x04
 
#define HEARTRATE7_REG5H   0x05
 
#define HEARTRATE7_REG6H   0x06
 
#define HEARTRATE7_REG7H   0x07
 
#define HEARTRATE7_REG8H   0x08
 
#define HEARTRATE7_REG9H   0x09
 
#define HEARTRATE7_REGAH   0x0A
 
#define HEARTRATE7_REGBH   0x0B
 
#define HEARTRATE7_REGCH   0x0C
 
#define HEARTRATE7_REGDH   0x0D
 
#define HEARTRATE7_REGEH   0x0E
 
#define HEARTRATE7_REGFH   0x0F
 
#define HEARTRATE7_REG10H   0x10
 
#define HEARTRATE7_REG11H   0x11
 
#define HEARTRATE7_REG12H   0x12
 
#define HEARTRATE7_REG13H   0x13
 
#define HEARTRATE7_REG14H   0x14
 
#define HEARTRATE7_REG15H   0x15
 
#define HEARTRATE7_REG16H   0x16
 
#define HEARTRATE7_REG17H   0x17
 
#define HEARTRATE7_REG18H   0x18
 
#define HEARTRATE7_REG19H   0x19
 
#define HEARTRATE7_REG1AH   0x1A
 
#define HEARTRATE7_REG1BH   0x1B
 
#define HEARTRATE7_REG1CH   0x1C
 
#define HEARTRATE7_REG1DH   0x1D
 
#define HEARTRATE7_REG1EH   0x1E
 
#define HEARTRATE7_REG20H   0x20
 
#define HEARTRATE7_REG21H   0x21
 
#define HEARTRATE7_REG22H   0x22
 
#define HEARTRATE7_REG23H   0x23
 
#define HEARTRATE7_REG29H   0x29
 
#define HEARTRATE7_REG2AH   0x2A
 
#define HEARTRATE7_REG2BH   0x2B
 
#define HEARTRATE7_REG2CH   0x2C
 
#define HEARTRATE7_REG2DH   0x2D
 
#define HEARTRATE7_REG2EH   0x2E
 
#define HEARTRATE7_REG2FH   0x2F
 
#define HEARTRATE7_REG31H   0x31
 
#define HEARTRATE7_REG32H   0x32
 Heart Rate 7 timing controls for dynamic power-down registers.
 
#define HEARTRATE7_REG33H   0x33
 
#define HEARTRATE7_REG34H   0x34
 
#define HEARTRATE7_REG35H   0x35
 
#define HEARTRATE7_REG36H   0x36
 Heart Rate 7 Timing controls for driving the third LED registers.
 
#define HEARTRATE7_REG37H   0x37
 
#define HEARTRATE7_REG39H   0x39
 
#define HEARTRATE7_REG3AH   0x3A
 
#define HEARTRATE7_REG3DH   0x3D
 
#define HEARTRATE7_REG3FH   0x3F
 
#define HEARTRATE7_REG40H   0x40
 
#define HEARTRATE7_SET_DEV_ADDR   0x58
 Heart Rate 7 device address setting.
 
#define HEARTRATE7_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  heartrate7_return_value_t { HEARTRATE7_OK = 0 , HEARTRATE7_ERROR = -1 }
 Heart Rate 7 Click return value data. More...
 

Functions

void heartrate7_cfg_setup (heartrate7_cfg_t *cfg)
 Heart Rate 7 configuration object setup function.
 
err_t heartrate7_init (heartrate7_t *ctx, heartrate7_cfg_t *cfg)
 Heart Rate 7 initialization 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_generic_read (heartrate7_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 Heart Rate 7 I2C reading function.
 
void heartrate7_write_reg (heartrate7_t *ctx, uint8_t reg_addr, uint32_t write_data)
 Heart Rate 7 register writing function.
 
uint32_t heartrate7_read_reg (heartrate7_t *ctx, uint8_t reg_addr)
 Heart Rate 7 register reading function.
 
void heartrate7_hw_reset (heartrate7_t *ctx)
 Heart Rate 7 hardware reset function.
 
void heartrate7_sw_reset (heartrate7_t *ctx)
 Heart Rate 7 software reset function.
 
uint32_t heartrate7_get_led2_val (heartrate7_t *ctx)
 Heart Rate 7 get LED2 data function.
 
uint32_t heartrate7_get_aled2_val_led3v_al (heartrate7_t *ctx)
 Heart Rate 7 get ALED2 data function.
 
uint32_t heartrate7_get_led1_val (heartrate7_t *ctx)
 Heart Rate 7 get LED1 data function.
 
uint32_t heartrate7_get_aled1_val (heartrate7_t *ctx)
 Heart Rate 7 get ALED1 data function.
 
uint32_t heartrate7_get_led2_aled2_val (heartrate7_t *ctx)
 Heart Rate 7 get LED2_ALED2 data function.
 
uint32_t heartrate7_get_led1_aled1_val (heartrate7_t *ctx)
 Heart Rate 7 get LED1_ALED1 data function.
 

Detailed Description

This file contains API for Heart Rate 7 Click Driver.

Enumeration Type Documentation

◆ heartrate7_return_value_t

Heart Rate 7 Click return value data.

Predefined enum values for driver return values.

Enumerator
HEARTRATE7_OK 
HEARTRATE7_ERROR