heartrate2 2.0.0.0
|
Functions | |
void | heartrate2_cfg_setup (heartrate2_cfg_t *cfg) |
Config Object Initialization function. | |
HEARTRATE2_RETVAL | heartrate2_init (heartrate2_t *ctx, heartrate2_cfg_t *cfg) |
Initialization function. | |
void | heartrate2_default_cfg (heartrate2_t *ctx, uint8_t cfg_led) |
Click Default Configuration function. | |
void | heartrate2_generic_write (heartrate2_t *ctx, uint8_t reg_adr, uint8_t write_data) |
Generic write function. | |
uint8_t | heartrate2_generic_read (heartrate2_t *ctx, uint8_t reg_adr) |
Generic read function. | |
void | heartrate2_read_buf (heartrate2_t *ctx, uint8_t reg_adr, uint8_t *read_buf, uint8_t buf_size) |
Function for reading data buffer from registar. | |
void | heartrate2_read_fifo (heartrate2_t *ctx, heartrate2_fifo_data_t *fifo) |
Generic function for reading data from fifo registar. | |
float | heartrate2_read_temp (heartrate2_t *ctx) |
Function for reading temperature of device. | |
void | heartrate2_soft_reset (heartrate2_t *ctx) |
Function for restarting device. | |
uint8_t | heartrate2_ppg_config (heartrate2_t *ctx, heartrate2_ppg_cfg_t *ppg_cfg) |
Function for configurating ppg registers. | |
void | heartrate2_ledpa_config (heartrate2_t *ctx, heartrate2_ledpa_t *ledpa) |
Function for configurating led pa registers. | |
uint8_t | heartrate2_led_range_curr_config (heartrate2_t *ctx, heartrate2_led_range_curr_t *led_range) |
Function for configurating led current range registers. | |
uint8_t | heartrate2_led_sequence_config (heartrate2_t *ctx, heartrate2_ledsq_cfg_t *ledsq) |
Function for configurating led sequence registers. | |
uint8_t | heartrate2_int_control (heartrate2_t *ctx, heartrate2_int_t *int_ctrl) |
Function for configurating interrupt registers. | |
void | heartrate2_int_status (heartrate2_t *ctx, heartrate2_int_t *int_status) |
Function for reading interrupt status. | |
uint8_t | heartrate2_get_int (heartrate2_t *ctx) |
Function for reading int pin status. | |
uint8_t | heartrate2_get_gp (heartrate2_t *ctx) |
Function for reading gp pin status. | |
void | heartrate2_set_en (heartrate2_t *ctx, uint8_t state) |
Function for setting en pin status. | |
void heartrate2_cfg_setup | ( | heartrate2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void heartrate2_default_cfg | ( | heartrate2_t * | ctx, |
uint8_t | cfg_led ) |
Click Default Configuration function.
ctx | Click object. |
cfg_led | select one of led macros to enable and set configuration for selected led ( HEARTRATE2_CONFIG_GREEN or HEARTRATE2_CONFIG_IR or HEARTRATE2_CONFIG_RED ) |
@description This function executes default configuration for HeartRate2 click.
uint8_t heartrate2_generic_read | ( | heartrate2_t * | ctx, |
uint8_t | reg_adr ) |
Generic read function.
ctx | Click object. |
reg_adr | Register address. |
@description This function reads data from the desired register.
void heartrate2_generic_write | ( | heartrate2_t * | ctx, |
uint8_t | reg_adr, | ||
uint8_t | write_data ) |
Generic write function.
ctx | Click object. |
reg_adr | Register address. |
data_buf | Data to be written. |
@description This function writes data to the desired register.
uint8_t heartrate2_get_gp | ( | heartrate2_t * | ctx | ) |
Function for reading gp pin status.
ctx | Click object. |
@description This function reads gp pin status.
uint8_t heartrate2_get_int | ( | heartrate2_t * | ctx | ) |
Function for reading int pin status.
ctx | Click object. |
@description This function reads int pin status.
HEARTRATE2_RETVAL heartrate2_init | ( | heartrate2_t * | ctx, |
heartrate2_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 heartrate2_int_control | ( | heartrate2_t * | ctx, |
heartrate2_int_t * | int_ctrl ) |
Function for configurating interrupt registers.
ctx | Click object. |
int_ctrl | Struct with stored configuration. |
@description This function configure interrupt registars.
void heartrate2_int_status | ( | heartrate2_t * | ctx, |
heartrate2_int_t * | int_status ) |
Function for reading interrupt status.
ctx | Click object. |
int_status | Struct with stored configuration. |
@description This function reads interrupt status.
uint8_t heartrate2_led_range_curr_config | ( | heartrate2_t * | ctx, |
heartrate2_led_range_curr_t * | led_range ) |
Function for configurating led current range registers.
ctx | Click object. |
led_range | Struct with stored configuration. |
@description This function configure led current range registars.
uint8_t heartrate2_led_sequence_config | ( | heartrate2_t * | ctx, |
heartrate2_ledsq_cfg_t * | ledsq ) |
Function for configurating led sequence registers.
ctx | Click object. |
ledsq | Struct with stored configuration. |
@description This function configure led sequence registars.
void heartrate2_ledpa_config | ( | heartrate2_t * | ctx, |
heartrate2_ledpa_t * | ledpa ) |
Function for configurating led pa registers.
ctx | Click object. |
ledpa | Struct with stored configuration. |
@description This function configure led pa registars.
uint8_t heartrate2_ppg_config | ( | heartrate2_t * | ctx, |
heartrate2_ppg_cfg_t * | ppg_cfg ) |
Function for configurating ppg registers.
ctx | Click object. |
ppg_cfg | Struct with stored configuration. |
@description This function configure ppg registars.
void heartrate2_read_buf | ( | heartrate2_t * | ctx, |
uint8_t | reg_adr, | ||
uint8_t * | read_buf, | ||
uint8_t | buf_size ) |
Function for reading data buffer from registar.
ctx | Click object. |
reg_adr | Register address. |
data_buf | Read buffer to store data. |
len | Size of read buffer. |
@description This function reads data buffer from the desired register.
void heartrate2_read_fifo | ( | heartrate2_t * | ctx, |
heartrate2_fifo_data_t * | fifo ) |
Generic function for reading data from fifo registar.
ctx | Click object. |
fifo | Pointer to fifo register. |
@description This function reads data buffer from the desired register.
float heartrate2_read_temp | ( | heartrate2_t * | ctx | ) |
Function for reading temperature of device.
ctx | Click object. |
@description This function reads temperature of device.
void heartrate2_set_en | ( | heartrate2_t * | ctx, |
uint8_t | state ) |
Function for setting en pin status.
ctx | Click object. |
@description This function settings en pin status.
void heartrate2_soft_reset | ( | heartrate2_t * | ctx | ) |
Function for restarting device.
ctx | Click object. |
@description This function restarts device.