heartrate6 2.0.0.0

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

Function Documentation

◆ heartrate6_cfg_setup()

void heartrate6_cfg_setup ( heartrate6_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.

◆ heartrate6_default_cfg()

void heartrate6_default_cfg ( heartrate6_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for HeartRate6 click.

◆ heartrate6_get_data()

void heartrate6_get_data ( heartrate6_t * ctx,
uint16_t * led_off_data,
uint16_t * led_on_data )

Data Get function.

Parameters
ctxClick object.
led_off_dataMemory where LED OFF Data be stored
led_on_dataMemory where LED ON Data be stored

@description Function reads the LED Data as 16bit unsigned value.

◆ heartrate6_init()

HEARTRATE6_RETVAL heartrate6_init ( heartrate6_t * ctx,
heartrate6_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ heartrate6_read_bytes()

uint8_t heartrate6_read_bytes ( heartrate6_t * ctx,
uint8_t start_addr,
uint8_t * data_out,
uint8_t n_bytes )

Generic Read function.

Parameters
ctxClick object.
start_addrStart address which from data be read
data_outMemory where data be stored
n_nytesNumber of bytes to be read
Returns
0 - OK, 1 - Wrong address

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

◆ heartrate6_reset()

void heartrate6_reset ( heartrate6_t * ctx)

Reset function.

Parameters
ctxClick object. @description Function performs the SW Reset.
Note
When SW Reset is performed, the measurement cycle is stopped and configuration registers can be updated.

◆ heartrate6_set_freq()

void heartrate6_set_freq ( heartrate6_t * ctx,
uint8_t freq_data )

Frequency Set function.

Parameters
ctxClick object.
freq_dataSettings for frequency control register

@description Function sets the data reading frequency and the LED pulse frequency.

Note
Data reading frequency directly determines the measurement time.

◆ heartrate6_start_measure()

void heartrate6_start_measure ( heartrate6_t * ctx)

Measurement Start function.

Parameters
ctxClick object. @description Function starts measurement cycle.

◆ heartrate6_wait_measure()

void heartrate6_wait_measure ( heartrate6_t * ctx)

Wait measurement function.

Parameters
ctxClick object.

@description Function delays program for a time specified in click object wait_time field.

◆ heartrate6_write_bytes()

uint8_t heartrate6_write_bytes ( heartrate6_t * ctx,
uint8_t start_addr,
uint8_t * data_in,
uint8_t n_bytes )

Bytes Write function.

Parameters
ctxClick object.
start_addrStart address where data be written
data_inMemory which from data be written to registers
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.

◆ heartrate6_write_single_byte()

uint8_t heartrate6_write_single_byte ( heartrate6_t * ctx,
uint8_t reg_addr,
uint8_t data_in )

Single Byte Write function.

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

@description Function writes one byte to the register.