From 5d5d7d7b882cd8e8789626692c1ae63bd1ec6897 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 4 Jul 2011 22:38:45 +0000 Subject: [PATCH] Correct several errors in STM32 serial port configuration git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3744 42af7a65-404d-4744-a932-0658087f49c3 --- nshlib/README.txt | 6 ++++++ nshlib/nsh_serial.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/nshlib/README.txt b/nshlib/README.txt index f64f39cf9..a678824e3 100644 --- a/nshlib/README.txt +++ b/nshlib/README.txt @@ -901,6 +901,12 @@ NSH-Specific Configuration Settings the system console is used to provide debug output. Default: stdin and stdout (probably "/dev/console") + NOTE: When any other device other than /dev/console is used + for a user interface, (1) linefeeds (\n) will not be expanded to + carriage return / linefeeds (\r\n). You will need to set + your terminal program to account for this. And (2) input is + not automatically echoed so you will have to turn local echo on. + * CONFIG_NSH_TELNET If CONFIG_NSH_TELNET is set to 'y', then a TELENET server front-end is selected. When this option is provided, diff --git a/nshlib/nsh_serial.c b/nshlib/nsh_serial.c index 29e60d9e3..ccb25477d 100644 --- a/nshlib/nsh_serial.c +++ b/nshlib/nsh_serial.c @@ -476,7 +476,7 @@ int nsh_consolemain(int argc, char *argv[]) /* Present a greeting */ - fprintf(pstate->ss_outstream, g_nshgreeting); + fputs(g_nshgreeting, pstate->ss_outstream); fflush(pstate->ss_outstream); /* Execute the startup script */