g_rebootReason (#1121)

* g_rebootReason

* fx
This commit is contained in:
openshwprojects
2024-03-10 00:09:30 +01:00
committed by GitHub
parent e833f80494
commit 2d6f4e61ca
4 changed files with 26 additions and 8 deletions

View File

@ -874,22 +874,20 @@ typedef enum {
} RESET_SOURCE_STATUS;
*/
int bk_misc_get_start_type();
{
const char* s = "Unk";
i = bk_misc_get_start_type();
if (i == 0)
if (g_rebootReason == 0)
s = "Pwr";
else if (i == 1)
else if (g_rebootReason == 1)
s = "Rbt";
else if (i == 2)
else if (g_rebootReason == 2)
s = "Wdt";
else if (i == 3)
else if (g_rebootReason == 3)
s = "Pin Interrupt";
else if (i == 4)
else if (g_rebootReason == 4)
s = "Sleep Timer";
hprintf255(request, "<h5>Reboot reason: %i - %s</h5>", i, s);
hprintf255(request, "<h5>Reboot reason: %i - %s</h5>", g_rebootReason, s);
}
#elif PLATFORM_BL602
char reason[26];