Skip to content
Snippets Groups Projects
Commit 95f738f8 authored by schneider's avatar schneider Committed by rahix
Browse files

fix(pmic): Return to sync logging before sleep to not block

parent 7648dc7d
No related branches found
No related tags found
No related merge requests found
......@@ -184,8 +184,6 @@ __attribute__((noreturn)) static void pmic_die(float u_batt)
/* TODO: Wake-up when USB is attached again */
sleep_deepsleep();
card10_reset();
while (1)
;
}
/*
......@@ -368,6 +366,7 @@ void vPmicTask(void *pvParameters)
if (duration >= pdMS_TO_TICKS(1000)) {
if (epic_buttons_read(
BUTTON_RIGHT_TOP)) {
serial_return_to_synchronous();
LOG_WARN(
"pmic",
"Resetting ..."
......@@ -386,6 +385,7 @@ void vPmicTask(void *pvParameters)
}
if (duration > pdMS_TO_TICKS(1000)) {
serial_return_to_synchronous();
LOG_WARN("pmic", "Poweroff");
sleep_deepsleep();
card10_reset();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment