accurrent 2.0.0.0

Functions

void accurrent_cfg_setup (accurrent_cfg_t *cfg)
 Config Object Initialization function.
 
err_t accurrent_init (accurrent_t *ctx, accurrent_cfg_t *cfg)
 Initialization function.
 
void accurrent_generic_transfer (accurrent_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
float accurrent_get_a (accurrent_t *ctx)
 Gets current value of AC Current in A.
 
float accurrent_get_ma (accurrent_t *ctx)
 Gets current value of AC Current in mA.
 

Detailed Description

Function Documentation

◆ accurrent_cfg_setup()

void accurrent_cfg_setup ( accurrent_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.

◆ accurrent_generic_transfer()

void accurrent_generic_transfer ( accurrent_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

◆ accurrent_get_a()

float accurrent_get_a ( accurrent_t * ctx)

Gets current value of AC Current in A.

Parameters
ctxClick object.

@description Returns float value of current in A.

◆ accurrent_get_ma()

float accurrent_get_ma ( accurrent_t * ctx)

Gets current value of AC Current in mA.

Parameters
ctxClick object.

@description Returns float value of current in mA.

◆ accurrent_init()

err_t accurrent_init ( accurrent_t * ctx,
accurrent_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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