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:
あく
2020-11-11 09:31:35 +03:00
committed by GitHub
parent 49fdb28871
commit f05ffddbde
13 changed files with 646 additions and 42 deletions

View File

@@ -0,0 +1,22 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
/* Initialize drivers */
void api_hal_power_init();
/* Get predicted remaining battery capacity in percents */
uint8_t api_hal_power_get_pct();
/* Get charging status */
bool api_hal_power_is_charging();
/* Poweroff system */
void api_hal_power_off();
/* OTG enable */
void api_hal_power_enable_otg();
/* OTG disable */
void api_hal_power_disable_otg();