diff options
Diffstat (limited to 'source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/uart_stdout.c')
-rw-r--r-- | source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/uart_stdout.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/uart_stdout.c b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/uart_stdout.c index 1bf8291..ed12c8b 100644 --- a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/uart_stdout.c +++ b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/uart_stdout.c @@ -107,10 +107,11 @@ bool GetLine(char *lp, unsigned int len) return false; case CR: /* CR - done, stop editing line. */ - *lp = c; + UartPutc (*lp = c); /* Echo and store character. */ lp++; /* Increment line pointer */ cnt++; /* and count. */ c = LF; + break; default: UartPutc (*lp = c); /* Echo and store character. */ fflush (stdout); @@ -124,7 +125,7 @@ bool GetLine(char *lp, unsigned int len) return true; } -void UartEndSimulation(int code) +__attribute__((noreturn)) void UartEndSimulation(int code) { UartPutc((char) 0x4); /* End of simulation */ UartPutc((char) code); /* End of simulation */ |