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
This commit is contained in:
21
firmware/targets/f3/Inc/bq27220.h
Normal file
21
firmware/targets/f3/Inc/bq27220.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#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();
|
||||
Reference in New Issue
Block a user