heartrate2 2.0.0.0
heartrate2.h File Reference

This file contains API for Heart rate 2 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  heartrate2_fifo_data_t
 Structure for reading fifo data. More...
 
struct  heartrate2_ledsq_cfg_t
 Structure configurating led sequence. More...
 
struct  heartrate2_ledpa_t
 Structure led brightness. More...
 
struct  heartrate2_led_range_curr_t
 Structure setting led current range. More...
 
struct  heartrate2_ppg_cfg_t
 Structure configurating ppg. More...
 
struct  heartrate2_int_t
 Structure for interrupt status. More...
 
struct  heartrate2_t
 Click ctx object definition. More...
 
struct  heartrate2_cfg_t
 Click configuration structure definition. More...
 

Macros

#define HEARTRATE2_MAP_MIKROBUS(cfg, mikrobus)
 
#define HEARTRATE2_RETVAL   uint8_t
 
#define HEARTRATE2_OK_OK   0x00
 
#define HEARTRATE2_INIT_ERROR   0xFF
 
#define HEARTRATE2_SLAVE_ADDRESS   0x62
 
#define HEARTRATE2_REG_INT_STATUS_1   0x00
 
#define HEARTRATE2_REG_INT_STATUS_2   0x01
 
#define HEARTRATE2_REG_INT_ENABLE_1   0x02
 
#define HEARTRATE2_REG_INT_ENABLE_2   0x03
 
#define HEARTRATE2_REG_FIFO_WRITE_PTR   0x04
 
#define HEARTRATE2_REG_FIFO_READ_PTR   0x05
 
#define HEARTRATE2_REG_OVERFLOW_CNT   0x06
 
#define HEARTRATE2_REG_FIFO_DATA_CNT   0x07
 
#define HEARTRATE2_REG_FIFO_DATA_REG   0x08
 
#define HEARTRATE2_REG_FIFO_CFG_1   0x09
 
#define HEARTRATE2_REG_FIFO_CFG_2   0x0A
 
#define HEARTRATE2_REG_SYSTEM_CTRL   0x0D
 
#define HEARTRATE2_REG_PPG_SYNC_CTRL   0x10
 
#define HEARTRATE2_REG_PPG_CFG_1   0x11
 
#define HEARTRATE2_REG_PPG_CFG_2   0x12
 
#define HEARTRATE2_REG_PPG_CFG_3   0x13
 
#define HEARTRATE2_REG_PROX_INT_THRESHOLD   0x14
 
#define HEARTRATE2_REG_PHOTO_DIODE_BIAS   0x15
 
#define HEARTRATE2_REG_PICKET_FENCE   0x16
 
#define HEARTRATE2_REG_LED_SQUENCE_REG_1   0x20
 
#define HEARTRATE2_REG_LED_SQUENCE_REG_2   0x21
 
#define HEARTRATE2_REG_LED_SQUENCE_REG_3   0x22
 
#define HEARTRATE2_REG_LED_1_PA   0x23
 
#define HEARTRATE2_REG_LED_2_PA   0x24
 
#define HEARTRATE2_REG_LED_3_PA   0x25
 
#define HEARTRATE2_REG_LED_PILOT_PA   0x29
 
#define HEARTRATE2_REG_LED_RANGE_1   0x2A
 
#define HEARTRATE2_REG_S1_HI_RES_DAC_1   0x2C
 
#define HEARTRATE2_REG_S2_HI_RES_DAC_1   0x2D
 
#define HEARTRATE2_REG_S3_HI_RES_DAC_1   0x2E
 
#define HEARTRATE2_REG_S4_HI_RES_DAC_1   0x2F
 
#define HEARTRATE2_REG_S5_HI_RES_DAC_1   0x30
 
#define HEARTRATE2_REG_S6_HI_RES_DAC_1   0x31
 
#define HEARTRATE2_REG_DIE_TEMP_CFG   0x40
 
#define HEARTRATE2_REG_DIE_TEMP_INT   0x41
 
