Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hello_watchdog to detect reboot only by watchdog #484

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions watchdog/hello_watchdog/hello_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
int main() {
stdio_init_all();

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