linux: Open watchdog device after console
Only open the watchdog device after the console has been opened. The machine should not reboot in the unlikely event the console can't be opened. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
d222ec1024
commit
1c59a0d30a
|
@ -77,22 +77,20 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initial setup
|
// Initial setup
|
||||||
|
if (realtime) {
|
||||||
|
int ret = realtime_setup();
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
int ret = console_setup("/tmp/klipper_host_mcu");
|
||||||
|
if (ret)
|
||||||
|
return -1;
|
||||||
if (watchdog) {
|
if (watchdog) {
|
||||||
int ret = watchdog_setup();
|
int ret = watchdog_setup();
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (realtime) {
|
|
||||||
int ret = realtime_setup();
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ret = console_setup("/tmp/klipper_host_mcu");
|
|
||||||
if (ret)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
// Main loop
|
// Main loop
|
||||||
sched_main();
|
sched_main();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue