examples/default: make use of uart0_[readc|putc]
This commit is contained in:
parent
7105fe2e4f
commit
dd3d93c928
@ -135,18 +135,6 @@ void init_transceiver(void)
|
|||||||
}
|
}
|
||||||
#endif /* MODULE_TRANSCEIVER */
|
#endif /* MODULE_TRANSCEIVER */
|
||||||
|
|
||||||
static int shell_readc(void)
|
|
||||||
{
|
|
||||||
char c = 0;
|
|
||||||
(void) posix_read(uart0_handler_pid, &c, 1);
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void shell_putchar(int c)
|
|
||||||
{
|
|
||||||
(void) putchar(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
shell_t shell;
|
shell_t shell;
|
||||||
@ -166,7 +154,7 @@ int main(void)
|
|||||||
|
|
||||||
(void) puts("Welcome to RIOT!");
|
(void) puts("Welcome to RIOT!");
|
||||||
|
|
||||||
shell_init(&shell, NULL, UART0_BUFSIZE, shell_readc, shell_putchar);
|
shell_init(&shell, NULL, UART0_BUFSIZE, uart0_readc, uart0_putc);
|
||||||
|
|
||||||
shell_run(&shell);
|
shell_run(&shell);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user