heartrate10 2.0.0.0
|
API for configuring and manipulating Heart Rate 10 Click driver. More...
Topics | |
Heart Rate 10 Registers List | |
List of registers of Heart Rate 10 Click driver. | |
Heart Rate 10 Registers Settings | |
Settings for registers of Heart Rate 10 Click driver. | |
Heart Rate 10 MikroBUS Map | |
MikroBUS pin mapping of Heart Rate 10 Click driver. | |
Functions | |
void | heartrate10_cfg_setup (heartrate10_cfg_t *cfg) |
Heart Rate 10 configuration object setup function. | |
err_t | heartrate10_init (heartrate10_t *ctx, heartrate10_cfg_t *cfg) |
Heart Rate 10 initialization function. | |
err_t | heartrate10_default_cfg (heartrate10_t *ctx) |
Heart Rate 10 default configuration function. | |
err_t | heartrate10_generic_write (heartrate10_t *ctx, uint8_t reg, uint8_t tx_data) |
Writing function. | |
err_t | heartrate10_generic_read (heartrate10_t *ctx, uint8_t reg, uint8_t *rx_data) |
Reading function. | |
uint8_t | heartrate10_get_int_pin (heartrate10_t *ctx) |
Get interrupt pin state. | |
void | heartrate10_reset (heartrate10_t *ctx) |
Reset device. | |
err_t | heartrate10_fifo_read (heartrate10_t *ctx, uint8_t *rx_buf, uint8_t rx_len) |
Read fifo register data. | |
uint32_t | heartrate10_read_fifo_sample (heartrate10_t *ctx) |
Read single sample of FIFO data. | |
err_t | heartrate10_read_complete_fifo_data (heartrate10_t *ctx, uint32_t *led1, uint32_t *led2, uint32_t *led3, uint32_t *led4) |
Read all led samples. | |
API for configuring and manipulating Heart Rate 10 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void heartrate10_cfg_setup | ( | heartrate10_cfg_t * | cfg | ) |
Heart Rate 10 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See heartrate10_cfg_t object definition for detailed explanation. |
err_t heartrate10_default_cfg | ( | heartrate10_t * | ctx | ) |
Heart Rate 10 default configuration function.
This function executes a default configuration of Heart Rate 10 click board.
[in] | ctx | : Click context object. See heartrate10_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t heartrate10_fifo_read | ( | heartrate10_t * | ctx, |
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Read fifo register data.
This function reads a data from the HEARTRATE10_REG_FIFO_DATA.
[in] | ctx | : Click context object. See heartrate10_t object definition for detailed explanation. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Length of data to read. |
0
- Success, -1
- Error.err_t heartrate10_generic_read | ( | heartrate10_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_data ) |
Reading function.
This function reads a data from the selected register.
[in] | ctx | : Click context object. See heartrate10_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | rx_data | : Output read data. |
0
- Success, -1
- Error.err_t heartrate10_generic_write | ( | heartrate10_t * | ctx, |
uint8_t | reg, | ||
uint8_t | tx_data ) |
Writing function.
This function writes a data to the selected register.
[in] | ctx | : Click context object. See heartrate10_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_data | : Data to be written. |
0
- Success, -1
- Error.uint8_t heartrate10_get_int_pin | ( | heartrate10_t * | ctx | ) |
Get interrupt pin state.
Read and return int_pin state.
[in] | ctx | : Click context object. See heartrate10_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
err_t heartrate10_init | ( | heartrate10_t * | ctx, |
heartrate10_cfg_t * | cfg ) |
Heart Rate 10 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See heartrate10_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See heartrate10_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t heartrate10_read_complete_fifo_data | ( | heartrate10_t * | ctx, |
uint32_t * | led1, | ||
uint32_t * | led2, | ||
uint32_t * | led3, | ||
uint32_t * | led4 ) |
Read all led samples.
This function reads a 12 bytes from FIFO data register and concatenates data into 4 x 19bit led data.
[in] | ctx | : Click context object. See heartrate10_t object definition for detailed explanation. |
[out] | led1 | : Led1 output read data. |
[out] | led2 | : Led2 output read data. |
[out] | led3 | : Led3 output read data. |
[out] | led4 | : Led4 output read data. |
0
- Success, -1
- Error.uint32_t heartrate10_read_fifo_sample | ( | heartrate10_t * | ctx | ) |
Read single sample of FIFO data.
This function reads a 3 bytes from FIFO data register and concatenates data into 19bit led data.
[in] | ctx | : Click context object. See heartrate10_t object definition for detailed explanation. |
void heartrate10_reset | ( | heartrate10_t * | ctx | ) |
Reset device.
Set bit for reseting device and waits untill bit is cleared.
[in] | ctx | : Click context object. See heartrate10_t object definition for detailed explanation. |