heartrate5 2.0.0.0
|
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. | |
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.
void heartrate5_cfg_setup | ( | heartrate5_cfg_t * | cfg | ) |
Heart Rate 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See heartrate5_cfg_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See heartrate5_t object definition for detailed explanation. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.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.
[in] | ctx | : Click context object. See heartrate5_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See heartrate5_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See heartrate5_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See heartrate5_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See heartrate5_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See heartrate5_t object definition for detailed explanation. |
void heartrate5_hw_reset | ( | heartrate5_t * | ctx | ) |
Heart Rate 5 hardware reset function.
This function is used to perform hardware reset.
[in] | ctx | : Click context object. See heartrate5_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- Error.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.
[in] | ctx | : Click context object. See heartrate5_t object definition for detailed explanation. |
[in] | reg_addr | : Start register address. |
void heartrate5_sw_reset | ( | heartrate5_t * | ctx | ) |
Heart Rate 5 software reset function.
This function is used to perform software reset.
[in] | ctx | : Click context object. See heartrate5_t object definition for detailed explanation. |
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.
[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. |