diff --git a/boards/bluepill/include/board.h b/boards/bluepill/include/board.h index ca178a6f73..48c4b4c283 100644 --- a/boards/bluepill/include/board.h +++ b/boards/bluepill/include/board.h @@ -54,7 +54,7 @@ void board_init(void); /** * @brief Use the 2nd UART for STDIO on this board */ -#define UART_STDIO_DEV UART_DEV(1) +#define STDIO_UART_DEV UART_DEV(1) /** * @name xtimer configuration diff --git a/boards/common/arduino-atmega/include/board_common.h b/boards/common/arduino-atmega/include/board_common.h index 0b884520b4..6694f2a93a 100644 --- a/boards/common/arduino-atmega/include/board_common.h +++ b/boards/common/arduino-atmega/include/board_common.h @@ -37,7 +37,7 @@ extern "C" { * baudrate to 9600 for this board * @{ */ -#define UART_STDIO_BAUDRATE (9600U) +#define STDIO_UART_BAUDRATE (9600U) /** @} */ /** diff --git a/boards/common/iotlab/include/board_common.h b/boards/common/iotlab/include/board_common.h index 129b9c66f3..ed0dc64c09 100644 --- a/boards/common/iotlab/include/board_common.h +++ b/boards/common/iotlab/include/board_common.h @@ -38,8 +38,8 @@ extern "C" { * @name Set the default baudrate to 500K for this board * @{ */ -#ifndef UART_STDIO_BAUDRATE -# define UART_STDIO_BAUDRATE (500000U) +#ifndef STDIO_UART_BAUDRATE +# define STDIO_UART_BAUDRATE (500000U) #endif /** @} */ diff --git a/boards/common/msb-430/board_init.c b/boards/common/msb-430/board_init.c index 6be78cf94a..8d2dc04b71 100644 --- a/boards/common/msb-430/board_init.c +++ b/boards/common/msb-430/board_init.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "irq.h" #include "board.h" -#include "uart_stdio.h" +#include "stdio_base.h" #include "periph_conf.h" #include "msp430.h" #include "debug.h" @@ -199,6 +199,6 @@ void board_init(void) msp430_set_cpu_speed(CLOCK_CORECLOCK); - /* finally initialize STDIO over UART */ - uart_stdio_init(); + /* finally initialize STDIO */ + stdio_init(); } diff --git a/boards/common/silabs/drivers/bc/bc.c b/boards/common/silabs/drivers/bc/bc.c index 9deddb211f..c0b495f114 100644 --- a/boards/common/silabs/drivers/bc/bc.c +++ b/boards/common/silabs/drivers/bc/bc.c @@ -20,7 +20,7 @@ #include "bc.h" -#include "uart_stdio.h" +#include "stdio_uart.h" #include "periph/gpio.h" #include "periph/uart.h" @@ -35,14 +35,14 @@ /** * @brief Ensure that the correct UART is used. */ -#if ((UART_STDIO_DEV) != (UART_DEV(0))) +#if ((STDIO_UART_DEV) != (UART_DEV(0))) #error "The BC requires UART_DEV(0)." #endif /** * @brief Ensure that the correct baud rate is used. */ -#if ((UART_STDIO_BAUDRATE) != 115200) +#if ((STDIO_UART_BAUDRATE) != 115200) #error "The BC requires a baud rate of 115200." #endif diff --git a/boards/common/wsn430/board_init.c b/boards/common/wsn430/board_init.c index 521e248f2f..317ce365bb 100644 --- a/boards/common/wsn430/board_init.c +++ b/boards/common/wsn430/board_init.c @@ -23,7 +23,7 @@ #include "cpu.h" #include "irq.h" #include "assert.h" -#include "uart_stdio.h" +#include "stdio_uart.h" #include "periph_conf.h" enum { @@ -98,5 +98,5 @@ void board_init(void) irq_restore(state); /* initialize STDIO over UART */ - uart_stdio_init(); + stdio_init(); } diff --git a/boards/hifive1/Makefile.include b/boards/hifive1/Makefile.include index 554566d32c..098e456c64 100644 --- a/boards/hifive1/Makefile.include +++ b/boards/hifive1/Makefile.include @@ -3,7 +3,7 @@ export CPU = fe310 export CPU_MODEL = fe310 # Uses UART0 for stdio input/output (comment out to disable) -USEMODULE += uart_stdio +USEMODULE += stdio_uart # set default port depending on operating system PORT_LINUX ?= /dev/ttyUSB1 diff --git a/boards/jiminy-mega256rfr2/include/board.h b/boards/jiminy-mega256rfr2/include/board.h index f47de1232a..410addb56b 100644 --- a/boards/jiminy-mega256rfr2/include/board.h +++ b/boards/jiminy-mega256rfr2/include/board.h @@ -40,8 +40,8 @@ extern "C" { * * @{ */ -#ifndef UART_STDIO_BAUDRATE -#define UART_STDIO_BAUDRATE (38400U) /**< Sets Baudrate for e.g. Shell */ +#ifndef STDIO_UART_BAUDRATE +#define STDIO_UART_BAUDRATE (38400U) /**< Sets Baudrate for e.g. Shell */ #endif /** @} */ diff --git a/boards/maple-mini/include/board.h b/boards/maple-mini/include/board.h index 3684ef5f41..cfd187e19c 100644 --- a/boards/maple-mini/include/board.h +++ b/boards/maple-mini/include/board.h @@ -57,7 +57,7 @@ extern "C" { /** * @brief Use the USART1 for STDIO on this board */ -#define UART_STDIO_DEV UART_DEV(1) +#define STDIO_UART_DEV UART_DEV(1) /** * @brief Initialize board specific hardware, including clock, LEDs and std-IO diff --git a/boards/mega-xplained/include/board.h b/boards/mega-xplained/include/board.h index 52baca6759..f7021dd829 100644 --- a/boards/mega-xplained/include/board.h +++ b/boards/mega-xplained/include/board.h @@ -39,15 +39,15 @@ extern "C" { * baudrate to 9600 for this board * @{ */ -#ifndef UART_STDIO_BAUDRATE -#define UART_STDIO_BAUDRATE (9600U) +#ifndef STDIO_UART_BAUDRATE +#define STDIO_UART_BAUDRATE (9600U) #endif /** @} */ /** * @brief Use the UART 1 for STDIO on this board */ -#define UART_STDIO_DEV (UART_DEV(1)) +#define STDIO_UART_DEV (UART_DEV(1)) /** * @name xtimer configuration values diff --git a/boards/mulle/include/board.h b/boards/mulle/include/board.h index b5044c9e22..ba396f9e5b 100644 --- a/boards/mulle/include/board.h +++ b/boards/mulle/include/board.h @@ -35,7 +35,7 @@ /** * @brief Use the UART1 for STDIO on this board */ -#define UART_STDIO_DEV UART_DEV(1) +#define STDIO_UART_DEV UART_DEV(1) /** * @name xtimer configuration diff --git a/boards/opencm904/include/board.h b/boards/opencm904/include/board.h index 57f07a958a..a03a5b4616 100644 --- a/boards/opencm904/include/board.h +++ b/boards/opencm904/include/board.h @@ -66,14 +66,14 @@ extern "C" { /** * @brief Use the USART2 for STDIO on this board */ -#define UART_STDIO_DEV UART_DEV(0) +#define STDIO_UART_DEV UART_DEV(0) /** * @name Override with ROBOTIS Bluetooth antenna baudrate for STDIO * @{ */ -#ifndef UART_STDIO_BAUDRATE -#define UART_STDIO_BAUDRATE (921600UL) +#ifndef STDIO_UART_BAUDRATE +#define STDIO_UART_BAUDRATE (921600UL) #endif /** @} */ diff --git a/boards/ruuvitag/Makefile.include b/boards/ruuvitag/Makefile.include index e2df4570f6..eb284c27fc 100644 --- a/boards/ruuvitag/Makefile.include +++ b/boards/ruuvitag/Makefile.include @@ -2,7 +2,7 @@ CPU_MODEL = nrf52832xxaa # for this board, we are using Segger's RTT as default terminal interface -USEMODULE += rtt_stdio +USEMODULE += stdio_rtt TERMPROG = $(RIOTTOOLS)/jlink/jlink.sh TERMFLAGS = term_rtt diff --git a/boards/stm32mindev/include/board.h b/boards/stm32mindev/include/board.h index 902087c1aa..b9a1680076 100644 --- a/boards/stm32mindev/include/board.h +++ b/boards/stm32mindev/include/board.h @@ -61,7 +61,7 @@ void board_init(void); /** * @brief Use the 2nd UART for STDIO on this board */ -#define UART_STDIO_DEV UART_DEV(1) +#define STDIO_UART_DEV UART_DEV(1) /** * @name xtimer configuration diff --git a/boards/telosb/board.c b/boards/telosb/board.c index cb699cbde4..894fd50dd2 100644 --- a/boards/telosb/board.c +++ b/boards/telosb/board.c @@ -9,7 +9,7 @@ #include "cpu.h" #include "board.h" -#include "uart_stdio.h" +#include "stdio_uart.h" void uart_init(void); @@ -122,8 +122,8 @@ void board_init(void) telosb_ports_init(); msp430_init_dco(); - /* initialize STDIO over UART */ - uart_stdio_init(); + /* initialize STDIO */ + stdio_init(); /* enable interrupts */ __bis_SR_register(GIE); diff --git a/boards/telosb/include/board.h b/boards/telosb/include/board.h index 652f6794ef..81e849e468 100644 --- a/boards/telosb/include/board.h +++ b/boards/telosb/include/board.h @@ -43,8 +43,8 @@ extern "C" { * @name Override default baudrate for STDIO * @{ */ -#ifndef UART_STDIO_BAUDRATE -#define UART_STDIO_BAUDRATE (9600) +#ifndef STDIO_UART_BAUDRATE +#define STDIO_UART_BAUDRATE (9600) #endif /** @} */ diff --git a/boards/thingy52/Makefile.include b/boards/thingy52/Makefile.include index 96fda10616..e680c05598 100644 --- a/boards/thingy52/Makefile.include +++ b/boards/thingy52/Makefile.include @@ -2,7 +2,7 @@ CPU_MODEL = nrf52832xxaa # for this board, we are using Segger's RTT as default terminal interface -USEMODULE += rtt_stdio +USEMODULE += stdio_rtt TERMPROG = $(RIOTTOOLS)/jlink/jlink.sh TERMFLAGS = term_rtt diff --git a/boards/waspmote-pro/include/board.h b/boards/waspmote-pro/include/board.h index 25023e9b71..8fa8a538ab 100644 --- a/boards/waspmote-pro/include/board.h +++ b/boards/waspmote-pro/include/board.h @@ -31,7 +31,7 @@ extern "C" { * @brief As the CPU is too slow to handle 115200 baud, we set the default * baudrate to 9600 for this board */ -#define UART_STDIO_BAUDRATE (9600U) +#define STDIO_UART_BAUDRATE (9600U) /** * @brief Use the UART 0 for STDIO on this board, if the XBee socket is not @@ -39,9 +39,9 @@ extern "C" { */ #ifdef XBEE_UART #if XBEE_UART == 0 -#define UART_STDIO_DEV (UART_DEV(1)) +#define STDIO_UART_DEV (UART_DEV(1)) #else -#define UART_STDIO_DEV (UART_DEV(0)) +#define STDIO_UART_DEV (UART_DEV(0)) #endif #endif diff --git a/boards/z1/board.c b/boards/z1/board.c index 0f2984ad9c..1f4838046f 100644 --- a/boards/z1/board.c +++ b/boards/z1/board.c @@ -24,7 +24,7 @@ #include "cpu.h" #include "board.h" -#include "uart_stdio.h" +#include "stdio_uart.h" static void z1_ports_init(void) { @@ -215,8 +215,8 @@ void board_init(void) /* initializes DCO */ msp430_init_dco(); - /* initialize STDIO over UART */ - uart_stdio_init(); + /* initialize STDIO */ + stdio_init(); /* enable interrupts */ __bis_SR_register(GIE); diff --git a/cpu/atmega_common/Makefile.include b/cpu/atmega_common/Makefile.include index 06e06f876b..717ec08ab6 100644 --- a/cpu/atmega_common/Makefile.include +++ b/cpu/atmega_common/Makefile.include @@ -14,8 +14,8 @@ export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc -e r export USEMODULE += atmega_common_periph export USEMODULE += periph_common -# the atmel port uses uart_stdio -export USEMODULE += uart_stdio +# the atmel port uses stdio_uart +export USEMODULE += stdio_uart # include module specific includes export INCLUDES += -I$(RIOTCPU)/atmega_common/include -isystem$(RIOTCPU)/atmega_common/include/vendor diff --git a/cpu/atmega_common/atmega_stdio.c b/cpu/atmega_common/atmega_stdio.c index f069a56b42..d37158b0ad 100644 --- a/cpu/atmega_common/atmega_stdio.c +++ b/cpu/atmega_common/atmega_stdio.c @@ -19,7 +19,7 @@ #include #include -#include "uart_stdio.h" +#include "stdio_uart.h" static int _uart_putchar(char c, FILE *stream); static int _uart_getchar(FILE *stream); @@ -29,7 +29,7 @@ static FILE _uart_stdin = FDEV_SETUP_STREAM(NULL, _uart_getchar, _FDEV_SETUP_REA static int _uart_putchar(char c, FILE *stream) { (void) stream; - uart_stdio_write(&c, 1); + stdio_write(&c, 1); return 0; } @@ -37,13 +37,13 @@ static int _uart_getchar(FILE *stream) { (void) stream; char c; - uart_stdio_read(&c, 1); + stdio_read(&c, 1); return (int)c; } void atmega_stdio_init(void) { - uart_stdio_init(); + stdio_init(); stdout = &_uart_stdout; stdin = &_uart_stdin; diff --git a/cpu/atmega_common/periph/uart.c b/cpu/atmega_common/periph/uart.c index 8925f7a2bc..260191ce58 100644 --- a/cpu/atmega_common/periph/uart.c +++ b/cpu/atmega_common/periph/uart.c @@ -18,8 +18,8 @@ * @author Hinnerk van Bruinehsen * * - * Support static BAUD rate calculation using UART_STDIO_BAUDRATE. - * Set UART_STDIO_BAUDRATE to the desired baud rate and pass it as a -D argument + * Support static BAUD rate calculation using STDIO_UART_BAUDRATE. + * Set STDIO_UART_BAUDRATE to the desired baud rate and pass it as a -D argument * at compliation time (e.g. in the boards Makefile.include file). * UART_BAUD_TOL can be set to guarantee a BAUD rate tolerance at compile time or * to switch to double speed transmission (U2X) to achieve a lower tolerance. @@ -48,9 +48,9 @@ #define BAUD_TOL 2 #endif -#if defined(UART_STDIO_BAUDRATE) +#if defined(STDIO_UART_BAUDRATE) /* BAUD and F_CPU are required by setbaud.h to calculated BRR */ -#define BAUD UART_STDIO_BAUDRATE +#define BAUD STDIO_UART_BAUDRATE #define F_CPU CLOCK_CORECLOCK #include #endif @@ -90,9 +90,9 @@ static void _set_brr(uart_t uart, uint32_t baudrate) { uint16_t brr; -#if defined(UART_STDIO_BAUDRATE) +#if defined(STDIO_UART_BAUDRATE) /* UBRR_VALUE and USE_2X are statically computed from */ - if (baudrate == UART_STDIO_BAUDRATE) { + if (baudrate == STDIO_UART_BAUDRATE) { _update_brr(uart, UBRR_VALUE, USE_2X); return; } diff --git a/cpu/atmega_common/posix_unistd.c b/cpu/atmega_common/posix_unistd.c index 4e0e736da7..8f00bb455c 100644 --- a/cpu/atmega_common/posix_unistd.c +++ b/cpu/atmega_common/posix_unistd.c @@ -22,8 +22,8 @@ #ifdef MODULE_VFS #include #include "vfs.h" -#elif defined(MODULE_UART_STDIO) -#include "uart_stdio.h" +#elif defined(MODULE_STDIO_UART) +#include "stdio_uart.h" #endif int open(const char *name, int flags, ...) @@ -136,9 +136,9 @@ ssize_t read(int fd, void *dest, size_t count) return -1; } return res; -#elif defined(MODULE_UART_STDIO) +#elif defined(MODULE_STDIO_UART) if (fd == 0) { - return uart_stdio_read(dest, count); + return stdio_read(dest, count); } errno = EBADF; return -1; @@ -160,9 +160,9 @@ ssize_t write(int fd, const void *src, size_t count) return -1; } return res; -#elif defined(MODULE_UART_STDIO) +#elif defined(MODULE_STDIO_UART) if (fd == 0) { - return uart_stdio_write(src, count); + return stdio_write(src, count); } errno = EBADF; return -1; diff --git a/cpu/fe310/nano/nanostubs.c b/cpu/fe310/nano/nanostubs.c index 0a230622ca..b5550689f2 100644 --- a/cpu/fe310/nano/nanostubs.c +++ b/cpu/fe310/nano/nanostubs.c @@ -27,7 +27,7 @@ #include "thread.h" #include "irq.h" #include "cpu.h" -#include "uart_stdio.h" +#include "stdio_uart.h" extern char _heap_start; /* Heap markers from fe310.ld file */ extern char _heap_end; @@ -38,9 +38,9 @@ char *heap_top = &_heap_start + 4; */ void nanostubs_init(void) { -#if defined(MODULE_UART_STDIO) +#if defined(MODULE_STDIO_UART) /* STDIO redirected to UART, no line buffering */ - uart_stdio_init(); + stdio_init(); setvbuf(stdout, NULL, _IONBF, 0); #endif } @@ -82,9 +82,9 @@ int _open(const char *name, int flags, int mode) _ssize_t _read(int fd, void *buffer, size_t count) { -#if defined(MODULE_UART_STDIO) +#if defined(MODULE_STDIO_UART) if (fd == STDIN_FILENO) { - return uart_stdio_read(buffer, count); + return stdio_read(buffer, count); } errno = EBADF; return -1; @@ -99,9 +99,9 @@ _ssize_t _read(int fd, void *buffer, size_t count) _ssize_t _write(int fd, const void *data, size_t count) { -#if defined(MODULE_UART_STDIO) +#if defined(MODULE_STDIO_UART) if (fd == STDOUT_FILENO || fd == STDERR_FILENO) { - return uart_stdio_write(data, count); + return stdio_write(data, count); } errno = EBADF; return -1; diff --git a/cpu/msp430fxyz/Makefile.include b/cpu/msp430fxyz/Makefile.include index ab2d20164a..044bd13233 100644 --- a/cpu/msp430fxyz/Makefile.include +++ b/cpu/msp430fxyz/Makefile.include @@ -1,3 +1,3 @@ include $(RIOTCPU)/msp430_common/Makefile.include -export USEMODULE += periph periph_common uart_stdio +export USEMODULE += periph periph_common stdio_uart diff --git a/cpu/msp430fxyz/msp430_stdio.c b/cpu/msp430fxyz/msp430_stdio.c index 31f783a669..898e0c8ee9 100644 --- a/cpu/msp430fxyz/msp430_stdio.c +++ b/cpu/msp430fxyz/msp430_stdio.c @@ -21,7 +21,7 @@ #include #include -#include "uart_stdio.h" +#include "stdio_uart.h" /** * @brief Get one character from STDIO - used by the libc @@ -29,7 +29,7 @@ int getchar(void) { char c; - uart_stdio_read(&c, 1); + stdio_read(&c, 1); return c; } @@ -40,7 +40,7 @@ int getchar(void) int putchar(int c) { char _c = c; - return uart_stdio_write(&_c, 1); + return stdio_write(&_c, 1); } /** @@ -49,7 +49,7 @@ int putchar(int c) ssize_t write(int fildes, const void *buf, size_t nbyte) { if (fildes == STDOUT_FILENO) { - return uart_stdio_write(buf, nbyte); + return stdio_write(buf, nbyte); } else { return -1; diff --git a/drivers/ethos/ethos.c b/drivers/ethos/ethos.c index 511eec2865..cecec42545 100644 --- a/drivers/ethos/ethos.c +++ b/drivers/ethos/ethos.c @@ -34,9 +34,9 @@ #include "net/ethernet.h" #ifdef USE_ETHOS_FOR_STDIO -#include "uart_stdio.h" +#include "stdio_uart.h" #include "isrpipe.h" -extern isrpipe_t uart_stdio_isrpipe; +extern isrpipe_t stdio_uart_isrpipe; #endif #define ENABLE_DEBUG (0) @@ -102,7 +102,7 @@ static void _handle_char(ethos_t *dev, char c) #ifdef USE_ETHOS_FOR_STDIO case ETHOS_FRAME_TYPE_TEXT: dev->framesize++; - isrpipe_write_one(&uart_stdio_isrpipe, c); + isrpipe_write_one(&stdio_uart_isrpipe, c); #endif } } diff --git a/drivers/include/ethos.h b/drivers/include/ethos.h index b5d39e2377..18f1abf259 100644 --- a/drivers/include/ethos.h +++ b/drivers/include/ethos.h @@ -31,14 +31,14 @@ extern "C" { #endif -/* if using ethos + stdio, use UART_STDIO values unless overridden */ +/* if using ethos + stdio, use STDIO_UART values unless overridden */ #ifdef USE_ETHOS_FOR_STDIO -#include "uart_stdio.h" +#include "stdio_uart.h" #ifndef ETHOS_UART -#define ETHOS_UART UART_STDIO_DEV +#define ETHOS_UART STDIO_UART_DEV #endif #ifndef ETHOS_BAUDRATE -#define ETHOS_BAUDRATE UART_STDIO_BAUDRATE +#define ETHOS_BAUDRATE STDIO_UART_BAUDRATE #endif #endif diff --git a/examples/arduino_hello-world/hello-world.sketch b/examples/arduino_hello-world/hello-world.sketch index a6fd74d97b..bdf414c0fd 100644 --- a/examples/arduino_hello-world/hello-world.sketch +++ b/examples/arduino_hello-world/hello-world.sketch @@ -16,8 +16,8 @@ // For some boards RIOT defines a macro assigning the required baudrate of the // serial link. If this macro is not set, the default baudrate is set to // 115200. -#ifdef UART_STDIO_BAUDRATE -#define SERIAL_BAUDRATE UART_STDIO_BAUDRATE +#ifdef STDIO_UART_BAUDRATE +#define SERIAL_BAUDRATE STDIO_UART_BAUDRATE #else #define SERIAL_BAUDRATE 115200 #endif diff --git a/sys/auto_init/netif/auto_init_ethos.c b/sys/auto_init/netif/auto_init_ethos.c index 65bcd92a41..7cdeaac8a3 100644 --- a/sys/auto_init/netif/auto_init_ethos.c +++ b/sys/auto_init/netif/auto_init_ethos.c @@ -26,7 +26,7 @@ #include "net/gnrc/netif/ethernet.h" /** - * @brief global ethos object, used by uart_stdio + * @brief global ethos object, used by stdio_uart */ ethos_t ethos; diff --git a/sys/newlib_syscalls_default/syscalls.c b/sys/newlib_syscalls_default/syscalls.c index 42ad730902..7eebf50109 100644 --- a/sys/newlib_syscalls_default/syscalls.c +++ b/sys/newlib_syscalls_default/syscalls.c @@ -45,7 +45,7 @@ #include "vfs.h" #endif -#include "uart_stdio.h" +#include "stdio_base.h" #include @@ -69,7 +69,7 @@ char *heap_top = &_sheap + 4; */ void _init(void) { - uart_stdio_init(); + stdio_init(); } /** @@ -389,7 +389,7 @@ int _unlink_r(struct _reent *r, const char *path) /* * Fallback read function * - * All input is read from uart_stdio regardless of fd number. The function will + * All input is read from stdio_uart regardless of fd number. The function will * block until a byte is actually read. * * Note: the read function does not buffer - data will be lost if the function is not @@ -399,20 +399,20 @@ _ssize_t _read_r(struct _reent *r, int fd, void *buffer, size_t count) { (void)r; (void)fd; - return uart_stdio_read(buffer, count); + return stdio_read(buffer, count); } /* * Fallback write function * - * All output is directed to uart_stdio, independent of the given file descriptor. + * All output is directed to stdio_uart, independent of the given file descriptor. * The write call will further block until the byte is actually written to the UART. */ _ssize_t _write_r(struct _reent *r, int fd, const void *data, size_t count) { (void) r; (void) fd; - return uart_stdio_write(data, count); + return stdio_write(data, count); } /* Stubs to avoid linking errors, these functions do not have any effect */ diff --git a/sys/stdio_uart/stdio_uart.c b/sys/stdio_uart/stdio_uart.c index 40993196ee..e89ca2047e 100644 --- a/sys/stdio_uart/stdio_uart.c +++ b/sys/stdio_uart/stdio_uart.c @@ -72,7 +72,7 @@ static ssize_t stdio_uart_vfs_read(vfs_file_t *filp, void *dest, size_t nbytes) if (fd != STDIN_FILENO) { return -EBADF; } - return stdio_uart_read(dest, nbytes); + return stdio_read(dest, nbytes); } static ssize_t stdio_uart_vfs_write(vfs_file_t *filp, const void *src, size_t nbytes) @@ -81,7 +81,7 @@ static ssize_t stdio_uart_vfs_write(vfs_file_t *filp, const void *src, size_t nb if (fd == STDIN_FILENO) { return -EBADF; } - return stdio_uart_write(src, nbytes); + return stdio_write(src, nbytes); } #endif diff --git a/sys/vfs/vfs.c b/sys/vfs/vfs.c index 807a95d0d8..0938e67f86 100644 --- a/sys/vfs/vfs.c +++ b/sys/vfs/vfs.c @@ -871,7 +871,7 @@ static inline int _allocate_fd(int fd) if ((fd == STDIN_FILENO) || (fd == STDOUT_FILENO) || (fd == STDERR_FILENO)) { /* Do not auto-allocate the stdio file descriptor numbers to * avoid conflicts between normal file system users and stdio - * drivers such as uart_stdio, rtt_stdio which need to be able + * drivers such as stdio_uart, stdio_rtt which need to be able * to bind to these specific file descriptor numbers. */ continue; } diff --git a/tests/driver_dynamixel/main.c b/tests/driver_dynamixel/main.c index 04521232cb..ce0775e1db 100644 --- a/tests/driver_dynamixel/main.c +++ b/tests/driver_dynamixel/main.c @@ -9,7 +9,7 @@ #include "dynamixel.h" #include "shell.h" #include "shell_commands.h" -#include "uart_stdio.h" +#include "stdio_uart.h" #include "board.h" #include "periph/gpio.h" @@ -101,7 +101,7 @@ static int parse_uart(char *arg) printf("Error: Invalid UART_DEV device specified (%u).\n", uart); return -1; } - else if (UART_DEV(uart) == UART_STDIO_DEV) { + else if (UART_DEV(uart) == STDIO_UART_DEV) { printf("Error: The selected UART_DEV(%u) is used for the shell!\n", uart); return -2; } diff --git a/tests/driver_feetech/main.c b/tests/driver_feetech/main.c index c461d740f6..018f5fd412 100644 --- a/tests/driver_feetech/main.c +++ b/tests/driver_feetech/main.c @@ -9,7 +9,7 @@ #include "feetech.h" #include "shell.h" #include "shell_commands.h" -#include "uart_stdio.h" +#include "stdio_uart.h" #include #include @@ -86,7 +86,7 @@ static int parse_uart(char *arg) printf("Error: Invalid UART_DEV device specified (%u).\n", uart); return -1; } - else if (UART_DEV(uart) == UART_STDIO_DEV) { + else if (UART_DEV(uart) == STDIO_UART_DEV) { printf("Error: The selected UART_DEV(%u) is used for the shell!\n", uart); return -2; } diff --git a/tests/driver_rn2xx3/README.md b/tests/driver_rn2xx3/README.md index 3211e9ca13..63262c254c 100644 --- a/tests/driver_rn2xx3/README.md +++ b/tests/driver_rn2xx3/README.md @@ -18,7 +18,7 @@ of the Bee-like module to your board: NOTE: when you use an Arduino Wireless Proto shield, the RN2483/RN2903 module can potentially be connected to the same UART as RIOTs standard out. This is the case for Arduino UNO, and most of the Nucleo 64 boards. -In this case you must redefine `UART_STDIO_DEV` to another UART interface in +In this case you must redefine `STDIO_UART_DEV` to another UART interface in the `board.h` and connect a UART-to-USB adapter to that UART. This is not the case with Arduino-zero or some Nucleo144 boards. diff --git a/tests/driver_xbee/README.md b/tests/driver_xbee/README.md index e9e8aa7a58..9931112a14 100644 --- a/tests/driver_xbee/README.md +++ b/tests/driver_xbee/README.md @@ -9,7 +9,7 @@ module to your board: - GND NOTE: when you use an Arduino Xbee shield, the Xbee module is connected to the -same UART as RIOTs standard out. In this case you must redefine UART_STDIO_DEV to +same UART as RIOTs standard out. In this case you must redefine STDIO_UART_DEV to another UART interface in the board.h and connect a UART-to-USB adapter to that UART. diff --git a/tests/periph_uart/main.c b/tests/periph_uart/main.c index 689c798fe4..fbab5ef4bc 100644 --- a/tests/periph_uart/main.c +++ b/tests/periph_uart/main.c @@ -28,7 +28,7 @@ #include "msg.h" #include "ringbuffer.h" #include "periph/uart.h" -#include "uart_stdio.h" +#include "stdio_uart.h" #include "xtimer.h" #define SHELL_BUFSIZE (128U) @@ -39,8 +39,8 @@ #define POWEROFF_DELAY (250U * US_PER_MS) /* quarter of a second */ -#ifndef UART_STDIO_DEV -#define UART_STDIO_DEV (UART_UNDEF) +#ifndef STDIO_UART_DEV +#define STDIO_UART_DEV (UART_UNDEF) #endif typedef struct { @@ -60,7 +60,7 @@ static int parse_dev(char *arg) printf("Error: Invalid UART_DEV device specified (%u).\n", dev); return -1; } - else if (UART_DEV(dev) == UART_STDIO_DEV) { + else if (UART_DEV(dev) == STDIO_UART_DEV) { printf("Error: The selected UART_DEV(%u) is used for the shell!\n", dev); return -2; } @@ -196,14 +196,14 @@ int main(void) "NOTE: all strings need to be '\\n' terminated!\n"); /* do sleep test for UART used as STDIO. There is a possibility that the - * value given in UART_STDIO_DEV is not a numeral (depends on the CPU + * value given in STDIO_UART_DEV is not a numeral (depends on the CPU * implementation), so we rather break the output by printing a * non-numerical value instead of breaking the UART device descriptor */ - sleep_test(UART_STDIO_DEV, UART_STDIO_DEV); + sleep_test(STDIO_UART_DEV, STDIO_UART_DEV); puts("\nUART INFO:"); printf("Available devices: %i\n", UART_NUMOF); - printf("UART used for STDIO (the shell): UART_DEV(%i)\n\n", UART_STDIO_DEV); + printf("UART used for STDIO (the shell): UART_DEV(%i)\n\n", STDIO_UART_DEV); /* initialize ringbuffers */ for (unsigned i = 0; i < UART_NUMOF; i++) {