Skip to content

Commit

Permalink
kinetis: uart: fix unused-function warning
Browse files Browse the repository at this point in the history
When compiling with LLVM (should also be seen `-Wunused-function` in
GCC), I get an error for `frdm-k22f`. This should fix that.
  • Loading branch information
miri64 committed Aug 8, 2018
1 parent 2f480ef commit 376c10f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cpu/kinetis/periph/uart.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 376c10f

Please sign in to comment.