ammeter 2.0.0.0
|
Functions | |
void | ammeter_cfg_setup (ammeter_cfg_t *cfg) |
Config Object Initialization function. | |
AMMETER_RETVAL | ammeter_init (ammeter_t *ctx, ammeter_cfg_t *cfg) |
Initialization function. | |
uint16_t | ammeter_data_read (ammeter_t *ctx) |
Data read function. | |
uint16_t | ammeter_get_raw_data (ammeter_t *ctx) |
Get raw data function. | |
float | ammeter_get_avg_data (ammeter_t *ctx) |
Get average average data function. | |
float | ammeter_amperage (ammeter_t *ctx) |
Get amperage function. | |
float ammeter_amperage | ( | ammeter_t * | ctx | ) |
Get amperage function.
ctx | Click object. |
Function is used to measure amperage of a power consumer connected to the click board.
void ammeter_cfg_setup | ( | ammeter_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint16_t ammeter_data_read | ( | ammeter_t * | ctx | ) |
Data read function.
ctx | Click object. |
Function is used to read data from output register.
float ammeter_get_avg_data | ( | ammeter_t * | ctx | ) |
Get average average data function.
ctx | Click object. |
Function is used to calculate average data value.
uint16_t ammeter_get_raw_data | ( | ammeter_t * | ctx | ) |
Get raw data function.
ctx | Click object. |
Function is used to read raw data value from output register.
AMMETER_RETVAL ammeter_init | ( | ammeter_t * | ctx, |
ammeter_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.