heartrate5 2.0.0.0
heartrate5.h File Reference

This file contains API for Heart Rate 5 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  heartrate5_t
 Heart Rate 5 Click context object. More...
 
struct  heartrate5_cfg_t
 Heart Rate 5 Click configuration object. More...
 

Macros

#define HEARTRATE5_REG0H   0x00
 Heart Rate 5 description register.
 
#define HEARTRATE5_REG1H   0x01
 
#define HEARTRATE5_REG2H   0x02
 
#define HEARTRATE5_REG3H   0x03
 
#define HEARTRATE5_REG4H   0x04
 
#define HEARTRATE5_REG5H   0x05
 
#define HEARTRATE5_REG6H   0x06
 
#define HEARTRATE5_REG7H   0x07
 
#define HEARTRATE5_REG8H   0x08
 
#define HEARTRATE5_REG9H   0x09
 
#define HEARTRATE5_REGAH   0x0A
 
#define HEARTRATE5_REGBH   0x0B
 
#define HEARTRATE5_REGCH   0x0C
 
#define HEARTRATE5_REGDH   0x0D
 
#define HEARTRATE5_REGEH   0x0E
 
#define HEARTRATE5_REGFH   0x0F
 
#define HEARTRATE5_REG10H   0x10
 
#define HEARTRATE5_REG11H   0x11
 
#define HEARTRATE5_REG12H   0x12
 
#define HEARTRATE5_REG13H   0x13
 
#define HEARTRATE5_REG14H   0x14
 
#define HEARTRATE5_REG15H   0x15
 
#define HEARTRATE5_REG16H   0x16
 
#define HEARTRATE5_REG17H   0x17
 
#define HEARTRATE5_REG18H   0x18
 
#define HEARTRATE5_REG19H   0x19
 
#define HEARTRATE5_REG1AH   0x1A
 
#define HEARTRATE5_REG1BH   0x1B
 
#define HEARTRATE5_REG1CH   0x1C
 
#define HEARTRATE5_REG1DH   0x1D
 
#define HEARTRATE5_REG1EH   0x1E
 
#define HEARTRATE5_REG20H   0x20
 
#define HEARTRATE5_REG21H   0x21
 
#define HEARTRATE5_REG22H   0x22
 
#define HEARTRATE5_REG23H   0x23
 
#define HEARTRATE5_REG29H   0x29
 
#define HEARTRATE5_REG2AH   0x2A
 
#define HEARTRATE5_REG2BH   0x2B
 
#define HEARTRATE5_REG2CH   0x2C
 
#define HEARTRATE5_REG2DH   0x2D
 
#define HEARTRATE5_REG2EH   0x2E
 
#define HEARTRATE5_REG2FH   0x2F
 
#define HEARTRATE5_REG31H   0x31
 
#define HEARTRATE5_REG32H   0x32
 Heart Rate 5 timing controls for dynamic power-down registers.
 
#define HEARTRATE5_REG33H   0x33
 
#define HEARTRATE5_REG34H   0x34
 
#define HEARTRATE5_REG35H   0x35
 
#define HEARTRATE5_REG36H   0x36
 Heart Rate 5 Timing controls for driving the third LED registers.
 
#define HEARTRATE5_REG37H   0x37
 
#define HEARTRATE5_REG39H   0x39
 
#define HEARTRATE5_REG3AH   0x3A
 
#define HEARTRATE5_REG3DH   0x3D
 
#define HEARTRATE5_REG3FH   0x3F
 
#define HEARTRATE5_REG40H   0x40
 
#define HEARTRATE5_SET_DEV_ADDR   0x58
 Heart Rate 5 description setting.
 
#define HEARTRATE5_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  heartrate5_return_value_t { HEARTRATE5_OK = 0 , HEARTRATE5_ERROR = -1 }
 Heart Rate 5 Click return value data. More...
 

Functions

void heartrate5_cfg_setup (heartrate5_cfg_t *cfg)
 Heart Rate 5 configuration object setup function.
 
err_t heartrate5_init (heartrate5_t *ctx, heartrate5_cfg_t *cfg)
 Heart Rate 5 initialization function.
 
err_t heartrate5_default_cfg (heartrate5_t *ctx)
 Heart Rate 5 default configuration function.
 
err_t heartrate5_generic_write (heartrate5_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 Heart Rate 5 I2C writing function.
 
err_t heartrate5_generic_read (heartrate5_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 Heart Rate 5 I2C reading function.
 
void heartrate5_write_reg (heartrate5_t *ctx, uint8_t reg_addr, uint32_t write_data)
 Heart Rate 5 register write function.
 
uint32_t heartrate5_read_reg (heartrate5_t *ctx, uint8_t reg_addr)
 Heart Rate 5 register reading function.
 
void heartrate5_hw_reset (heartrate5_t *ctx)
 Heart Rate 5 hardware reset function.
 
void heartrate5_sw_reset (heartrate5_t *ctx)
 Heart Rate 5 software reset function.
 
uint32_t heartrate5_get_led2_val (heartrate5_t *ctx)
 Heart Rate 5 get LED2 data function.
 
uint32_t heartrate5_get_aled2_val_led3v_al (heartrate5_t *ctx)
 Heart Rate 5 get ALED2 data function.
 
uint32_t heartrate5_get_led1_val (heartrate5_t *ctx)
 Heart Rate 5 get LED1 data function.
 
uint32_t heartrate5_get_aled1_val (heartrate5_t *ctx)
 Heart Rate 5 get ALED1 data function.
 
uint32_t heartrate5_get_led2_aled2_val (heartrate5_t *ctx)
 Heart Rate 5 get LED2_ALED2 data function.
 
uint32_t heartrate5_get_led1_aled1_val (heartrate5_t *ctx)
 Heart Rate 5 get LED1_ALED1 data function.
 

Detailed Description

This file contains API for Heart Rate 5 Click Driver.

Enumeration Type Documentation

◆ heartrate5_return_value_t

Heart Rate 5 Click return value data.

Predefined enum values for driver return values.

Enumerator
HEARTRATE5_OK 
HEARTRATE5_ERROR