aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/various/shell/shell.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/os/various/shell/shell.c b/os/various/shell/shell.c
index 889d561f9..2df34d221 100644
--- a/os/various/shell/shell.c
+++ b/os/various/shell/shell.c
@@ -38,10 +38,12 @@
/* Module exported variables. */
/*===========================================================================*/
+#if !defined(_CHIBIOS_NIL_) || defined(__DOXYGEN__)
/**
* @brief Shell termination event source.
*/
event_source_t shell_terminated;
+#endif
/*===========================================================================*/
/* Module local types. */
@@ -354,7 +356,11 @@ THD_FUNCTION(shellThread, p) {
chprintf(chp, SHELL_NEWLINE_STR);
chprintf(chp, "ChibiOS/RT Shell" SHELL_NEWLINE_STR);
+#if !defined(_CHIBIOS_NIL_)
while (!chThdShouldTerminateX()) {
+#else
+ while (true) {
+#endif
chprintf(chp, SHELL_PROMPT_STR);
if (shellGetLine(scfg, line, sizeof(line), shp)) {
#if (SHELL_CMD_EXIT_ENABLED == TRUE) && !defined(_CHIBIOS_NIL_)
@@ -398,7 +404,9 @@ THD_FUNCTION(shellThread, p) {
}
}
}
+#if !defined(_CHIBIOS_NIL_)
shellExit(MSG_OK);
+#endif
}
/**
@@ -408,7 +416,9 @@ THD_FUNCTION(shellThread, p) {
*/
void shellInit(void) {
+#if !defined(_CHIBIOS_NIL_)
chEvtObjectInit(&shell_terminated);
+#endif
}
#if !defined(_CHIBIOS_NIL_) || defined(__DOXYGEN__)