heartrate 2.0.0.0
|
Functions | |
void | heartrate_cfg_setup (heartrate_cfg_t *cfg) |
Config Object Initialization function. | |
HEARTRATE_RETVAL | heartrate_init (heartrate_t *ctx, heartrate_cfg_t *cfg) |
Initialization function. | |
void | heartrate_default_cfg (heartrate_t *ctx) |
Click Default Configuration function. | |
uint8_t | heartrate_get_revision_id (heartrate_t *ctx) |
Function for getting revision ID. | |
uint8_t | heartrate_get_part_id (heartrate_t *ctx) |
Function for getting part ID. | |
uint8_t | heartrate_get_config (heartrate_t *ctx) |
Function for getting configuration of the chip. | |
uint8_t | heartrate_get_status (heartrate_t *ctx) |
Function for getting status of heartrate click. | |
void | heartrate_set_config (heartrate_t *ctx, uint8_t cfg) |
Function for configuration heartrate chip. | |
void | heartrate_set_interrupt (heartrate_t *ctx, uint8_t intrpts) |
Function for setting interrupt for heartrate click. | |
uint8_t | heartrate_read_ir_red (heartrate_t *ctx, uint16_t *ir_buff, uint16_t *red_buff) |
Function for reading IR and RED values. | |
void | heartrate_read_temp (heartrate_t *ctx, uint16_t *temp_value) |
Function for reading temperature. | |
uint8_t | heartrate_data_ready (heartrate_t *ctx) |
Function checking if the data is ready for reading. | |
void | heartrate_generic_write (heartrate_t *ctx, uint8_t reg, uint16_t len, uint8_t *data_buf) |
Generic write function. | |
void | heartrate_generic_read (heartrate_t *ctx, uint8_t reg, uint16_t len, uint8_t *data_buf) |
Generic read function. | |
void | hr_shut_down (heartrate_t *ctx, bool enable) |
Shut down function. | |
void | hr_reset (heartrate_t *ctx) |
Reset function. | |
void | hr_temp_enable (heartrate_t *ctx, bool enable) |
Single temperature reading function. | |
int8_t | hr_set_mode (heartrate_t *ctx, uint8_t mode) |
Set mode function. | |
void | hr_spo2_high_res_enable (heartrate_t *ctx, bool enable) |
Function for setting the SpO2 ADC resolution. | |
uint8_t | hr_spo2_set_sample_rate (heartrate_t *ctx, uint8_t sample_rate) |
Function for setting. | |
uint8_t | hr_set_led_pulse_width (heartrate_t *ctx, uint8_t _value) |
Function for setting LED pulse width. | |
uint8_t | hr_set_red_current_level (heartrate_t *ctx, uint8_t level) |
Function for setting Red LED. | |
uint8_t | hr_set_ir_current_level (heartrate_t *ctx, uint8_t level) |
Function for setting. | |
void | hr_fifo_almost_full_int_enable (heartrate_t *ctx, bool enable) |
Function to enable/disable the FIFO almost full interrupt. | |
void | hr_temp_ready_int_enable (heartrate_t *ctx, bool enable) |
Function to enable/disable the temperature data ready interrupt. | |
void | hr_heartrate_data_ready_int_enable (heartrate_t *ctx, bool enable) |
Function to enable/disable heart rate data ready interrupt. | |
void | hr_heartrate_spo2_data_ready_int_enable (heartrate_t *ctx, bool enable) |
Function to enable/disable the SpO2 data ready. | |
uint8_t | hr_read_diodes (heartrate_t *ctx, uint16_t *ir_buff, uint16_t *red_buff) |
Function for reading the ADC values of the IR and RED LEDs from the FIFO buffer. | |
uint8_t | hr_get_status (heartrate_t *ctx) |
Function for getting the value read from the interrupt status register. | |
void heartrate_cfg_setup | ( | heartrate_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t heartrate_data_ready | ( | heartrate_t * | ctx | ) |
Function checking if the data is ready for reading.
ctx | Click object. |
@description Using this function we can check if the data is ready for reading
void heartrate_default_cfg | ( | heartrate_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for HeartRate click.
void heartrate_generic_read | ( | heartrate_t * | ctx, |
uint8_t | reg, | ||
uint16_t | len, | ||
uint8_t * | data_buf ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void heartrate_generic_write | ( | heartrate_t * | ctx, |
uint8_t | reg, | ||
uint16_t | len, | ||
uint8_t * | data_buf ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint8_t heartrate_get_config | ( | heartrate_t * | ctx | ) |
Function for getting configuration of the chip.
ctx | Click object. |
@description Using this function we can get configuration of the chip.
uint8_t heartrate_get_part_id | ( | heartrate_t * | ctx | ) |
Function for getting part ID.
ctx | Click object. |
@description Using this function we can get part ID.
uint8_t heartrate_get_revision_id | ( | heartrate_t * | ctx | ) |
Function for getting revision ID.
ctx | Click object. |
@description Using this function we can get revision ID.
uint8_t heartrate_get_status | ( | heartrate_t * | ctx | ) |
Function for getting status of heartrate click.
ctx | Click object. |
@description Using this function we can get status of heartrate click.
HEARTRATE_RETVAL heartrate_init | ( | heartrate_t * | ctx, |
heartrate_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t heartrate_read_ir_red | ( | heartrate_t * | ctx, |
uint16_t * | ir_buff, | ||
uint16_t * | red_buff ) |
Function for reading IR and RED values.
ctx | Click object. |
ir_buff | IR values. |
red_buff | RED values. |
@description Using this function we can read IR and RED values.
void heartrate_read_temp | ( | heartrate_t * | ctx, |
uint16_t * | temp_value ) |
Function for reading temperature.
ctx | Click object. |
temp_value | Temperature value to be read. |
@description Using this function we can read temperature.
void heartrate_set_config | ( | heartrate_t * | ctx, |
uint8_t | cfg ) |
Function for configuration heartrate chip.
ctx | Click object. |
cfg | Confing byte. |
@description Using this function we can configure heartrate chip.
void heartrate_set_interrupt | ( | heartrate_t * | ctx, |
uint8_t | intrpts ) |
Function for setting interrupt for heartrate click.
ctx | Click object. |
intrpts | Interrup. |
@description Using this function we can set interrupt for heartrate click.
void hr_fifo_almost_full_int_enable | ( | heartrate_t * | ctx, |
bool | enable ) |
Function to enable/disable the FIFO almost full interrupt.
ctx | Click object. |
enable | True - interrupt enabled, false - interrupt disabled |
@description Enables/disables the FIFO almost full interrupt
uint8_t hr_get_status | ( | heartrate_t * | ctx | ) |
Function for getting the value read from the interrupt status register.
ctx | Click object. |
@description Returns the value read from the interrupt status register. The value shows which interrupts have been trigerred
void hr_heartrate_data_ready_int_enable | ( | heartrate_t * | ctx, |
bool | enable ) |
Function to enable/disable heart rate data ready interrupt.
ctx | Click object. |
enable | True - interrupt enabled, false - interrupt disabled |
@description Enables/disables heart rate data ready interrupt
void hr_heartrate_spo2_data_ready_int_enable | ( | heartrate_t * | ctx, |
bool | enable ) |
Function to enable/disable the SpO2 data ready.
ctx | Click object. |
enable | True - interrupt enabled, false - interrupt disabled |
@description Enables/disables the SpO2 data ready
uint8_t hr_read_diodes | ( | heartrate_t * | ctx, |
uint16_t * | ir_buff, | ||
uint16_t * | red_buff ) |
Function for reading the ADC values of the IR and RED LEDs from the FIFO buffer.
ctx | Click object. |
ir_buffer | Buffer to which to store the IR LED values |
red_buffer | Buffer to which to store the RED LED values |
@description Reads the ADC values of the IR and RED LEDs from the FIFO buffer, and stores them into the given buffers.
void hr_reset | ( | heartrate_t * | ctx | ) |
Reset function.
ctx | Click object. |
@description All configuration, threshold, and data registers are reset to their power-on-state.
uint8_t hr_set_ir_current_level | ( | heartrate_t * | ctx, |
uint8_t | level ) |
Function for setting.
ctx | Click object. |
level | Desired current level as stated in the datasheet |
@description Sets the current level of the IR LED.
uint8_t hr_set_led_pulse_width | ( | heartrate_t * | ctx, |
uint8_t | _value ) |
Function for setting LED pulse width.
ctx | Click object. |
_value | Desired pulse width as stated in the datasheet |
@description Sets the (the IR and RED have the same pulse width)
int8_t hr_set_mode | ( | heartrate_t * | ctx, |
uint8_t | mode ) |
Set mode function.
ctx | Click object. |
mode | Desired mode as stated in the datasheet |
@description Sets the operating state of the MAX30100
uint8_t hr_set_red_current_level | ( | heartrate_t * | ctx, |
uint8_t | level ) |
Function for setting Red LED.
ctx | Click object. |
level | Desired current level as stated in the datasheet |
@description Sets the current level of the Red LED.
void hr_shut_down | ( | heartrate_t * | ctx, |
bool | enable ) |
Shut down function.
ctx | Click object. |
enable | True - enables shut down, false - disables |
@description Enables/disables power saving mode. While in power-save mode, all registers retain their values, and write/read operations function as normal.
void hr_spo2_high_res_enable | ( | heartrate_t * | ctx, |
bool | enable ) |
Function for setting the SpO2 ADC resolution.
ctx | Click object. |
enable | True - enables SpO2 high resolution, False - disables |
@description Sets the SpO2 ADC resolution to 16-bit with 1.6ms LED pulse width.
uint8_t hr_spo2_set_sample_rate | ( | heartrate_t * | ctx, |
uint8_t | sample_rate ) |
Function for setting.
ctx | Click object. |
sample_rate | Desired sample rate as stated in the datasheet |
@description Sets the operating state of the MAX30100
void hr_temp_enable | ( | heartrate_t * | ctx, |
bool | enable ) |
Single temperature reading function.
ctx | Click object. |
enable | True - enables the reading, false - disables |
@description Initiates a single temperature reading from the temperature sensor. This bit is cleared automatically back to zero at the conclusion of the temperature reading when the bit is set to one in heart rate or SpO2 mode.
void hr_temp_ready_int_enable | ( | heartrate_t * | ctx, |
bool | enable ) |
Function to enable/disable the temperature data ready interrupt.
ctx | Click object. |
enable | True - interrupt enabled, false - interrupt disabled |
@description Enables/disables the temperature data ready interrupt