Revert "applications: only use uart0 for none-newlib boards"
This reverts commit 9c6ab1007b68331f3caed6f75b68ddc087f0f7e0.
This commit is contained in:
parent
eb49be3b8b
commit
448e90ba3a
@ -26,14 +26,10 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#ifdef MODULE_NEWLIB
|
#include "posix_io.h"
|
||||||
# include "uart_stdio.h"
|
|
||||||
#else
|
|
||||||
# include "posix_io.h"
|
|
||||||
# include "board_uart0.h"
|
|
||||||
#endif
|
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "shell_commands.h"
|
#include "shell_commands.h"
|
||||||
|
#include "board_uart0.h"
|
||||||
|
|
||||||
#if FEATURE_PERIPH_RTC
|
#if FEATURE_PERIPH_RTC
|
||||||
#include "periph/rtc.h"
|
#include "periph/rtc.h"
|
||||||
@ -46,6 +42,7 @@
|
|||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
shell_t shell;
|
shell_t shell;
|
||||||
|
(void) posix_open(uart0_handler_pid, 0);
|
||||||
|
|
||||||
#ifdef MODULE_LTC4150
|
#ifdef MODULE_LTC4150
|
||||||
ltc4150_start();
|
ltc4150_start();
|
||||||
@ -57,12 +54,7 @@ int main(void)
|
|||||||
|
|
||||||
(void) puts("Welcome to RIOT!");
|
(void) puts("Welcome to RIOT!");
|
||||||
|
|
||||||
#ifndef MODULE_NEWLIB
|
|
||||||
(void) posix_open(uart0_handler_pid, 0);
|
|
||||||
shell_init(&shell, NULL, UART0_BUFSIZE, uart0_readc, uart0_putc);
|
shell_init(&shell, NULL, UART0_BUFSIZE, uart0_readc, uart0_putc);
|
||||||
#else
|
|
||||||
shell_init(&shell, NULL, UART0_BUFSIZE, getchar, putchar);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
shell_run(&shell);
|
shell_run(&shell);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -20,14 +20,9 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "kernel.h"
|
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#ifdef MODULE_NEWLIB
|
#include "board_uart0.h"
|
||||||
# include "uart_stdio.h"
|
#include "posix_io.h"
|
||||||
#else
|
|
||||||
# include "posix_io.h"
|
|
||||||
# include "board_uart0.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int udp_cmd(int argc, char **argv);
|
extern int udp_cmd(int argc, char **argv);
|
||||||
|
|
||||||
@ -44,12 +39,8 @@ int main(void)
|
|||||||
|
|
||||||
/* start shell */
|
/* start shell */
|
||||||
puts("All up, running the shell now");
|
puts("All up, running the shell now");
|
||||||
#ifndef MODULE_NEWLIB
|
posix_open(uart0_handler_pid, 0);
|
||||||
(void) posix_open(uart0_handler_pid, 0);
|
|
||||||
shell_init(&shell, shell_commands, UART0_BUFSIZE, uart0_readc, uart0_putc);
|
shell_init(&shell, shell_commands, UART0_BUFSIZE, uart0_readc, uart0_putc);
|
||||||
#else
|
|
||||||
shell_init(&shell, shell_commands, UART0_BUFSIZE, getchar, putchar);
|
|
||||||
#endif
|
|
||||||
shell_run(&shell);
|
shell_run(&shell);
|
||||||
|
|
||||||
/* should be never reached */
|
/* should be never reached */
|
||||||
|
|||||||
@ -22,12 +22,8 @@
|
|||||||
|
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "shell_commands.h"
|
#include "shell_commands.h"
|
||||||
#ifdef MODULE_NEWLIB
|
#include "posix_io.h"
|
||||||
# include "uart_stdio.h"
|
#include "board_uart0.h"
|
||||||
#else
|
|
||||||
# include "posix_io.h"
|
|
||||||
# include "board_uart0.h"
|
|
||||||
#endif
|
|
||||||
#include "net/gnrc/pktdump.h"
|
#include "net/gnrc/pktdump.h"
|
||||||
#include "net/gnrc.h"
|
#include "net/gnrc.h"
|
||||||
|
|
||||||
@ -54,12 +50,8 @@ int main(void)
|
|||||||
|
|
||||||
/* start the shell */
|
/* start the shell */
|
||||||
puts("Initialization successful - starting the shell now");
|
puts("Initialization successful - starting the shell now");
|
||||||
#ifndef MODULE_NEWLIB
|
|
||||||
(void) posix_open(uart0_handler_pid, 0);
|
(void) posix_open(uart0_handler_pid, 0);
|
||||||
shell_init(&shell, NULL, SHELL_BUFSIZE, uart0_readc, uart0_putc);
|
shell_init(&shell, NULL, SHELL_BUFSIZE, uart0_readc, uart0_putc);
|
||||||
#else
|
|
||||||
shell_init(&shell, NULL, SHELL_BUFSIZE, getchar, putchar);
|
|
||||||
#endif
|
|
||||||
shell_run(&shell);
|
shell_run(&shell);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -21,12 +21,8 @@
|
|||||||
|
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "shell_commands.h"
|
#include "shell_commands.h"
|
||||||
#ifdef MODULE_NEWLIB
|
#include "posix_io.h"
|
||||||
# include "uart_stdio.h"
|
#include "board_uart0.h"
|
||||||
#else
|
|
||||||
# include "posix_io.h"
|
|
||||||
# include "board_uart0.h"
|
|
||||||
#endif
|
|
||||||
#include "net/gnrc.h"
|
#include "net/gnrc.h"
|
||||||
#include "net/gnrc/pktdump.h"
|
#include "net/gnrc/pktdump.h"
|
||||||
|
|
||||||
@ -50,13 +46,9 @@ int main(void)
|
|||||||
|
|
||||||
/* start the shell */
|
/* start the shell */
|
||||||
puts("Initialization successful - starting the shell now");
|
puts("Initialization successful - starting the shell now");
|
||||||
#ifndef MODULE_NEWLIB
|
|
||||||
(void) posix_open(uart0_handler_pid, 0);
|
(void) posix_open(uart0_handler_pid, 0);
|
||||||
shell_init(&shell, NULL, SHELL_BUFSIZE, uart0_readc, uart0_putc);
|
shell_init(&shell, NULL, SHELL_BUFSIZE, uart0_readc, uart0_putc);
|
||||||
#else
|
shell_run(&shell);
|
||||||
shell_init(&shell, NULL, SHELL_BUFSIZE, getchar, putchar);
|
|
||||||
#endif
|
|
||||||
shell_run(&shell);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,12 +21,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#ifdef MODULE_NEWLIB
|
#include "posix_io.h"
|
||||||
# include "uart_stdio.h"
|
#include "board_uart0.h"
|
||||||
#else
|
|
||||||
# include "posix_io.h"
|
|
||||||
# include "board_uart0.h"
|
|
||||||
#endif
|
|
||||||
#include "nrfmin.h"
|
#include "nrfmin.h"
|
||||||
#include "net/gnrc.h"
|
#include "net/gnrc.h"
|
||||||
#include "net/gnrc/nomac.h"
|
#include "net/gnrc/nomac.h"
|
||||||
@ -55,13 +51,9 @@ int main(void)
|
|||||||
gnrc_netreg_register(GNRC_NETTYPE_UNDEF, &netobj);
|
gnrc_netreg_register(GNRC_NETTYPE_UNDEF, &netobj);
|
||||||
|
|
||||||
/* initialize and run the shell */
|
/* initialize and run the shell */
|
||||||
#ifndef MODULE_NEWLIB
|
|
||||||
board_uart0_init();
|
board_uart0_init();
|
||||||
(void) posix_open(uart0_handler_pid, 0);
|
posix_open(uart0_handler_pid, 0);
|
||||||
shell_init(&shell, NULL, SHELL_BUFSIZE, uart0_readc, uart0_putc);
|
shell_init(&shell, NULL, SHELL_BUFSIZE, uart0_readc, uart0_putc);
|
||||||
#else
|
|
||||||
shell_init(&shell, NULL, SHELL_BUFSIZE, getchar, putchar);
|
|
||||||
#endif
|
|
||||||
shell_run(&shell);
|
shell_run(&shell);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -35,12 +35,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef MODULE_NEWLIB
|
#include "posix_io.h"
|
||||||
# include "uart_stdio.h"
|
#include "board_uart0.h"
|
||||||
#else
|
|
||||||
# include "posix_io.h"
|
|
||||||
# include "board_uart0.h"
|
|
||||||
#endif
|
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "pcd8544.h"
|
#include "pcd8544.h"
|
||||||
|
|
||||||
@ -174,12 +170,8 @@ int main(void)
|
|||||||
|
|
||||||
/* run shell */
|
/* run shell */
|
||||||
puts("All OK, running shell now");
|
puts("All OK, running shell now");
|
||||||
#ifndef MODULE_NEWLIB
|
|
||||||
(void) posix_open(uart0_handler_pid, 0);
|
(void) posix_open(uart0_handler_pid, 0);
|
||||||
shell_init(&shell, shell_commands, SHELL_BUFSIZE, uart0_readc, uart0_putc);
|
shell_init(&shell, shell_commands, SHELL_BUFSIZE, uart0_readc, uart0_putc);
|
||||||
#else
|
|
||||||
shell_init(&shell, shell_commands, SHELL_BUFSIZE, getchar, putchar);
|
|
||||||
#endif
|
|
||||||
shell_run(&shell);
|
shell_run(&shell);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -22,12 +22,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#ifdef MODULE_NEWLIB
|
#include "posix_io.h"
|
||||||
# include "uart_stdio.h"
|
#include "board_uart0.h"
|
||||||
#else
|
|
||||||
# include "posix_io.h"
|
|
||||||
# include "board_uart0.h"
|
|
||||||
#endif
|
|
||||||
#include "periph/gpio.h"
|
#include "periph/gpio.h"
|
||||||
#include "hwtimer.h"
|
#include "hwtimer.h"
|
||||||
|
|
||||||
@ -251,12 +247,8 @@ int main(void)
|
|||||||
" behavior for not existing ports/pins is not defined!");
|
" behavior for not existing ports/pins is not defined!");
|
||||||
|
|
||||||
/* start the shell */
|
/* start the shell */
|
||||||
#ifndef MODULE_NEWLIB
|
|
||||||
(void) posix_open(uart0_handler_pid, 0);
|
(void) posix_open(uart0_handler_pid, 0);
|
||||||
shell_init(&shell, shell_commands, SHELL_BUFSIZE, uart0_readc, uart0_putc);
|
shell_init(&shell, shell_commands, SHELL_BUFSIZE, uart0_readc, uart0_putc);
|
||||||
#else
|
|
||||||
shell_init(&shell, shell_commands, SHELL_BUFSIZE, getchar, putchar);
|
|
||||||
#endif
|
|
||||||
shell_run(&shell);
|
shell_run(&shell);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -21,16 +21,11 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "kernel.h"
|
|
||||||
#include "periph_conf.h"
|
#include "periph_conf.h"
|
||||||
#include "periph/i2c.h"
|
#include "periph/i2c.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#ifdef MODULE_NEWLIB
|
#include "posix_io.h"
|
||||||
# include "uart_stdio.h"
|
#include "board_uart0.h"
|
||||||
#else
|
|
||||||
# include "posix_io.h"
|
|
||||||
# include "board_uart0.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define BUFSIZE (128U)
|
#define BUFSIZE (128U)
|
||||||
|
|
||||||
@ -315,16 +310,12 @@ int main(void)
|
|||||||
|
|
||||||
puts("Test for the low-level I2C driver");
|
puts("Test for the low-level I2C driver");
|
||||||
|
|
||||||
#ifndef MODULE_NEWLIB
|
|
||||||
/* prepare I/O for shell */
|
/* prepare I/O for shell */
|
||||||
board_uart0_init();
|
board_uart0_init();
|
||||||
(void) posix_open(uart0_handler_pid, 0);
|
(void) posix_open(uart0_handler_pid, 0);
|
||||||
shell_init(&shell, shell_commands, UART0_BUFSIZE, uart0_readc, uart0_putc);
|
|
||||||
#else
|
|
||||||
shell_init(&shell, shell_commands, UART0_BUFSIZE, getchar, putchar);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* define own shell commands */
|
/* define own shell commands */
|
||||||
|
shell_init(&shell, shell_commands, 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