From 376c10feff193fe3b2e2d2109b4e05088b27d603 Mon Sep 17 00:00:00 2001
From: Martine Lenders <m.lenders@fu-berlin.de>
Date: Fri, 3 Aug 2018 15:59:22 +0200
Subject: [PATCH] kinetis: uart: fix unused-function warning

When compiling with LLVM (should also be seen `-Wunused-function` in
GCC), I get an error for `frdm-k22f`. This should fix that.
---
 cpu/kinetis/periph/uart.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/cpu/kinetis/periph/uart.c b/cpu/kinetis/periph/uart.c
index 230b4a67b5..ca0c0f7e63 100644
--- a/cpu/kinetis/periph/uart.c
+++ b/cpu/kinetis/periph/uart.c
@@ -242,6 +242,8 @@ KINETIS_UART_WRITE_INLINE void uart_write_uart(uart_t uart, const uint8_t *data,
     }
 }
 
+#if defined(UART_0_ISR) || defined(UART_1_ISR) || defined(UART_2_ISR) || \
+    defined(UART_3_ISR) || defined(UART_4_ISR)
 static inline void irq_handler_uart(uart_t uart)
 {
     UART_Type *dev = uart_config[uart].dev;
@@ -273,6 +275,7 @@ static inline void irq_handler_uart(uart_t uart)
 
     cortexm_isr_end();
 }
+#endif
 
 #ifdef UART_0_ISR
 void UART_0_ISR(void)
@@ -358,6 +361,8 @@ KINETIS_UART_WRITE_INLINE void uart_write_lpuart(uart_t uart, const uint8_t *dat
     }
 }
 
+#if defined(LPUART_0_ISR) || defined(LPUART_1_ISR) || defined(LPUART_2_ISR) || \
+    defined(LPUART_3_ISR) || defined(LPUART_4_ISR)
 static inline void irq_handler_lpuart(uart_t uart)
 {
     LPUART_Type *dev = uart_config[uart].dev;
@@ -394,6 +399,7 @@ static inline void irq_handler_lpuart(uart_t uart)
 
     cortexm_isr_end();
 }
+#endif
 
 #ifdef LPUART_0_ISR
 void LPUART_0_ISR(void)
-- 
GitLab