Skip to content
Snippets Groups Projects
Commit 30dc165a authored by Jens Scharsig's avatar Jens Scharsig Committed by Wolfgang Denk
Browse files

FIX: watchdog timeout, while waiting for input


* add WATCHDOG_RESET to !tstc() loops
* prevents watchdog timeout, while waiting for input,
  if CONFIG_BOOT_RETRY_TIME or CONFIG_SHOW_ACTIVITY defined

Signed-off-by: default avatarJens Scharsig <js_at_ng@scharsoft.de>
parent 8178110b
No related merge requests found
...@@ -730,6 +730,7 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len) ...@@ -730,6 +730,7 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len)
while (!tstc()) { /* while no incoming data */ while (!tstc()) { /* while no incoming data */
if (retry_time >= 0 && get_ticks() > endtime) if (retry_time >= 0 && get_ticks() > endtime)
return (-2); /* timed out */ return (-2); /* timed out */
WATCHDOG_RESET();
} }
#endif #endif
...@@ -997,6 +998,7 @@ int readline_into_buffer (const char *const prompt, char * buffer) ...@@ -997,6 +998,7 @@ int readline_into_buffer (const char *const prompt, char * buffer)
while (!tstc()) { /* while no incoming data */ while (!tstc()) { /* while no incoming data */
if (retry_time >= 0 && get_ticks() > endtime) if (retry_time >= 0 && get_ticks() > endtime)
return (-2); /* timed out */ return (-2); /* timed out */
WATCHDOG_RESET();
} }
#endif #endif
WATCHDOG_RESET(); /* Trigger watchdog, if needed */ WATCHDOG_RESET(); /* Trigger watchdog, if needed */
...@@ -1005,6 +1007,7 @@ int readline_into_buffer (const char *const prompt, char * buffer) ...@@ -1005,6 +1007,7 @@ int readline_into_buffer (const char *const prompt, char * buffer)
while (!tstc()) { while (!tstc()) {
extern void show_activity(int arg); extern void show_activity(int arg);
show_activity(0); show_activity(0);
WATCHDOG_RESET();
} }
#endif #endif
c = getc(); c = getc();
......
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