From 6789c49822bfa99d251a03b7207cfba438fec4ff Mon Sep 17 00:00:00 2001
From: Bas Stottelaar <basstottelaar@gmail.com>
Date: Mon, 14 May 2018 00:27:02 +0200
Subject: [PATCH] boards: efm32: add UART mode option.

---
 boards/ikea-tradfri/include/periph_conf.h | 3 +++
 boards/slstk3401a/include/periph_conf.h   | 9 +++++++++
 boards/sltb001a/include/periph_conf.h     | 9 +++++++++
 boards/slwstk6000b/include/periph_conf.h  | 3 +++
 boards/stk3600/include/periph_conf.h      | 9 +++++++++
 boards/stk3700/include/periph_conf.h      | 9 +++++++++
 6 files changed, 42 insertions(+)

diff --git a/boards/ikea-tradfri/include/periph_conf.h b/boards/ikea-tradfri/include/periph_conf.h
index 7b3dc0b9e6..fbb133e4fa 100644
--- a/boards/ikea-tradfri/include/periph_conf.h
+++ b/boards/ikea-tradfri/include/periph_conf.h
@@ -126,6 +126,9 @@ static const uart_conf_t uart_config[] = {
         .tx_pin = GPIO_PIN(PB, 14),
         .loc = USART_ROUTELOC0_RXLOC_LOC9 |
                USART_ROUTELOC0_TXLOC_LOC9,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_USART0,
         .irq = USART0_RX_IRQn
     }
diff --git a/boards/slstk3401a/include/periph_conf.h b/boards/slstk3401a/include/periph_conf.h
index 6dfc97597e..e2f394fe65 100644
--- a/boards/slstk3401a/include/periph_conf.h
+++ b/boards/slstk3401a/include/periph_conf.h
@@ -175,6 +175,9 @@ static const uart_conf_t uart_config[] = {
         .tx_pin = GPIO_PIN(PA, 0),
         .loc = USART_ROUTELOC0_RXLOC_LOC0 |
                USART_ROUTELOC0_TXLOC_LOC0,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_USART0,
         .irq = USART0_RX_IRQn
     },
@@ -184,6 +187,9 @@ static const uart_conf_t uart_config[] = {
         .tx_pin = GPIO_PIN(PC, 6),
         .loc = USART_ROUTELOC0_RXLOC_LOC11 |
                USART_ROUTELOC0_TXLOC_LOC11,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_USART1,
         .irq = USART1_RX_IRQn
     },
@@ -193,6 +199,9 @@ static const uart_conf_t uart_config[] = {
         .tx_pin = GPIO_PIN(PD, 10),
         .loc = LEUART_ROUTELOC0_RXLOC_LOC18 |
                LEUART_ROUTELOC0_TXLOC_LOC18,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_LEUART0,
         .irq = LEUART0_IRQn
     }
diff --git a/boards/sltb001a/include/periph_conf.h b/boards/sltb001a/include/periph_conf.h
index 552a786418..4ab11bcdea 100644
--- a/boards/sltb001a/include/periph_conf.h
+++ b/boards/sltb001a/include/periph_conf.h
@@ -176,6 +176,9 @@ static const uart_conf_t uart_config[] = {
         .tx_pin = GPIO_PIN(PA, 0),
         .loc = USART_ROUTELOC0_RXLOC_LOC0 |
                USART_ROUTELOC0_TXLOC_LOC0,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_USART0,
         .irq = USART0_RX_IRQn
     },
@@ -185,6 +188,9 @@ static const uart_conf_t uart_config[] = {
         .tx_pin = GPIO_PIN(PC, 7),
         .loc = USART_ROUTELOC0_RXLOC_LOC11 |
                USART_ROUTELOC0_TXLOC_LOC11,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_USART1,
         .irq = USART1_RX_IRQn
     },
@@ -194,6 +200,9 @@ static const uart_conf_t uart_config[] = {
         .tx_pin = GPIO_PIN(PD, 10),
         .loc = LEUART_ROUTELOC0_RXLOC_LOC18 |
                LEUART_ROUTELOC0_TXLOC_LOC18,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_LEUART0,
         .irq = LEUART0_IRQn
     }
diff --git a/boards/slwstk6000b/include/periph_conf.h b/boards/slwstk6000b/include/periph_conf.h
index feabf04891..f53a9cf3b7 100644
--- a/boards/slwstk6000b/include/periph_conf.h
+++ b/boards/slwstk6000b/include/periph_conf.h
@@ -177,6 +177,9 @@ static const uart_conf_t uart_config[] = {
         .tx_pin = MODULE_PIN_F6,
         .loc = USART_ROUTELOC0_RXLOC_LOC0 |
                USART_ROUTELOC0_TXLOC_LOC0,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_USART0,
         .irq = USART0_RX_IRQn
     }
diff --git a/boards/stk3600/include/periph_conf.h b/boards/stk3600/include/periph_conf.h
index 344903b0d3..505bd85c79 100644
--- a/boards/stk3600/include/periph_conf.h
+++ b/boards/stk3600/include/periph_conf.h
@@ -237,6 +237,9 @@ static const uart_conf_t uart_config[] = {
         .rx_pin = GPIO_PIN(PE, 1),
         .tx_pin = GPIO_PIN(PE, 0),
         .loc = UART_ROUTE_LOCATION_LOC1,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_UART0,
         .irq = UART0_RX_IRQn
     },
@@ -245,6 +248,9 @@ static const uart_conf_t uart_config[] = {
         .rx_pin = GPIO_PIN(PD, 1),
         .tx_pin = GPIO_PIN(PD, 0),
         .loc = USART_ROUTE_LOCATION_LOC1,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_USART1,
         .irq = USART1_RX_IRQn
     },
@@ -253,6 +259,9 @@ static const uart_conf_t uart_config[] = {
         .rx_pin = GPIO_PIN(PD, 5),
         .tx_pin = GPIO_PIN(PD, 4),
         .loc = LEUART_ROUTE_LOCATION_LOC0,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_LEUART0,
         .irq = LEUART0_IRQn
     }
diff --git a/boards/stk3700/include/periph_conf.h b/boards/stk3700/include/periph_conf.h
index c75de87848..11ec369011 100644
--- a/boards/stk3700/include/periph_conf.h
+++ b/boards/stk3700/include/periph_conf.h
@@ -237,6 +237,9 @@ static const uart_conf_t uart_config[] = {
         .rx_pin = GPIO_PIN(PE, 1),
         .tx_pin = GPIO_PIN(PE, 0),
         .loc = UART_ROUTE_LOCATION_LOC1,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_UART0,
         .irq = UART0_RX_IRQn
     },
@@ -245,6 +248,9 @@ static const uart_conf_t uart_config[] = {
         .rx_pin = GPIO_PIN(PD, 1),
         .tx_pin = GPIO_PIN(PD, 0),
         .loc = USART_ROUTE_LOCATION_LOC1,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_USART1,
         .irq = USART1_RX_IRQn
     },
@@ -253,6 +259,9 @@ static const uart_conf_t uart_config[] = {
         .rx_pin = GPIO_PIN(PD, 5),
         .tx_pin = GPIO_PIN(PD, 4),
         .loc = LEUART_ROUTE_LOCATION_LOC0,
+#if EFM32_UART_MODES
+        .mode = UART_MODE_8N1,
+#endif
         .cmu = cmuClock_LEUART0,
         .irq = LEUART0_IRQn
     }
-- 
GitLab