Skip to content

Commit 3a159a4

Browse files
Update hello_watchdog to detect reboot only by watchdog (#484)
1 parent 886242c commit 3a159a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

watchdog/hello_watchdog/hello_watchdog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
int main() {
1212
stdio_init_all();
1313

14-
if (watchdog_caused_reboot()) {
14+
if (watchdog_enable_caused_reboot()) {
1515
printf("Rebooted by Watchdog!\n");
1616
return 0;
1717
} else {
@@ -30,4 +30,4 @@ int main() {
3030
// Wait in an infinite loop and don't update the watchdog so it reboots us
3131
printf("Waiting to be rebooted by watchdog\n");
3232
while(1);
33-
}
33+
}

0 commit comments

Comments
 (0)