balancer2 2.0.0.0
|
Functions | |
void | balancer2_cfg_setup (balancer2_cfg_t *cfg) |
Config Object Initialization function. | |
BALANCER2_RETVAL | balancer2_init (balancer2_t *ctx, balancer2_cfg_t *cfg) |
Initialization function. | |
void | balancer2_default_cfg (balancer2_t *ctx) |
Click Default Configuration function. | |
void | balancer2_cell_1_state (balancer2_t *ctx, uint8_t state) |
Generic function for setting cell 1 pin status. | |
void | balancer2_cell_2_state (balancer2_t *ctx, uint8_t state) |
Generic function for setting cell 2 pin status. | |
void | balancer2_supply_state (balancer2_t *ctx, uint8_t state) |
Generic function for setting supply pin status. | |
void | balancer2_status_led_state (balancer2_t *ctx, uint8_t state) |
Generic function for setting status led pin status. | |
uint16_t | balancer2_read_adc (balancer2_t *ctx, uint8_t cmd_byte) |
Function for reading adc value. | |
void | balancer2_set_vref (balancer2_t *ctx, uint16_t vref) |
Function for setting reference value. | |
float | balancer2_get_batttery_lvl (balancer2_t *ctx, uint8_t bat_num) |
Function for getting real battery lvl. | |
float | balancer2_adc_to_mv (balancer2_t *ctx, uint16_t adc_val) |
Function for converting adc value to mV. | |
float balancer2_adc_to_mv | ( | balancer2_t * | ctx, |
uint16_t | adc_val ) |
Function for converting adc value to mV.
ctx | Click object. |
adc_val | Adc value. |
@description This function converting adc value to mV.
void balancer2_cell_1_state | ( | balancer2_t * | ctx, |
uint8_t | state ) |
Generic function for setting cell 1 pin status.
ctx | Click object. |
state | State of the pin. |
@description This function setting cell 1 pin status.
void balancer2_cell_2_state | ( | balancer2_t * | ctx, |
uint8_t | state ) |
Generic function for setting cell 2 pin status.
ctx | Click object. |
state | State of the pin. |
@description This function setting cell 2 pin status.
void balancer2_cfg_setup | ( | balancer2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void balancer2_default_cfg | ( | balancer2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for BALANCER 2 click.
float balancer2_get_batttery_lvl | ( | balancer2_t * | ctx, |
uint8_t | bat_num ) |
Function for getting real battery lvl.
ctx | Click object. |
bat_num | Battery macro. |
@description This function getting real battery lvl.
BALANCER2_RETVAL balancer2_init | ( | balancer2_t * | ctx, |
balancer2_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.
uint16_t balancer2_read_adc | ( | balancer2_t * | ctx, |
uint8_t | cmd_byte ) |
Function for reading adc value.
ctx | Click object. |
cmd_byte | Command byte. |
@description This function setting status led pin status.
void balancer2_set_vref | ( | balancer2_t * | ctx, |
uint16_t | vref ) |
Function for setting reference value.
ctx | Click object. |
vref | Reference value. |
void balancer2_status_led_state | ( | balancer2_t * | ctx, |
uint8_t | state ) |
Generic function for setting status led pin status.
ctx | Click object. |
state | State of the pin. |
@description This function setting status led pin status.
void balancer2_supply_state | ( | balancer2_t * | ctx, |
uint8_t | state ) |
Generic function for setting supply pin status.
ctx | Click object. |
state | State of the pin. |
@description This function setting supply pin status.