#define HEARTRATE2_REG_DIE_TEMP_FRAC   0x42
 
#define HEARTRATE2_REG_DAC_CALIBRATION_EN   0x50
 
#define HEARTRATE2_REG_SHA_CMD   0xF0
 
#define HEARTRATE2_REG_SHA_CFG   0xF1
 
#define HEARTRATE2_REG_MEM_CTRL   0xF2
 
#define HEARTRATE2_REG_MEM_INDEX   0xF3
 
#define HEARTRATE2_REG_MEM_DATA   0xF4
 
#define HEARTRATE2_REG_REV_ID   0xFE
 
#define HEARTRATE2_REG_PART_ID   0xFF
 
#define HEARTRATE2_SYS_CTRL_SW_RESET   0x01
 
#define HEARTRATE2_SYS_CTRL_SHUT_DOWN   0x02
 
#define HEARTRATE2_SYS_CTRL_POWER_ON   0x00
 
#define HEARTRATE2_SYS_CTRL_LOW_PWR_MODE   0x04
 
#define HEARTRATE2_SYS_CTRL_SINGLE_PPG   0x08
 
#define HEARTRATE2_SYS_CTRL_DUAL_PPG   0x00
 
#define HEARTRATE2_PPG_CFG_1_ALC_ENABLE   0x00
 
#define HEARTRATE2_PPG_CFG_1_ALC_DISABLE   0x80
 
#define HEARTRATE2_PPG_CFG_1_ADD_OFFSET   0x40
 
#define HEARTRATE2_PPG_CFG_1_NO_OFFSET   0x00
 
#define HEARTRATE2_PPG_CFG_1_ADC_RANGE_4096   0x00
 
#define HEARTRATE2_PPG_CFG_1_ADC_RANGE_8192   0x04
 
#define HEARTRATE2_PPG_CFG_1_ADC_RANGE_16384   0x08
 
#define HEARTRATE2_PPG_CFG_1_ADC_RANGE_32768   0x0C
 
#define HEARTRATE2_PPG_CFG_1_PPG_TINT_21p3   0x00
 
#define HEARTRATE2_PPG_CFG_1_PPG_TINT_35p9   0x01
 
#define HEARTRATE2_PPG_CFG_1_PPG_TINT_65p2   0x02
 
#define HEARTRATE2_PPG_CFG_1_PPG_TINT_123p8   0x03
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_24p995_N1   0x00
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_50p027_N1   0x08
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_84p021_N1   0x10
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_99p902_N1   0x18
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_199p805_N1   0x20
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_399p610_N1   0x28
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_24p995_N2   0x30
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_50p027_N2   0x38
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_84p021_N2   0x40
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_99p902_N2   0x48
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_8p000_N1   0x50
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_16p000_N1   0x58
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_32p000_N1   0x60
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_64p000_N1   0x68
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_128p000_N1   0x70
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_256p000_N1   0x78
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_512p000_N1   0x80
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_1024p000_N1   0x88
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_2048p000_N1   0x90
 
#define HEARTRATE2_PPG_CFG_2_CLK_FREQ_4096p000_N1   0x98
 
#define HEARTRATE2_PPG_CFG_2_SMP_AVG_1   0x00
 
#define HEARTRATE2_PPG_CFG_2_SMP_AVG_2   0x01
 
#define HEARTRATE2_PPG_CFG_2_SMP_AVG_4   0x02
 
#define HEARTRATE2_PPG_CFG_2_SMP_AVG_8   0x03
 
#define HEARTRATE2_PPG_CFG_2_SMP_AVG_16   0x04
 
#define HEARTRATE2_PPG_CFG_2_SMP_AVG_32   0x05
 
#define HEARTRATE2_PPG_CFG_2_SMP_AVG_64   0x06
 
#define HEARTRATE2_PPG_CFG_2_SMP_AVG_128   0x07
 
#define HEARTRATE2_PPG_CFG_3_LED_SETLNG_4   0x00
 
