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. | |
void accurrent_cfg_setup | ( | accurrent_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
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.
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
float accurrent_get_a | ( | accurrent_t * | ctx | ) |
Gets current value of AC Current in A.
ctx | Click object. |
@description Returns float value of current in A.
float accurrent_get_ma | ( | accurrent_t * | ctx | ) |
Gets current value of AC Current in mA.
ctx | Click object. |
@description Returns float value of current in mA.
err_t accurrent_init | ( | accurrent_t * | ctx, |
accurrent_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.