From 9c5553fbd041724c09f5e602be4b37f5bc61b1d7 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Sun, 28 May 2017 20:33:43 +0100 Subject: uart: Make the uart module optional Making the uart module optional makes an -Os compile much smaller. --- uart.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'uart.h') diff --git a/uart.h b/uart.h index 5ff2d79..b60b250 100644 --- a/uart.h +++ b/uart.h @@ -19,10 +19,16 @@ #ifndef FMK_UART_H #define FMK_UART_H +#ifdef WITH_UART void uart_setup(void); void uart_putchar(int c); void uart_printf(const char *fmt, ...); void uart_puts(const char *s); -void uart0_isr(void); +#else +static inline void uart_setup(void) { } +static inline void uart_putchar(int c) { (void)c; } +static inline void uart_printf(const char *fmt, ...) { (void)fmt; } +static inline void uart_puts(const char *s) { (void)s; } +#endif #endif /* FMK_UART_H */ -- cgit v1.2.3-54-g00ecf