From a75847ca276911b843fb828f19243d0a6de6ce4a Mon Sep 17 00:00:00 2001
From: Hauke Petersen <hauke.petersen@fu-berlin.de>
Date: Thu, 18 Feb 2016 15:28:07 +0100
Subject: [PATCH] baords/samr21-xpro: added third channel for PWM1

---
 boards/samr21-xpro/include/periph_conf.h | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/boards/samr21-xpro/include/periph_conf.h b/boards/samr21-xpro/include/periph_conf.h
index 79a9c30ae7..2199c060eb 100644
--- a/boards/samr21-xpro/include/periph_conf.h
+++ b/boards/samr21-xpro/include/periph_conf.h
@@ -122,7 +122,7 @@ static const uart_conf_t uart_config[] = {
  */
 #define PWM_0_EN            1
 #define PWM_1_EN            1
-#define PWM_MAX_CHANNELS    2
+#define PWM_MAX_CHANNELS    3
 /* for compatibility with test application */
 #define PWM_0_CHANNELS      PWM_MAX_CHANNELS
 #define PWM_1_CHANNELS      PWM_MAX_CHANNELS
@@ -132,16 +132,18 @@ static const pwm_conf_t pwm_config[] = {
 #if PWM_0_EN
     {TCC1, {
         /* GPIO pin, MUX value, TCC channel */
-        {GPIO_PIN(PA, 6), GPIO_MUX_E, 0},
-        {GPIO_PIN(PA, 7), GPIO_MUX_E, 1}
+        { GPIO_PIN(PA, 6), GPIO_MUX_E, 0 },
+        { GPIO_PIN(PA, 7), GPIO_MUX_E, 1 },
+        { GPIO_UNDEF, (gpio_mux_t)0, 2 }
     }},
 #endif
 #if PWM_1_EN
     {TCC0, {
         /* GPIO pin, MUX value, TCC channel */
-        {GPIO_PIN(PA, 18), GPIO_MUX_F, 2},
-        {GPIO_PIN(PA, 19), GPIO_MUX_F, 3}
-    }},
+        { GPIO_PIN(PA, 16), GPIO_MUX_F, 0 },
+        { GPIO_PIN(PA, 18), GPIO_MUX_F, 2 },
+        { GPIO_PIN(PA, 19), GPIO_MUX_F, 3 }
+    }}
 #endif
 };
 
-- 
GitLab