#define HEARTRATE2_PPG_CFG_3_LED_SETLNG_6   0x40
 
#define HEARTRATE2_PPG_CFG_3_LED_SETLNG_8   0x80
 
#define HEARTRATE2_PPG_CFG_3_LED_SETLNG_12   0xC0
 
#define HEARTRATE2_PPG_CFG_3_FILTER_CDM   0x00
 
#define HEARTRATE2_PPG_CFG_3_FILTER_FDM   0x20
 
#define HEARTRATE2_PPG_CFG_3_BURST_RATE_8HZ   0x00
 
#define HEARTRATE2_PPG_CFG_3_BURST_RATE_32HZ   0x02
 
#define HEARTRATE2_PPG_CFG_3_BURST_RATE_84HZ   0x04
 
#define HEARTRATE2_PPG_CFG_3_BURST_RATE_256HZ   0x06
 
#define HEARTRATE2_PPG_CFG_3_BURST_ENABLE   0x01
 
#define HEARTRATE2_PPG_CFG_3_BURST_DISABLE   0x00
 
#define HEARTRATE2_PHOTO_DIODE_BIAS1_0_65_PF   0x01
 
#define HEARTRATE2_PHOTO_DIODE_BIAS1_65_130_PF   0x05
 
#define HEARTRATE2_PHOTO_DIODE_BIAS1_130_260_PF   0x06
 
#define HEARTRATE2_PHOTO_DIODE_BIAS1_260_520_PF   0x07
 
#define HEARTRATE2_PHOTO_DIODE_BIAS2_0_65_PF   0x10
 
#define HEARTRATE2_PHOTO_DIODE_BIAS2_65_130_PF   0x50
 
#define HEARTRATE2_PHOTO_DIODE_BIAS2_130_260_PF   0x60
 
#define HEARTRATE2_PHOTO_DIODE_BIAS2_260_520_PF   0x70
 
#define HEARTRATE2_LED_RANGE1_LED1_CURRENT_31_MA   0x00
 
#define HEARTRATE2_LED_RANGE1_LED1_CURRENT_62_MA   0x01
 
#define HEARTRATE2_LED_RANGE1_LED1_CURRENT_93_MA   0x02
 
#define HEARTRATE2_LED_RANGE1_LED1_CURRENT_124_MA   0x03
 
#define HEARTRATE2_LED_RANGE1_LED2_CURRENT_31_MA   0x00
 
#define HEARTRATE2_LED_RANGE1_LED2_CURRENT_62_MA   0x04
 
#define HEARTRATE2_LED_RANGE1_LED2_CURRENT_93_MA   0x08
 
#define HEARTRATE2_LED_RANGE1_LED2_CURRENT_124_MA   0x0C
 
#define HEARTRATE2_LED_RANGE1_LED3_CURRENT_31_MA   0x00
 
#define HEARTRATE2_LED_RANGE1_LED3_CURRENT_62_MA   0x10
 
#define HEARTRATE2_LED_RANGE1_LED3_CURRENT_93_MA   0x20
 
#define HEARTRATE2_LED_RANGE1_LED3_CURRENT_124_MA   0x30
 
#define HEARTRATE2_FIFO_CFG_2_FLUSH_FIFO   0x10
 
#define HEARTRATE2_FIFO_CFG_2_FIFO_READ_DATA_CLR   0x08
 
#define HEARTRATE2_FIFO_CFG_2_FIFO_STAT_DATA_CLR   0x00
 
#define HEARTRATE2_FIFO_CFG_2_FULL_TYPE_RPT   0x00
 
#define HEARTRATE2_FIFO_CFG_2_FULL_TYPE_ONCE   0x04
 
#define HEARTRATE2_FIFO_CFG_2_FIFO_ROLL_OVER   0x02
 
#define HEARTRATE2_FIFO_CFG_2_FIFO_STOP   0x00
 
#define HEARTRATE2_INT_1_FULL   0x80
 
#define HEARTRATE2_INT_1_NOT_FULL   0x00
 
