Power: Also ask charger if charge done (#1378)
* power: Also ask charger if charge done * F7: bump API Symbols version * Lib: remove double include in bq25896.c Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
entry,status,name,type,params
|
||||
Version,+,1.11,,
|
||||
Version,+,1.12,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/cli/cli.h,,
|
||||
Header,+,applications/services/cli/cli_vcp.h,,
|
||||
@@ -1141,6 +1141,7 @@ Function,+,furi_hal_power_insomnia_enter,void,
|
||||
Function,+,furi_hal_power_insomnia_exit,void,
|
||||
Function,-,furi_hal_power_insomnia_level,uint16_t,
|
||||
Function,+,furi_hal_power_is_charging,_Bool,
|
||||
Function,+,furi_hal_power_is_charging_done,_Bool,
|
||||
Function,+,furi_hal_power_is_otg_enabled,_Bool,
|
||||
Function,+,furi_hal_power_off,void,
|
||||
Function,+,furi_hal_power_reset,void,
|
||||
|
|
@@ -266,6 +266,13 @@ bool furi_hal_power_is_charging() {
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool furi_hal_power_is_charging_done() {
|
||||
furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
|
||||
bool ret = bq25896_is_charging_done(&furi_hal_i2c_handle_power);
|
||||
furi_hal_i2c_release(&furi_hal_i2c_handle_power);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void furi_hal_power_shutdown() {
|
||||
furi_hal_power_insomnia_enter();
|
||||
|
||||
|
@@ -85,6 +85,12 @@ uint8_t furi_hal_power_get_bat_health_pct();
|
||||
*/
|
||||
bool furi_hal_power_is_charging();
|
||||
|
||||
/** Get charge complete status
|
||||
*
|
||||
* @return true if done charging and connected to charger
|
||||
*/
|
||||
bool furi_hal_power_is_charging_done();
|
||||
|
||||
/** Switch MCU to SHUTDOWN */
|
||||
void furi_hal_power_shutdown();
|
||||
|
||||
|
Reference in New Issue
Block a user