ecggsr 2.0.0.0
Public function

Functions

void ecggsr_cfg_setup (ecggsr_cfg_t *cfg)
 ECG GSR configuration object setup function.
 
err_t ecggsr_init (ecggsr_t *ctx, ecggsr_cfg_t *cfg)
 Initialization function.
 
void ecggsr_default_cfg (ecggsr_t *ctx, ecggsr_cfg_t *cfg)
 Click Default Configuration function.
 
err_t ecggsr_write_reg (ecggsr_t *ctx, uint8_t register_address, uint8_t transfer_data)
 Generic Write function.
 
err_t ecggsr_read_reg (ecggsr_t *ctx, uint8_t register_address, uint8_t *data_out, uint8_t num_of_regs)
 Generic Read function.
 
void ecggsr_read_dev_id (ecggsr_t *ctx, uint8_t *dev_id_out)
 ECG GSR Read ID function.
 
void ecggsr_reset (ecggsr_t *ctx)
 ECG GSR Reset function.
 

Detailed Description

Function Documentation

◆ ecggsr_cfg_setup()

void ecggsr_cfg_setup ( ecggsr_cfg_t * cfg)

ECG GSR configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[in]*cfgClick configuration structure.
Note
All used pins will be set to unconnected state.

◆ ecggsr_default_cfg()

void ecggsr_default_cfg ( ecggsr_t * ctx,
ecggsr_cfg_t * cfg )

Click Default Configuration function.

This function executes default configuration for ECG GSR Click.

Parameters
[in]*ctxClick object.
[in]*cfgClick configuration structure.

◆ ecggsr_init()

err_t ecggsr_init ( ecggsr_t * ctx,
ecggsr_cfg_t * cfg )

Initialization function.

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

Parameters
[in]*ctxClick object.
[in]*cfgClick configuration structure.
Returns
0 - OK, 1 - I2C Master Open functionality has failed.

◆ ecggsr_read_dev_id()

void ecggsr_read_dev_id ( ecggsr_t * ctx,
uint8_t * dev_id_out )

ECG GSR Read ID function.

Function performs reading of an ID of the device.

Parameters
[in]*ctxClick object.
[out]*dev_id_outBuffer for storing identification number that has been read.

◆ ecggsr_read_reg()

err_t ecggsr_read_reg ( ecggsr_t * ctx,
uint8_t register_address,
uint8_t * data_out,
uint8_t num_of_regs )

Generic Read function.

Function reads 8-bit data from the register/registers.

Parameters
[in]*cfgClick configuration.
[in]register_addressRegister which will be read.
[out]*data_outBuffer for storing data that has been read.
[in]num_of_regsNumber of registers to be read.
Returns
0 - OK, 1 - Wrong address parameter.

◆ ecggsr_reset()

void ecggsr_reset ( ecggsr_t * ctx)

ECG GSR Reset function.

Function performs the SW reset of the device and waits until the device returns back to normal state.

Parameters
[in]*ctxClick object.

◆ ecggsr_write_reg()

err_t ecggsr_write_reg ( ecggsr_t * ctx,
uint8_t register_address,
uint8_t transfer_data )

Generic Write function.

Function writes 8-bit data to the register.

Parameters
[in]*ctxClick object.
[in]register_addressRegister which will be written to.
[in]transfer_dataData to be written.
Returns
0 - OK, 1 - Wrong address parameter.