f05ffddbde
* Power: add portability layer, port to F3. * F3: bq25896 driver stab * GUI: new primary and secondary fonts * F3: bq25896 register map, basic functions * F3: move bq27220 command descritpion to separate file. Code format. * Power: OTG enable/disable * Power: choose more correct profile * F3: pet bq25896 watchdog sometimes
22 lines
483 B
C
22 lines
483 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
/* Initialize Driver */
|
|
void bq27220_init();
|
|
|
|
/* Get battery voltage in mV */
|
|
uint16_t bq27220_get_voltage();
|
|
|
|
/* Get current in mA */
|
|
int16_t bq27220_get_current();
|
|
|
|
/* Get compensated full charge capacity in in mAh */
|
|
uint16_t bq27220_get_full_charge_capacity();
|
|
|
|
/* Get remaining capacity in in mAh */
|
|
uint16_t bq27220_get_remaining_capacity();
|
|
|
|
/* Get predicted remaining battery capacity in percents */
|
|
uint16_t bq27220_get_state_of_charge();
|