ecg3 2.0.0.0
Public function

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.
 

Detailed Description

Function Documentation

◆ ecg3_cfg_setup()

void ecg3_cfg_setup ( ecg3_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ ecg3_check_status()

uint8_t ecg3_check_status ( ecg3_t * ctx,
uint32_t bit_mask )

Status Check function.

Parameters
ctxClick object.
bit_maskBit mask to checking the desired interrupt flag
Returns
0 - Interrupt is not present, 1 - Interrupt is present

@description Function checks a status flag for the desired interrupt.

◆ ecg3_default_cfg()

void ecg3_default_cfg ( ecg3_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for ECG 3 click.

◆ ecg3_fifo_reset()

void ecg3_fifo_reset ( ecg3_t * ctx)

FIFO Reset function.

Parameters
ctxClick object.

@description Function performs a FIFO reset.

◆ ecg3_generic_transfer()

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.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ ecg3_get_ecg()

void ecg3_get_ecg ( ecg3_t * ctx,
uint32_t * out_ecg )

ECG Get function.

Parameters
ctxClick object.
out_ecgMemory where ECG data be stored

@description Function reads ECG data from FIFO register.

◆ ecg3_get_rtor()

void ecg3_get_rtor ( ecg3_t * ctx,
uint16_t * out_hr,
uint16_t * out_rr )

RTOR Get function.

Parameters
ctxClick object.
out_hrMemory where Heart Rate data be stored
out_rrMemory 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_init()

ECG3_RETVAL ecg3_init ( ecg3_t * ctx,
ecg3_cfg_t * cfg )

Initialization function.

Parameters
ecg3Click object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ ecg3_read_reg()

uint8_t ecg3_read_reg ( ecg3_t * ctx,
uint8_t reg_addr,
uint32_t * data_out )

Generic Read function.

Parameters
ctxClick object.
reg_addrAddress which from data be read
data_inMemory where data be stored
Returns
0 - OK, 1 - Wrong address

@description Function reads data from the register.

◆ ecg3_sw_reset()

void ecg3_sw_reset ( ecg3_t * ctx)

SW Reset function.

Parameters
ctxClick object.

@description Function performs a SW reset.

◆ ecg3_sync()

void ecg3_sync ( ecg3_t * ctx)

Synchronization function.

Parameters
ctxClick object.

@description Function performs a device synchronization and begins a new ECG operations and recording.

◆ ecg3_write_reg()

uint8_t ecg3_write_reg ( ecg3_t * ctx,
uint8_t reg_addr,
uint32_t data_in )

Generic Write function.

Parameters
ctxClick object.
reg_addrAddress where data be written
data_inData to be written
Returns
0 - OK, 1 - Wrong address

@description Function writes data to the register.