heartrate8 2.0.0.0

Functions

void heartrate8_cfg_setup (heartrate8_cfg_t *cfg)
 Config Object Initialization function.
 
HEARTRATE8_RETVAL heartrate8_init (heartrate8_t *ctx, heartrate8_cfg_t *cfg)
 Initialization function.
 
void heartrate8_default_cfg (heartrate8_t *ctx)
 Click Default Configuration function.
 
uint8_t heartrate8_write_single_byte (heartrate8_t *ctx, uint8_t reg_addr, uint8_t data_in)
 Generic Single Byte Write function.
 
uint8_t heartrate8_write_bytes (heartrate8_t *ctx, uint8_t start_addr, uint8_t *data_in, uint8_t n_bytes)
 Generic Bytes Write function.
 
uint8_t heartrate8_read_bytes (heartrate8_t *ctx, uint8_t start_addr, uint8_t *data_out, uint8_t n_bytes)
 Generic Read function.
 
void heartrate8_start_measure (heartrate8_t *ctx)
 Measurement Start function.
 
void heartrate8_reset (heartrate8_t *ctx)
 Reset function.
 
void heartrate8_meas_sync (heartrate8_t *ctx)
 Measurement Synchronization function.
 
uint8_t heartrate8_int_clear (heartrate8_t *ctx)
 Interrupt Clear function.
 
uint8_t heartrate8_check_int (heartrate8_t *ctx)
 Interrupt Check function.
 
uint8_t heartrate8_get_data (heartrate8_t *ctx, uint8_t data_select, uint16_t *led_out_on, uint16_t *led_out_off)
 Data Get function.
 

Detailed Description

Function Documentation

◆ heartrate8_cfg_setup()

void heartrate8_cfg_setup ( heartrate8_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ heartrate8_check_int()

uint8_t heartrate8_check_int ( heartrate8_t * ctx)

Interrupt Check function.

Parameters
ctxClick object.
Returns
0 - Interrupt is occured, 1 - Interrupt is not occured

@description Function checks INT pin, is interrupt occured or not.

◆ heartrate8_default_cfg()

void heartrate8_default_cfg ( heartrate8_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for HeartRate8 click.

◆ heartrate8_get_data()

uint8_t heartrate8_get_data ( heartrate8_t * ctx,
uint8_t data_select,
uint16_t * led_out_on,
uint16_t * led_out_off )

Data Get function.

Parameters
ctxClick object.
data_selectDetermines which data registers be read (0 - FIFO, 1 - IR, 2 - GREEN Data)
led_out_onMemory where LED ON Data be stored
led_out_offMemory where LED OFF Data be stored
Returns
0 - OK, 3 - Wrong data selection

@description Function gets the selected data from the determined LED Data registers.

◆ heartrate8_init()

HEARTRATE8_RETVAL heartrate8_init ( heartrate8_t * ctx,
heartrate8_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ heartrate8_int_clear()

uint8_t heartrate8_int_clear ( heartrate8_t * ctx)

Interrupt Clear function.

Parameters
ctxClick object.
Returns
Byte from the INT_CLEAR register.

@description Function clears interrupt flag on the INT pin.

◆ heartrate8_meas_sync()

void heartrate8_meas_sync ( heartrate8_t * ctx)

Measurement Synchronization function.

Parameters
ctxClick object. @description Function performs the measurement synchronization.
Note
In Synchronized Measurement Mode adjust LED emitting frequency and output data rate by synchronizing with MEAS_SYNC received interval. After receiving MEAS_SYNC, the measurements for a set number of times are performed.

◆ heartrate8_read_bytes()

uint8_t heartrate8_read_bytes ( heartrate8_t * ctx,
uint8_t start_addr,
uint8_t * data_out,
uint8_t n_bytes )

Generic Read function.

Parameters
ctxClick object.
start_addrAddress from which data reading be started
data_outMemory where read data be stored
n_bytesNumber of bytes to be read
Returns
0 - OK, 1 - Wrong address

@description Function reads the desired number of bytes from the registers.

◆ heartrate8_reset()

void heartrate8_reset ( heartrate8_t * ctx)

Reset function.

Parameters
ctxClick object. @description Function performs the device reset.
Note
The device reset must be performed when configurations are changed.

◆ heartrate8_start_measure()

void heartrate8_start_measure ( heartrate8_t * ctx)

Measurement Start function.

Parameters
ctxClick object. @description Function starts one measurement cycle.

◆ heartrate8_write_bytes()

uint8_t heartrate8_write_bytes ( heartrate8_t * ctx,
uint8_t start_addr,
uint8_t * data_in,
uint8_t n_bytes )

Generic Bytes Write function.

Parameters
ctxClick object.
start_addrAddress from which data writing be started
data_inMemory which from data be written
n_bytesNumber of bytes to be written
Returns
0 - OK, 1 - Wrong address, 2 - Number of bytes is out of range

@description Function writes the desired number of bytes to the registers.

◆ heartrate8_write_single_byte()

uint8_t heartrate8_write_single_byte ( heartrate8_t * ctx,
uint8_t reg_addr,
uint8_t data_in )

Generic Single Byte Write function.

Parameters
ctxClick object.
reg_addrAddress where data be written
data_inData to be written
Returns
0 - OK, 1 - Wrong address

@description Function writes one byte to the register.