From 1e63aa60a634fcf53935ccebb1c67e24fa0bd88e Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Tue, 7 Jul 2015 00:43:59 +0200 Subject: [PATCH] boards/wsn430-common: Add getchar implementation --- boards/wsn430-common/wsn430-uart0.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/boards/wsn430-common/wsn430-uart0.c b/boards/wsn430-common/wsn430-uart0.c index 7161d431dc..4188bcec0b 100644 --- a/boards/wsn430-common/wsn430-uart0.c +++ b/boards/wsn430-common/wsn430-uart0.c @@ -30,6 +30,15 @@ int putchar(int c) return c; } +int getchar(void) +{ +#ifdef MODULE_UART0 + return uart0_readc(); +#else + return U0RXBUF; +#endif +} + void usart0irq(void); /** * \brief the interrupt function