heartrate6 2.0.0.0
heartrate6.h File Reference

This file contains API for Heart rate 6 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  heartrate6_t
 Click ctx object definition. More...
 
struct  heartrate6_cfg_t
 Click configuration structure definition. More...
 

Macros

#define HEARTRATE6_MAP_MIKROBUS(cfg, mikrobus)
 
#define HEARTRATE6_RETVAL   uint8_t
 
#define HEARTRATE6_OK   0x00
 
#define HEARTRATE6_INIT_ERROR   0xFF
 
#define HEARTRATE6_SLAVE_ADDR   0x5B
 
#define HEARTRATE6_MANUFACT_ID_REG1   0x0F
 
#define HEARTRATE6_MANUFACT_ID_REG2   0x92
 
#define HEARTRATE6_PART_ID_REG   0x10
 
#define HEARTRATE6_RESET_REG   0x40
 
#define HEARTRATE6_MEAS_CTRL1_REG   0x41
 
#define HEARTRATE6_MEAS_CTRL2_REG   0x42
 
#define HEARTRATE6_MEAS_START_REG   0x43
 
#define HEARTRATE6_DATA_LEDOFF_LSB_REG   0x54
 
#define HEARTRATE6_DATA_LEDOFF_MSB_REG   0x55
 
#define HEARTRATE6_DATA_LEDON_LSB_REG   0x56
 
#define HEARTRATE6_DATA_LEDON_MSB_REG   0x57
 
#define HEARTRATE6_RESET_CMD   0x80
 
#define HEARTRATE6_OSC_ACTIVE   0x80
 
#define HEARTRATE6_LED_FREQ_128HZ   0x00
 
#define HEARTRATE6_LED_FREQ_64HZ   0x04
 
#define HEARTRATE6_DATAREAD_FREQ_64HZ   0x01
 
#define HEARTRATE6_DATAREAD_FREQ_32HZ   0x02
 
#define HEARTRATE6_LEDS_PULSED   0x00
 
#define HEARTRATE6_LED1_CONST_LED2_PULSED   0x40
 
#define HEARTRATE6_LED1_PULSED_LED2_CONST   0x80
 
#define HEARTRATE6_LEDS_CONST   0xC0
 
#define HEARTRATE6_LED_TIME_300MICROSEC   0x00
 
#define HEARTRATE6_LED_TIME_600MICROSEC   0x20
 
#define HEARTRATE6_LED_CURR_0MA   0x00
 
#define HEARTRATE6_LED_CURR_1MA   0x08
 
#define HEARTRATE6_LED_CURR_2MA   0x09
 
#define HEARTRATE6_LED_CURR_3MA   0x0A
 
#define HEARTRATE6_LED_CURR_6MA   0x0B
 
#define HEARTRATE6_LED_CURR_10MA   0x0C
 
#define HEARTRATE6_LED_CURR_20MA   0x0D
 
#define HEARTRATE6_LED_CURR_30MA   0x0E
 
#define HEARTRATE6_LED_CURR_60MA   0x0F
 
#define HEARTRATE6_START_MEAS   0x01
 
#define HEARTRATE6_OK   0x00
 
#define HEARTRATE6_WRONG_ADDR   0x01
 
#define HEARTRATE6_NBYTES_RANGE_ERROR   0x02
 

Functions

void heartrate6_cfg_setup (heartrate6_cfg_t *cfg)
 Config Object Initialization function.
 
HEARTRATE6_RETVAL heartrate6_init (heartrate6_t *ctx, heartrate6_cfg_t *cfg)
 Initialization function.
 
void heartrate6_default_cfg (heartrate6_t *ctx)
 Click Default Configuration function.
 
uint8_t heartrate6_write_single_byte (heartrate6_t *ctx, uint8_t reg_addr, uint8_t data_in)
 Single Byte Write function.
 
uint8_t heartrate6_write_bytes (heartrate6_t *ctx, uint8_t start_addr, uint8_t *data_in, uint8_t n_bytes)
 Bytes Write function.
 
uint8_t heartrate6_read_bytes (heartrate6_t *ctx, uint8_t start_addr, uint8_t *data_out, uint8_t n_bytes)
 Generic Read function.
 
void heartrate6_start_measure (heartrate6_t *ctx)
 Measurement Start function.
 
void heartrate6_reset (heartrate6_t *ctx)
 Reset function.
 
void heartrate6_set_freq (heartrate6_t *ctx, uint8_t freq_data)
 Frequency Set function.
 
void heartrate6_get_data (heartrate6_t *ctx, uint16_t *led_off_data, uint16_t *led_on_data)
 Data Get function.
 
void heartrate6_wait_measure (heartrate6_t *ctx)
 Wait measurement function.
 

Detailed Description

This file contains API for Heart rate 6 Click driver.