From 42d6feaa13dd52f0f03f877fac69a75fa91d3c21 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Mon, 6 Jul 2015 13:27:49 +0200 Subject: [PATCH] tests/shell: Use libc putchar/getchar instead of wrappers --- tests/shell/main.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/tests/shell/main.c b/tests/shell/main.c index 9fef298b81..7bd4850f47 100644 --- a/tests/shell/main.c +++ b/tests/shell/main.c @@ -56,21 +56,6 @@ static int print_echo(int argc, char **argv) return 0; } -static int shell_readc(void) -{ - char c; - int result = posix_read(uart0_handler_pid, &c, 1); - if (result != 1) { - return -1; - } - return (unsigned char) c; -} - -static void shell_putchar(int c) -{ - putchar(c); -} - static const shell_command_t shell_commands[] = { { "start_test", "starts a test", print_teststart }, { "end_test", "ends a test", print_testend }, @@ -89,8 +74,7 @@ int main(void) /* define own shell commands */ shell_t shell; - shell_init(&shell, shell_commands, SHELL_BUFSIZE, shell_readc, - shell_putchar); + shell_init(&shell, shell_commands, SHELL_BUFSIZE, getchar, putchar); shell_run(&shell); /* or use only system shell commands */