Api-hal-power: reset routine. Power: safe to poweroff message, cleanup. (#436)
This commit is contained in:
@@ -57,9 +57,12 @@ uint8_t api_hal_power_get_bat_health_pct();
|
||||
/** Get charging status */
|
||||
bool api_hal_power_is_charging();
|
||||
|
||||
/** Poweroff system */
|
||||
/** Poweroff device */
|
||||
void api_hal_power_off();
|
||||
|
||||
/** Reset device */
|
||||
void api_hal_power_reset();
|
||||
|
||||
/** OTG enable */
|
||||
void api_hal_power_enable_otg();
|
||||
|
||||
|
@@ -48,7 +48,7 @@ const ParamCEDV cedv = {
|
||||
|
||||
void HAL_RCC_CSSCallback(void) {
|
||||
// TODO: notify user about issue with HSE
|
||||
NVIC_SystemReset();
|
||||
api_hal_power_reset();
|
||||
}
|
||||
|
||||
void api_hal_power_init() {
|
||||
@@ -150,6 +150,10 @@ void api_hal_power_off() {
|
||||
bq25896_poweroff();
|
||||
}
|
||||
|
||||
void api_hal_power_reset() {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void api_hal_power_enable_otg() {
|
||||
bq25896_enable_otg();
|
||||
}
|
||||
|
Reference in New Issue
Block a user