unleashed-firmware/firmware/targets/f3/Inc/bq27220.h
あく f05ffddbde
Power: bq25896 and bq27220 drivers, portable power api. (#224)
* 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
2020-11-11 09:31:35 +03:00

21 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();