current 2.0.0.0
|
Functions | |
void | current_cfg_setup (current_cfg_t *cfg) |
Config Object Initialization function. | |
CURRENT_RETVAL | current_init (current_t *ctx, current_cfg_t *cfg) |
Initialization function. | |
uint16_t | current_data_read (current_t *ctx) |
Data read function. | |
uint16_t | current_get_raw_data (current_t *ctx) |
Get raw data function. | |
float | current_avg_rata (current_t *ctx) |
Calculate average data function. | |
float | current_get_current_data (current_t *ctx, float r_hunt) |
Get current value function. | |
float current_avg_rata | ( | current_t * | ctx | ) |
Calculate average data function.
ctx | Click object. |
Function is used to calculate average raw data value.
void current_cfg_setup | ( | current_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint16_t current_data_read | ( | current_t * | ctx | ) |
Data read function.
ctx | Click object. |
Function is used to read data from output register.
float current_get_current_data | ( | current_t * | ctx, |
float | r_hunt ) |
Get current value function.
ctx | Click object. | |
[in] | rShunt | float value representing shunt resistor. |
Function is used to calculate current in mA.
uint16_t current_get_raw_data | ( | current_t * | ctx | ) |
Get raw data function.
ctx | Click object. |
Function is used to read raw data value from output register.
CURRENT_RETVAL current_init | ( | current_t * | ctx, |
current_cfg_t * | cfg ) |
Initialization function.
current | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.