heartrate11 2.0.0.0
|
API for configuring and manipulating Heart Rate 11 Click driver. More...
Topics | |
Heart Rate 11 Registers List | |
List of registers of Heart Rate 11 Click driver. | |
Heart Rate 11 Registers Settings | |
Settings for registers of Heart Rate 11 Click driver. | |
Heart Rate 11 MikroBUS Map | |
MikroBUS pin mapping of Heart Rate 11 Click driver. | |
Functions | |
void | heartrate11_cfg_setup (heartrate11_cfg_t *cfg) |
Heart Rate 11 configuration object setup function. | |
err_t | heartrate11_init (heartrate11_t *ctx, heartrate11_cfg_t *cfg) |
Heart Rate 11 initialization function. | |
err_t | heartrate11_default_cfg (heartrate11_t *ctx) |
Heart Rate 11 default configuration function. | |
err_t | heartrate11_generic_write (heartrate11_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Heart Rate 11 I2C writing function. | |
err_t | heartrate11_generic_read (heartrate11_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Heart Rate 11 I2C reading function. | |
err_t | heartrate11_write_register (heartrate11_t *ctx, uint8_t reg, uint8_t data_in) |
Heart Rate 11 write register function. | |
err_t | heartrate11_read_register (heartrate11_t *ctx, uint8_t reg, uint8_t *data_out) |
Heart Rate 11 read register function. | |
uint8_t | heartrate11_get_int_pin (heartrate11_t *ctx) |
Heart Rate 11 get int pin function. | |
err_t | heartrate11_reset_device (heartrate11_t *ctx) |
Heart Rate 11 reset device function. | |
err_t | heartrate11_set_led_current (heartrate11_t *ctx, uint8_t led, float current) |
Heart Rate 11 set led current function. | |
err_t | heartrate11_read_fifo (heartrate11_t *ctx, uint32_t *fifo_data) |
Heart Rate 11 read fifo function. | |
API for configuring and manipulating Heart Rate 11 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void heartrate11_cfg_setup | ( | heartrate11_cfg_t * | cfg | ) |
Heart Rate 11 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See heartrate11_cfg_t object definition for detailed explanation. |
err_t heartrate11_default_cfg | ( | heartrate11_t * | ctx | ) |
Heart Rate 11 default configuration function.
This function executes a default configuration of Heart Rate 11 click board.
[in] | ctx | : Click context object. See heartrate11_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t heartrate11_generic_read | ( | heartrate11_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Heart Rate 11 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 heartrate11_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t heartrate11_generic_write | ( | heartrate11_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Heart Rate 11 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 heartrate11_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t heartrate11_get_int_pin | ( | heartrate11_t * | ctx | ) |
Heart Rate 11 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See heartrate11_t object definition for detailed explanation. |
err_t heartrate11_init | ( | heartrate11_t * | ctx, |
heartrate11_cfg_t * | cfg ) |
Heart Rate 11 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See heartrate11_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See heartrate11_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t heartrate11_read_fifo | ( | heartrate11_t * | ctx, |
uint32_t * | fifo_data ) |
Heart Rate 11 read fifo function.
This function reads a 24-bit data from the FIFO.
[in] | ctx | : Click context object. See heartrate11_t object definition for detailed explanation. |
[out] | fifo_data | : 24-bit FIFO data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t heartrate11_read_register | ( | heartrate11_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
Heart Rate 11 read register function.
This function reads data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See heartrate11_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t heartrate11_reset_device | ( | heartrate11_t * | ctx | ) |
Heart Rate 11 reset device function.
This function performs the device software reset by setting the SW_RESET bit.
[in] | ctx | : Click context object. See heartrate11_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t heartrate11_set_led_current | ( | heartrate11_t * | ctx, |
uint8_t | led, | ||
float | current ) |
Heart Rate 11 set led current function.
This function sets the maximal current of the selected LED.
[in] | ctx | : Click context object. See heartrate11_t object definition for detailed explanation. |
[in] | led | : LED selection
|
[in] | current | : Maximal current - up to 250mA (125mA for RED LED), |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t heartrate11_write_register | ( | heartrate11_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Heart Rate 11 write register function.
This function writes a desired data to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See heartrate11_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.