heartrate10 2.0.0.0
heartrate10.h File Reference

This file contains API for Heart Rate 10 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  heartrate10_t
 Heart Rate 10 Click context object. More...
 
struct  heartrate10_cfg_t
 Heart Rate 10 Click configuration object. More...
 

Macros

#define HEARTRATE10_REG_INT_STATUS   0x00
 Heart Rate 10 communication register.
 
#define HEARTRATE10_REG_INT_ENABLE   0x02
 
#define HEARTRATE10_REG_FIFO_WR_PTR   0x04
 
#define HEARTRATE10_REG_FIFO_OVF_CNT   0x05
 
#define HEARTRATE10_REG_FIFO_RD_PTR   0x06
 
#define HEARTRATE10_REG_FIFO_DATA   0x07
 
#define HEARTRATE10_REG_FIFO_CFG   0x08
 
#define HEARTRATE10_REG_MODE_CFG1   0x09
 
#define HEARTRATE10_REG_MODE_CFG2   0x0A
 
#define HEARTRATE10_REG_LED1_PA   0x0C
 
#define HEARTRATE10_REG_LED2_PA   0x0D
 
#define HEARTRATE10_REG_LED3_PA   0x0E
 
#define HEARTRATE10_REG_LED4_PA   0x0F
 
#define HEARTRATE10_REG_LED_RANGE   0x11
 
#define HEARTRATE10_REG_PILOT_PA   0x12
 
#define HEARTRATE10_REG_LED_SEQ1   0x13
 
#define HEARTRATE10_REG_LED_SEQ2   0x14
 
#define HEARTRATE10_REG_DAC1_CROSSTALK_CODE   0x26
 
#define HEARTRATE10_REG_DAC2_CROSSTALK_CODE   0x27
 
#define HEARTRATE10_REG_DAC3_CROSSTALK_CODE   0x28
 
#define HEARTRATE10_REG_DAC4_CROSSTALK_CODE   0x29
 
#define HEARTRATE10_REG_PROX_INT_THRESHOLD   0x30
 
#define HEARTRATE10_REG_LED_COMPARATOR_EN   0x31
 
#define HEARTRATE10_REG_LED_COMPARATOR_STATUS   0x32
 
#define HEARTRATE10_REG_REV_ID   0xFE
 
#define HEARTRATE10_REG_PART_ID   0xFF
 
#define HEARTRATE10_PART_ID   0x2B
 Heart Rate 10 description setting.
 
#define HEARTRATE10_SET_DEV_ADDR   0x57
 Heart Rate 10 device address setting.
 
#define HEARTRATE10_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  heartrate10_return_value_t { HEARTRATE10_OK = 0 , HEARTRATE10_ERROR = -1 }
 Heart Rate 10 Click return value data. More...
 

Functions

void heartrate10_cfg_setup (heartrate10_cfg_t *cfg)
 Heart Rate 10 configuration object setup function.
 
err_t heartrate10_init (heartrate10_t *ctx, heartrate10_cfg_t *cfg)
 Heart Rate 10 initialization function.
 
err_t heartrate10_default_cfg (heartrate10_t *ctx)
 Heart Rate 10 default configuration function.
 
err_t heartrate10_generic_write (heartrate10_t *ctx, uint8_t reg, uint8_t tx_data)
 Writing function.
 
err_t heartrate10_generic_read (heartrate10_t *ctx, uint8_t reg, uint8_t *rx_data)
 Reading function.
 
uint8_t heartrate10_get_int_pin (heartrate10_t *ctx)
 Get interrupt pin state.
 
void heartrate10_reset (heartrate10_t *ctx)
 Reset device.
 
err_t heartrate10_fifo_read (heartrate10_t *ctx, uint8_t *rx_buf, uint8_t rx_len)
 Read fifo register data.
 
uint32_t heartrate10_read_fifo_sample (heartrate10_t *ctx)
 Read single sample of FIFO data.
 
err_t heartrate10_read_complete_fifo_data (heartrate10_t *ctx, uint32_t *led1, uint32_t *led2, uint32_t *led3, uint32_t *led4)
 Read all led samples.
 

Detailed Description

This file contains API for Heart Rate 10 Click Driver.

Enumeration Type Documentation

◆ heartrate10_return_value_t

Heart Rate 10 Click return value data.

Predefined enum values for driver return values.

Enumerator
HEARTRATE10_OK 
HEARTRATE10_ERROR