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. | |
void heartrate3_cfg_setup | ( | heartrate3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
uint8_t heartrate3_check_data_ready | ( | heartrate3_t * | ctx | ) |
Check data ready function.
ctx | Click object. |
Function is used to check data ready flag.
void heartrate3_clk_state | ( | heartrate3_t * | ctx, |
uint8_t | state ) |
Set Clock pin state.
ctx | Click object. |
state | 0 - clk pin cleared / 1 - clk pin set |
Function is used to set or clear clk pin.
err_t heartrate3_default_cfg | ( | heartrate3_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
This function executes default configuration for HeartRate3 click.
err_t heartrate3_generic_read | ( | heartrate3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_out | Output data buf |
len | Number of the bytes to be read |
This function reads data from the desired register.
err_t heartrate3_generic_write | ( | heartrate3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_in | Data buf to be written. |
len | Number of the bytes in data buf. |
This function writes data to the desired register.
err_t heartrate3_init | ( | heartrate3_t * | ctx, |
heartrate3_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
err_t heartrate3_read_16bit | ( | heartrate3_t * | ctx, |
uint8_t | reg_adr, | ||
uint16_t * | data_out ) |
Read 16-bit data function.
ctx | Click object. |
reg_adr | 8-bit data that defines register's address |
data_out | 16-bit value read from chosen register |
Function is used to read 16-bit value from register.
err_t heartrate3_read_24bit | ( | heartrate3_t * | ctx, |
uint8_t | reg_adr, | ||
uint32_t * | data_out ) |
Read 24-bit data function.
ctx | Click object. |
reg_adr | 8-bit data that defines register's address |
data_out | 24-bit value read from chosen register |
Function is used to read 24-bit value from register.
void heartrate3_rst_state | ( | heartrate3_t * | ctx, |
uint8_t | state ) |
Set Reset pin state.
ctx | Click object. |
state | 0 - rst pin cleared / 1 - rst pin set |
Function is used to set or clear rst pin.
err_t heartrate3_write_data | ( | heartrate3_t * | ctx, |
uint8_t | reg_adr, | ||
uint32_t | wr_data ) |
Write data function.
ctx | Click object. |
reg_adr | 8-bit data that defines register's address |
wr_data | 32-bit used defined data to be written into register |
Function is used to write 32-bit data into register.