#define HEARTRATE2_INT_1_DATA_RDY   0x40
 
#define HEARTRATE2_INT_1_DATA_NOT_RDY   0x00
 
#define HEARTRATE2_INT_1_ALC_OVERFLOW   0x20
 
#define HEARTRATE2_INT_1_ALC_NORMAL   0x00
 
#define HEARTRATE2_INT_1_PROXIMITY_INT   0x10
 
#define HEARTRATE2_INT_1_PROXIMITY_NORMAL   0x00
 
#define HEARTRATE2_INT_1_LED_COMPLIANT   0x08
 
#define HEARTRATE2_INT_1_LED_NOT_COMPLIANT   0x00
 
#define HEARTRATE2_INT_1_DIE_TEMP_RDY   0x04
 
#define HEARTRATE2_INT_1_DIE_TEMP_NOT_RDY   0x00
 
#define HEARTRATE2_INT_1_PWR_RDY   0x01
 
#define HEARTRATE2_INT_1_PWR_NOT_RDY   0x00
 
#define HEARTRATE2_INT_1_FULL   0x80
 
#define HEARTRATE2_INT_1_NOT_FULL   0x00
 
#define HEARTRATE2_INT_1_DATA_RDY   0x40
 
#define HEARTRATE2_INT_1_DATA_NOT_RDY   0x00
 
#define HEARTRATE2_INT_1_ALC_OVERFLOW   0x20
 
#define HEARTRATE2_INT_1_ALC_NORMAL   0x00
 
#define HEARTRATE2_INT_1_PROXIMITY_INT   0x10
 
#define HEARTRATE2_INT_1_PROXIMITY_NORMAL   0x00
 
#define HEARTRATE2_INT_1_LED_COMPLIANT   0x08
 
#define HEARTRATE2_INT_1_LED_NOT_COMPLIANT   0x00
 
#define HEARTRATE2_INT_1_DIE_TEMP_RDY   0x04
 
#define HEARTRATE2_INT_1_DIE_TEMP_NOT_RDY   0x00
 
#define HEARTRATE2_INT_1_PWR_RDY   0x01
 
#define HEARTRATE2_INT_1_PWR_NOT_RDY   0x00
 
#define HEARTRATE2_INT_2_SHA_AUTHENTICATION_DONE   0x01
 
#define HEARTRATE2_INT_2_SHA_AUTHENTICATION_NOT_DONE   0x00
 
#define HEARTRATE2_FIFO_TAG_PPG1_LEDC1   0x01
 
#define HEARTRATE2_FIFO_TAG_PPG1_LEDC2   0x02
 
#define HEARTRATE2_FIFO_TAG_PPG1_LEDC3   0x03
 
#define HEARTRATE2_FIFO_TAG_PPG1_LEDC4   0x04
 
#define HEARTRATE2_FIFO_TAG_PPG1_LEDC5   0x05
 
#define HEARTRATE2_FIFO_TAG_PPG1_LEDC6   0x06
 
#define HEARTRATE2_FIFO_TAG_PPF1_LEDC1   0x0D
 
#define HEARTRATE2_FIFO_TAG_PPF1_LEDC2   0x0E
 
#define HEARTRATE2_FIFO_TAG_PPF1_LEDC3   0x0F
 
#define HEARTRATE2_FIFO_TAG_PROX1   0x19
 
#define HEARTRATE2_FIFO_TAG_SUB_DAC_UPDATE   0x1D
 
#define HEARTRATE2_FIFO_TAG_INVALID_DATA   0x1E
 
#define HEARTRATE2_FIFO_TAG_TIME_STAMP   0x1F
 
#define HEARTRATE2_LEDSQ_GREEN   0x1
 
#define HEARTRATE2_LEDSQ_IR   0x2
 
#define HEARTRATE2_LEDSQ_RED   0x3
 
#define HEARTRATE2_LEDSQ_PILOT_LED1   0x8
 
