heartrate3 2.0.0.0

Functions

void heartrate3_cfg_setup (heartrate3_cfg_t *cfg)
 Config Object Initialization function.
 
err_t heartrate3_init (heartrate3_t *ctx, heartrate3_cfg_t *cfg)
 Initialization function.
 
err_t heartrate3_default_cfg (heartrate3_t *ctx)
 Click Default Configuration function.
 
err_t heartrate3_generic_write (heartrate3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Generic write function.
 
err_t heartrate3_generic_read (heartrate3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Generic read function.
 
err_t heartrate3_write_data (heartrate3_t *ctx, uint8_t reg_adr, uint32_t wr_data)
 Write data function.
 
err_t heartrate3_read_24bit (heartrate3_t *ctx, uint8_t reg_adr, uint32_t *data_out)
 Read 24-bit data function.
 
err_t heartrate3_read_16bit (heartrate3_t *ctx, uint8_t reg_adr, uint16_t *data_out)
 Read 16-bit data function.
 
void heartrate3_rst_state (heartrate3_t *ctx, uint8_t state)
 Set Reset pin state.
 
void heartrate3_clk_state (heartrate3_t *ctx, uint8_t state)
 Set Clock pin state.
 
uint8_t heartrate3_check_data_ready (heartrate3_t *ctx)
 Check data ready function.
 

Detailed Description

Function Documentation

◆ heartrate3_cfg_setup()

void heartrate3_cfg_setup ( heartrate3_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ heartrate3_check_data_ready()

uint8_t heartrate3_check_data_ready ( heartrate3_t * ctx)

Check data ready function.

Parameters
ctxClick object.
Returns
1 : data ready / 0 : data not ready

Function is used to check data ready flag.

◆ heartrate3_clk_state()

void heartrate3_clk_state ( heartrate3_t * ctx,
uint8_t state )

Set Clock pin state.

Parameters
ctxClick object.
state0 - clk pin cleared / 1 - clk pin set

Function is used to set or clear clk pin.

◆ heartrate3_default_cfg()

err_t heartrate3_default_cfg ( heartrate3_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

This function executes default configuration for HeartRate3 click.

◆ heartrate3_generic_read()

err_t heartrate3_generic_read ( heartrate3_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_outOutput data buf
lenNumber of the bytes to be read

This function reads data from the desired register.

◆ heartrate3_generic_write()

err_t heartrate3_generic_write ( heartrate3_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_inData buf to be written.
lenNumber of the bytes in data buf.

This function writes data to the desired register.

◆ heartrate3_init()

err_t heartrate3_init ( heartrate3_t * ctx,
heartrate3_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ heartrate3_read_16bit()

err_t heartrate3_read_16bit ( heartrate3_t * ctx,
uint8_t reg_adr,
uint16_t * data_out )

Read 16-bit data function.

Parameters
ctxClick object.
reg_adr8-bit data that defines register's address
data_out16-bit value read from chosen register

Function is used to read 16-bit value from register.

◆ heartrate3_read_24bit()

err_t heartrate3_read_24bit ( heartrate3_t * ctx,
uint8_t reg_adr,
uint32_t * data_out )

Read 24-bit data function.

Parameters
ctxClick object.
reg_adr8-bit data that defines register's address
data_out24-bit value read from chosen register

Function is used to read 24-bit value from register.

◆ heartrate3_rst_state()

void heartrate3_rst_state ( heartrate3_t * ctx,
uint8_t state )

Set Reset pin state.

Parameters
ctxClick object.
state0 - rst pin cleared / 1 - rst pin set

Function is used to set or clear rst pin.

◆ heartrate3_write_data()

err_t heartrate3_write_data ( heartrate3_t * ctx,
uint8_t reg_adr,
uint32_t wr_data )

Write data function.

Parameters
ctxClick object.
reg_adr8-bit data that defines register's address
wr_data32-bit used defined data to be written into register

Function is used to write 32-bit data into register.