heartrate5 2.0.0.0
Heart Rate 5 Click Driver

API for configuring and manipulating Heart Rate 5 Click driver. More...

Topics

 Heart Rate 5 Registers List
 List of registers of Heart Rate 5 Click driver.
 
 Heart Rate 5 Registers Settings
 Settings for registers of Heart Rate 5 Click driver.
 
 Heart Rate 5 MikroBUS Map
 MikroBUS pin mapping of Heart Rate 5 Click driver.
 

Functions

void heartrate5_cfg_setup (heartrate5_cfg_t *cfg)
 Heart Rate 5 configuration object setup function.
 
err_t heartrate5_init (heartrate5_t *ctx, heartrate5_cfg_t *cfg)
 Heart Rate 5 initialization function.
 
err_t heartrate5_default_cfg (heartrate5_t *ctx)
 Heart Rate 5 default configuration function.
 
err_t heartrate5_generic_write (heartrate5_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 Heart Rate 5 I2C writing function.
 
err_t heartrate5_generic_read (heartrate5_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 Heart Rate 5 I2C reading function.
 
void heartrate5_write_reg (heartrate5_t *ctx, uint8_t reg_addr, uint32_t write_data)
 Heart Rate 5 register write function.
 
uint32_t heartrate5_read_reg (heartrate5_t *ctx, uint8_t reg_addr)
 Heart Rate 5 register reading function.
 
void heartrate5_hw_reset (heartrate5_t *ctx)
 Heart Rate 5 hardware reset function.
 
void heartrate5_sw_reset (heartrate5_t *ctx)
 Heart Rate 5 software reset function.
 
uint32_t heartrate5_get_led2_val (heartrate5_t *ctx)
 Heart Rate 5 get LED2 data function.
 
uint32_t heartrate5_get_aled2_val_led3v_al (heartrate5_t *ctx)
 Heart Rate 5 get ALED2 data function.
 
uint32_t heartrate5_get_led1_val (heartrate5_t *ctx)
 Heart Rate 5 get LED1 data function.
 
uint32_t heartrate5_get_aled1_val (heartrate5_t *ctx)
 Heart Rate 5 get ALED1 data function.
 
uint32_t heartrate5_get_led2_aled2_val (heartrate5_t *ctx)
 Heart Rate 5 get LED2_ALED2 data function.
 
uint32_t heartrate5_get_led1_aled1_val (heartrate5_t *ctx)
 Heart Rate 5 get LED1_ALED1 data function.
 

Detailed Description

API for configuring and manipulating Heart Rate 5 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ heartrate5_cfg_setup()

void heartrate5_cfg_setup ( heartrate5_cfg_t * cfg)

Heart Rate 5 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See heartrate5_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ heartrate5_default_cfg()

err_t heartrate5_default_cfg ( heartrate5_t * ctx)

Heart Rate 5 default configuration function.

This function executes a default configuration of Heart Rate 5 click board.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ heartrate5_generic_read()

err_t heartrate5_generic_read ( heartrate5_t * ctx,
uint8_t reg,
uint8_t * rx_buf,
uint8_t rx_len )

Heart Rate 5 I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
[in]reg: Start register address.
[out]rx_buf: Output read data.
[in]rx_len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ heartrate5_generic_write()

err_t heartrate5_generic_write ( heartrate5_t * ctx,
uint8_t reg,
uint8_t * tx_buf,
uint8_t tx_len )

Heart Rate 5 I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
[in]reg: Start register address.
[in]tx_buf: Data to be written.
[in]tx_len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ heartrate5_get_aled1_val()

uint32_t heartrate5_get_aled1_val ( heartrate5_t * ctx)

Heart Rate 5 get ALED1 data function.

This function is used to read conversion data from the ALED1.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
Returns
Returns the value of the conversion resoult.

◆ heartrate5_get_aled2_val_led3v_al()

uint32_t heartrate5_get_aled2_val_led3v_al ( heartrate5_t * ctx)

Heart Rate 5 get ALED2 data function.

This function is used to read conversion data from the ALED2.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
Returns
Returns the value of the conversion resoult.

◆ heartrate5_get_led1_aled1_val()

uint32_t heartrate5_get_led1_aled1_val ( heartrate5_t * ctx)

Heart Rate 5 get LED1_ALED1 data function.

This function is used to read conversion data from the LED1_ALED1.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
Returns
Returns the value of the conversion resoult.

◆ heartrate5_get_led1_val()

uint32_t heartrate5_get_led1_val ( heartrate5_t * ctx)

Heart Rate 5 get LED1 data function.

This function is used to read conversion data from the LED1.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
Returns
Returns the value of the conversion resoult.

◆ heartrate5_get_led2_aled2_val()

uint32_t heartrate5_get_led2_aled2_val ( heartrate5_t * ctx)

Heart Rate 5 get LED2_ALED2 data function.

This function is used to read conversion data from the LED2_ALED2.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
Returns
Returns the value of the conversion resoult.

◆ heartrate5_get_led2_val()

uint32_t heartrate5_get_led2_val ( heartrate5_t * ctx)

Heart Rate 5 get LED2 data function.

This function is used to read conversion data from the LED2.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
Returns
Returns the value of the conversion resoult.

◆ heartrate5_hw_reset()

void heartrate5_hw_reset ( heartrate5_t * ctx)

Heart Rate 5 hardware reset function.

This function is used to perform hardware reset.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
Returns
Nothing.

◆ heartrate5_init()

err_t heartrate5_init ( heartrate5_t * ctx,
heartrate5_cfg_t * cfg )

Heart Rate 5 initialization function.

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

Parameters
[out]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See heartrate5_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ heartrate5_read_reg()

uint32_t heartrate5_read_reg ( heartrate5_t * ctx,
uint8_t reg_addr )

Heart Rate 5 register reading function.

This function reads a 24-bit data from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
[in]reg_addr: Start register address.
Returns
24-bit read data.

◆ heartrate5_sw_reset()

void heartrate5_sw_reset ( heartrate5_t * ctx)

Heart Rate 5 software reset function.

This function is used to perform software reset.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
Returns
Nothing.

◆ heartrate5_write_reg()

void heartrate5_write_reg ( heartrate5_t * ctx,
uint8_t reg_addr,
uint32_t write_data )

Heart Rate 5 register write function.

This function writes a 24-bit data into the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See heartrate5_t object definition for detailed explanation.
[in]reg_addr: Start register address.
[in]write_data: Data to be written.
Returns
Nothing.