heartrate9 2.0.0.0
Heart Rate 9 Click Driver

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

Topics

 Heart Rate 9 Device Settings
 Settings for registers of Heart Rate 9 Click driver.
 
 Heart Rate 9 MikroBUS Map
 MikroBUS pin mapping of Heart Rate 9 Click driver.
 

Functions

void heartrate9_cfg_setup (heartrate9_cfg_t *cfg)
 Heart Rate 9 configuration object setup function.
 
err_t heartrate9_init (heartrate9_t *ctx, heartrate9_cfg_t *cfg)
 Heart Rate 9 initialization function.
 
err_t heartrate9_generic_write (heartrate9_t *ctx, char *data_buf, uint16_t len)
 Heart Rate 9 data writing function.
 
err_t heartrate9_generic_read (heartrate9_t *ctx, char *data_buf, uint16_t max_len)
 Heart Rate 9 data reading function.
 
void heartrate9_set_rst (heartrate9_t *ctx, uint8_t state)
 Sets state of the rst pin setting.
 

Detailed Description

API for configuring and manipulating Heart Rate 9 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

◆ heartrate9_cfg_setup()

void heartrate9_cfg_setup ( heartrate9_cfg_t * cfg)

Heart Rate 9 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ heartrate9_generic_read()

err_t heartrate9_generic_read ( heartrate9_t * ctx,
char * data_buf,
uint16_t max_len )

Heart Rate 9 data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See heartrate9_t object definition for detailed explanation.
[out]data_buf: Output read data.
[in]max_len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer.
See #err_t definition for detailed explanation.
Note
None.

◆ heartrate9_generic_write()

err_t heartrate9_generic_write ( heartrate9_t * ctx,
char * data_buf,
uint16_t len )

Heart Rate 9 data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See heartrate9_t object definition for detailed explanation.
[in]data_buf: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ heartrate9_init()

err_t heartrate9_init ( heartrate9_t * ctx,
heartrate9_cfg_t * cfg )

Heart Rate 9 initialization function.

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

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

◆ heartrate9_set_rst()

void heartrate9_set_rst ( heartrate9_t * ctx,
uint8_t state )

Sets state of the rst pin setting.

This function sets rst pin output to state setting.

Parameters
[in]ctxClick context object. See heartrate9_t object definition for detailed explanation.
[in]stateOutput value setting.
  • 0 - digital out high,
  • 1 - digital out low.