summaryrefslogtreecommitdiff
path: root/source/application/hal/platforms/bare-metal/bsp
diff options
context:
space:
mode:
Diffstat (limited to 'source/application/hal/platforms/bare-metal/bsp')
-rw-r--r--source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/uart_stdout.c4
-rw-r--r--source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/uart_pl011.c8
2 files changed, 10 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 ed12c8b..3211c4d 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
@@ -111,6 +111,10 @@ bool GetLine(char *lp, unsigned int len)
lp++; /* Increment line pointer */
cnt++; /* and count. */
c = LF;
+ UartPutc (*lp = c); /* Echo and store character. */
+ fflush (stdout);
+ lp++; /* Increment line pointer */
+ cnt++; /* and count. */
break;
default:
UartPutc (*lp = c); /* Echo and store character. */
diff --git a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/uart_pl011.c b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/uart_pl011.c
index b2dee14..1cbf70c 100644
--- a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/uart_pl011.c
+++ b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/uart_pl011.c
@@ -199,11 +199,15 @@ bool GetLine (char *lp, unsigned int len)
case 0:
*lp = 0; /* ESC - stop editing line. */
return false;
- case CR: /* CR - done, stop editing line. */
+ case CR: /* CR - done, stop editing line. */
+ UartPutc (*lp = c); /* Echo and store character. */
+ lp++; /* Increment line pointer */
+ cnt++; /* and count. */
+ c = LF;
UartPutc (*lp = c); /* Echo and store character. */
+ fflush (stdout);
lp++; /* Increment line pointer */
cnt++; /* and count. */
- c = LF;
break;
default:
UartPutc (*lp = c); /* echo and store character. */