#define HEARTRATE2_LEDSQ_DIRECT_AMBIENT   0x9
 
#define HEARTRATE2_LEDSQ_OFF   0x0
 
#define HEARTRATE2_DEV_ID   0x36
 
#define HEARTRATE2_ERROR   0xEE
 
#define HEARTRATE2_OK   0xFF
 
#define HEARTRATE2_INT_ENABLE   0x01
 
#define HEARTRATE2_INT_DISABLE   0x00
 
#define HEARTRATE2_PPG_CFG_ALC_EN   0x01
 
#define HEARTRATE2_PPG_CFG_ALC_DS   0x00
 
#define HEARTRATE2_PPG_CFG_OFFSET_ADD   0x01
 
#define HEARTRATE2_PPG_CFG_OFFSET_NO   0x00
 
#define HEARTRATE2_PPG_CFG_TINT_14p8_US   0x00
 
#define HEARTRATE2_PPG_CFG_TINT_29p4_US   0x01
 
#define HEARTRATE2_PPG_CFG_TINT_58p7_US   0x02
 
#define HEARTRATE2_PPG_CFG_TINT_117p3_US   0x03
 
#define HEARTRATE2_PPG_CFG_LED_RANGE_4k   0x00
 
#define HEARTRATE2_PPG_CFG_LED_RANGE_8k   0x01
 
#define HEARTRATE2_PPG_CFG_LED_RANGE_16k   0x02
 
#define HEARTRATE2_PPG_CFG_LED_RANGE_32k   0x03
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_24sps   0x00
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_50sps   0x01
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_84sps   0x02
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_99sps   0x03
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_199sps   0x04
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_399sps   0x05
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P2_24sps   0x06
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P2_50sps   0x07
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P2_84sps   0x08
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P2_99sps   0x09
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_8sps   0x0A
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_16sps   0x0B
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_32sps   0x0C
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_64sps   0x0D
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_128sps   0x0E
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_256sps   0x0F
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_512sps   0x10
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_1024sps   0x11
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_2048sps   0x12
 
#define HEARTRATE2_PPG_CFG_SMP_RATE_P1_4096sps   0x13
 
#define HEARTRATE2_PPG_CFG_SMP_AVG_1   0x00
 
#define HEARTRATE2_PPG_CFG_SMP_AVG_2   0x01
 
#define HEARTRATE2_PPG_CFG_SMP_AVG_4   0x02
 
#define HEARTRATE2_PPG_CFG_SMP_AVG_8   0x03
 
#define HEARTRATE2_PPG_CFG_SMP_AVG_16   0x04
 
#define HEARTRATE2_PPG_CFG_SMP_AVG_32   0x05
 
#define HEARTRATE2_PPG_CFG_SMP_AVG_64   0x06
 
#define HEARTRATE2_PPG_CFG_SMP_AVG_128   0x07
 
#define HEARTRATE2_LED_RANGE_CURRENT_31_MA   0x00
 
#define HEARTRATE2_LED_RANGE_CURRENT_62_MA   0x01
 
#define HEARTRATE2_LED_RANGE_CURRENT_93_MA   0x02
 
#define HEARTRATE2_LED_RANGE_CURRENT_124_MA   0x03
 
#define HEARTRATE2_CONFIG_GREEN   0xAA
 
#define HEARTRATE2_CONFIG_IR   0xBB
 
#define HEARTRATE2_CONFIG_RED   0xCC
 
#define HEARTRATE2_PIN_HIGH   1
 
#define HEARTRATE2_PIN_LOW   0
 
#define HEARTRATE2_TEMPERATURE_RESOLUTION   0.0625f
 
#define HEARTRATE2_TEMPERATURE_MASK   0x0F
 
#define HEARTRATE2_FIFO_DATA_MASK   0x07FFFF
 
#define HEARTRATE2_FIFO_RES   19
 
#define HEARTRATE2_FIFO_TAG_MASK   0x1F
 
#define HEARTRATE2_LEDSQ_SHIFT   4
 
