summaryrefslogtreecommitdiffstats
path: root/uart.h
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2017-05-28 20:33:43 +0100
committerTomasz Kramkowski <tk@the-tk.com>2017-05-28 20:33:43 +0100
commit9c5553fbd041724c09f5e602be4b37f5bc61b1d7 (patch)
tree4115d295e4043b5f17f72f16c29e20747e6568f9 /uart.h
parentde1f8661e0900c6794279e758a141e31d8b506ae (diff)
downloadfmk-9c5553fbd041724c09f5e602be4b37f5bc61b1d7.tar.gz
fmk-9c5553fbd041724c09f5e602be4b37f5bc61b1d7.tar.xz
fmk-9c5553fbd041724c09f5e602be4b37f5bc61b1d7.zip
uart: Make the uart module optional
Making the uart module optional makes an -Os compile much smaller.
Diffstat (limited to 'uart.h')
-rw-r--r--uart.h8
1 files changed, 7 insertions, 1 deletions
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 */