Skip to content

Commit

Permalink
Merge pull request #11598 from aabadie/pr/missing_stdio_uart_rx
Browse files Browse the repository at this point in the history
Add stdin pseudo module and set it as dependency for applications using getchar
  • Loading branch information
kaspar030 authored Jun 20, 2019
2 parents d47ac80 + 9c7a1e6 commit 14d9f54
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ ifneq (,$(filter stdio_rtt,$(USEMODULE)))
endif

ifneq (,$(filter shell,$(USEMODULE)))
USEMODULE += stdin
endif

ifneq (,$(filter stdin,$(USEMODULE)))
ifneq (,$(filter stdio_uart,$(USEMODULE)))
USEMODULE += stdio_uart_rx
endif
Expand Down
3 changes: 3 additions & 0 deletions dist/tools/nrf52_resetpin_cfg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ APPLICATION = nrf52_resetpin_cfg
BOARD ?= nrf52dk
RIOTBASE ?= $(CURDIR)/../../..

# This application uses getchar and thus expects input from stdio
USEMODULE += stdin

# the RESET_PIN environment variable allows for manually specifying the reset
# pin that is programmed. Below this Makefile already contains the specific pins
# for some known platforms
Expand Down
1 change: 1 addition & 0 deletions makefiles/pseudomodules.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ PSEUDOMODULES += sock
PSEUDOMODULES += sock_ip
PSEUDOMODULES += sock_tcp
PSEUDOMODULES += sock_udp
PSEUDOMODULES += stdin
PSEUDOMODULES += stdio_uart_rx

# print ascii representation in function od_hex_dump()
Expand Down
6 changes: 6 additions & 0 deletions sys/include/stdio_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
*
* @brief Standard input/output backend using UART
*
* @warning Standard input is disabled by default on UART. To enable it, load
* the `stdin` module in your application:
* ```
* USEMODULE += stdin
* ```
*
* @{
* @file
*
Expand Down
3 changes: 3 additions & 0 deletions tests/lua_loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ include ../Makefile.tests_common

USEPKG += lua

# This application uses getchar and thus expects input from stdio
USEMODULE += stdin

BOARD_WHITELIST += native samr21-xpro

ifneq ($(BOARD),native)
Expand Down
3 changes: 3 additions & 0 deletions tests/posix_time/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ include ../Makefile.tests_common

USEMODULE += posix_time

# This application uses getchar and thus expects input from stdio
USEMODULE += stdin

TEST_ON_CI_WHITELIST += all

include $(RIOTBASE)/Makefile.include
3 changes: 3 additions & 0 deletions tests/xtimer_usleep/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ USEMODULE += xtimer
# This test randomly fails on `native` so disable it from CI
TEST_ON_CI_WHITELIST += samr21-xpro

# This application uses getchar and thus expects input from stdio
USEMODULE += stdin

# Port and pin configuration for probing with oscilloscope
# Port number should be found in port enum e.g in cpu/include/periph_cpu.h
#FEATURES_REQUIRED += periph_gpio
Expand Down

0 comments on commit 14d9f54

Please sign in to comment.