#define HEARTRATE2_INT_SHIFT_FULL   7
 
#define HEARTRATE2_INT_SHIFT_DATA_RDY   6
 
#define HEARTRATE2_INT_SHIFT_ALC_OVF   5
 
#define HEARTRATE2_INT_SHIFT_PROXY   4
 
#define HEARTRATE2_INT_SHIFT_LED_COMPLIANT   3
 
#define HEARTRATE2_INT_SHIFT_DIE_TEMEP   2
 
#define HEARTRATE2_INT_SHIFT_PWR_RDY   0
 
#define HEARTRATE2_INT_SHIFT_SHA   0
 
#define HEARTRATE2_INT_MASK   0x01
 
#define HEARTRATE2_PPG_CFG_ALC   7
 
#define HEARTRATE2_PPG_CFG_OFFSET   6
 
#define HEARTRATE2_PPG_CFG_ADC_RANGE   2
 
#define HEARTRATE2_PPG_CFG_TINT   0
 
#define HEARTRATE2_PPG_CFG_SMP_RATE   3
 
#define HEARTRATE2_PPG_CFG_SMP_AVG   0
 
#define HEARTRATE2_LED_RANGE_SHIFT_GREEN   0
 
#define HEARTRATE2_LED_RANGE_SHIFT_IR   2
 
#define HEARTRATE2_LED_RANGE_SHIFT_RED   4
 

Functions

void heartrate2_cfg_setup (heartrate2_cfg_t *cfg)
 Config Object Initialization function.
 
HEARTRATE2_RETVAL heartrate2_init (heartrate2_t *ctx, heartrate2_cfg_t *cfg)
 Initialization function.
 
void heartrate2_default_cfg (heartrate2_t *ctx, uint8_t cfg_led)
 Click Default Configuration function.
 
void heartrate2_generic_write (heartrate2_t *ctx, uint8_t reg_adr, uint8_t write_data)
 Generic write function.
 
uint8_t heartrate2_generic_read (heartrate2_t *ctx, uint8_t reg_adr)
 Generic read function.
 
void heartrate2_read_buf (heartrate2_t *ctx, uint8_t reg_adr, uint8_t *read_buf, uint8_t buf_size)
 Function for reading data buffer from registar.
 
void heartrate2_read_fifo (heartrate2_t *ctx, heartrate2_fifo_data_t *fifo)
 Generic function for reading data from fifo registar.
 
float heartrate2_read_temp (heartrate2_t *ctx)
 Function for reading temperature of device.
 
void heartrate2_soft_reset (heartrate2_t *ctx)
 Function for restarting device.
 
uint8_t heartrate2_ppg_config (heartrate2_t *ctx, heartrate2_ppg_cfg_t *ppg_cfg)
 Function for configurating ppg registers.
 
void heartrate2_ledpa_config (heartrate2_t *ctx, heartrate2_ledpa_t *ledpa)
 Function for configurating led pa registers.
 
uint8_t heartrate2_led_range_curr_config (heartrate2_t *ctx, heartrate2_led_range_curr_t *led_range)
 Function for configurating led current range registers.
 
uint8_t heartrate2_led_sequence_config (heartrate2_t *ctx, heartrate2_ledsq_cfg_t *ledsq)
 Function for configurating led sequence registers.
 
uint8_t heartrate2_int_control (heartrate2_t *ctx, heartrate2_int_t *int_ctrl)
 Function for configurating interrupt registers.
 
void heartrate2_int_status (heartrate2_t *ctx, heartrate2_int_t *int_status)
 Function for reading interrupt status.
 
uint8_t heartrate2_get_int (heartrate2_t *ctx)
 Function for reading int pin status.
 
uint8_t heartrate2_get_gp (heartrate2_t *ctx)
 Function for reading gp pin status.
 
void heartrate2_set_en (heartrate2_t *ctx, uint8_t state)
 Function for setting en pin status.
 

Detailed Description

This file contains API for Heart rate 2 Click driver.