usart: add CONFIG_USER_ECHO option
This commit is contained in:
parent
9922994d1c
commit
d5266221ef
2 changed files with 18 additions and 0 deletions
|
@ -204,11 +204,16 @@ int shell_write(struct console *con, size_t argc, const char **argv)
|
|||
return -1;
|
||||
}
|
||||
|
||||
#if CONFIG_USER_ECHO
|
||||
fprintf(con->fp, "> ");
|
||||
#endif
|
||||
|
||||
while ((ret = console_read(con, data, sizeof data)) > 0) {
|
||||
mufs_write(file, data, ret);
|
||||
|
||||
#if CONFIG_USER_ECHO
|
||||
fprintf(con->fp, "\n> ");
|
||||
#endif
|
||||
}
|
||||
|
||||
mufs_close(file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue