lem 2.0.0.0
Public function

Functions

void lem_cfg_setup (lem_cfg_t *cfg)
 Config Object Initialization function.
 
LEM_RETVAL lem_init (lem_t *ctx, lem_cfg_t *cfg)
 Initialization function.
 
int16_t lem_data_read (lem_t *ctx)
 Data read function.
 
float lem_get_current (lem_t *ctx, float coef)
 Get current in milliamperes function.
 

Detailed Description

Function Documentation

◆ lem_cfg_setup()

void lem_cfg_setup ( lem_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.

◆ lem_data_read()

int16_t lem_data_read ( lem_t * ctx)

Data read function.

Parameters
ctxClick object.
Returns
result 16-bit value that represents readings from output register.

Function is used to read data from output register.

◆ lem_get_current()

float lem_get_current ( lem_t * ctx,
float coef )

Get current in milliamperes function.

Parameters
ctxClick object.
coefCalculation coefficient.
Returns
result float value that represents current in milliamperes

Function is used to read current in amperes or milliamperes.

◆ lem_init()

LEM_RETVAL lem_init ( lem_t * ctx,
lem_cfg_t * cfg )

Initialization function.

Parameters
lemClick object.
cfgClick configuration structure.

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