usart: add CONFIG_USER_ECHO option

This commit is contained in:
S.J.R. van Schaik 2017-08-03 17:09:51 +02:00
parent 9922994d1c
commit d5266221ef
2 changed files with 18 additions and 0 deletions

View file

@ -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);