ecg3 2.0.0.0
|
Functions | |
void | ecg3_cfg_setup (ecg3_cfg_t *cfg) |
Config Object Initialization function. | |
ECG3_RETVAL | ecg3_init (ecg3_t *ctx, ecg3_cfg_t *cfg) |
Initialization function. | |
void | ecg3_default_cfg (ecg3_t *ctx) |
Click Default Configuration function. | |
void | ecg3_generic_transfer (ecg3_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
uint8_t | ecg3_write_reg (ecg3_t *ctx, uint8_t reg_addr, uint32_t data_in) |
Generic Write function. | |
uint8_t | ecg3_read_reg (ecg3_t *ctx, uint8_t reg_addr, uint32_t *data_out) |
Generic Read function. | |
uint8_t | ecg3_check_status (ecg3_t *ctx, uint32_t bit_mask) |
Status Check function. | |
void | ecg3_sw_reset (ecg3_t *ctx) |
SW Reset function. | |
void | ecg3_fifo_reset (ecg3_t *ctx) |
FIFO Reset function. | |
void | ecg3_sync (ecg3_t *ctx) |
Synchronization function. | |
void | ecg3_get_ecg (ecg3_t *ctx, uint32_t *out_ecg) |
ECG Get function. | |
void | ecg3_get_rtor (ecg3_t *ctx, uint16_t *out_hr, uint16_t *out_rr) |
RTOR Get function. | |
void ecg3_cfg_setup | ( | ecg3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t ecg3_check_status | ( | ecg3_t * | ctx, |
uint32_t | bit_mask ) |
Status Check function.
ctx | Click object. |
bit_mask | Bit mask to checking the desired interrupt flag |
@description Function checks a status flag for the desired interrupt.
void ecg3_default_cfg | ( | ecg3_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for ECG 3 click.
void ecg3_fifo_reset | ( | ecg3_t * | ctx | ) |
FIFO Reset function.
ctx | Click object. |
@description Function performs a FIFO reset.
void ecg3_generic_transfer | ( | ecg3_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
void ecg3_get_ecg | ( | ecg3_t * | ctx, |
uint32_t * | out_ecg ) |
ECG Get function.
ctx | Click object. |
out_ecg | Memory where ECG data be stored |
@description Function reads ECG data from FIFO register.
void ecg3_get_rtor | ( | ecg3_t * | ctx, |
uint16_t * | out_hr, | ||
uint16_t * | out_rr ) |
RTOR Get function.
ctx | Click object. |
out_hr | Memory where Heart Rate data be stored |
out_rr | Memory where R - R data be stored |
@description Function reads Heart Rate and R - R data and calculates Heart Rate data to BPM, and R - R data to ms.
ECG3_RETVAL ecg3_init | ( | ecg3_t * | ctx, |
ecg3_cfg_t * | cfg ) |
Initialization function.
ecg3 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t ecg3_read_reg | ( | ecg3_t * | ctx, |
uint8_t | reg_addr, | ||
uint32_t * | data_out ) |
Generic Read function.
ctx | Click object. |
reg_addr | Address which from data be read |
data_in | Memory where data be stored |
@description Function reads data from the register.
void ecg3_sw_reset | ( | ecg3_t * | ctx | ) |
SW Reset function.
ctx | Click object. |
@description Function performs a SW reset.
void ecg3_sync | ( | ecg3_t * | ctx | ) |
Synchronization function.
ctx | Click object. |
@description Function performs a device synchronization and begins a new ECG operations and recording.
uint8_t ecg3_write_reg | ( | ecg3_t * | ctx, |
uint8_t | reg_addr, | ||
uint32_t | data_in ) |
Generic Write function.
ctx | Click object. |
reg_addr | Address where data be written |
data_in | Data to be written |
@description Function writes data to the register.