From f37825a1bac35820cd376f04177b57f9e5bc9b88 Mon Sep 17 00:00:00 2001
From: Semjon Kerner <semjon.kerner@fu-berlin.de>
Date: Wed, 11 Apr 2018 17:05:53 +0200
Subject: [PATCH]  boards/calliope-mini: configure pwm

---
 boards/calliope-mini/Makefile.features     |  1 +
 boards/calliope-mini/include/periph_conf.h | 16 +++++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/boards/calliope-mini/Makefile.features b/boards/calliope-mini/Makefile.features
index 9a75beba68..eb4cb8ead4 100644
--- a/boards/calliope-mini/Makefile.features
+++ b/boards/calliope-mini/Makefile.features
@@ -4,6 +4,7 @@ FEATURES_PROVIDED += periph_i2c
 FEATURES_PROVIDED += periph_rtt
 FEATURES_PROVIDED += periph_timer
 FEATURES_PROVIDED += periph_uart
+FEATURES_PROVIDED += periph_pwm
 
 # Various other features (if any)
 FEATURES_PROVIDED += radio_nrfmin
diff --git a/boards/calliope-mini/include/periph_conf.h b/boards/calliope-mini/include/periph_conf.h
index 2d7e5458da..e3a033b826 100644
--- a/boards/calliope-mini/include/periph_conf.h
+++ b/boards/calliope-mini/include/periph_conf.h
@@ -57,18 +57,11 @@ static const timer_conf_t timer_config[] = {
         .channels = 3,
         .bitmode  = TIMER_BITMODE_BITMODE_16Bit,
         .irqn     = TIMER1_IRQn
-    },
-    {
-        .dev      = NRF_TIMER2,
-        .channels = 3,
-        .bitmode  = TIMER_BITMODE_BITMODE_16Bit,
-        .irqn     = TIMER2_IRQn
     }
 };
 
 #define TIMER_0_ISR         isr_timer0
 #define TIMER_1_ISR         isr_timer1
-#define TIMER_2_ISR         isr_timer2
 
 #define TIMER_NUMOF         (sizeof(timer_config) / sizeof(timer_config[0]))
 /** @} */
@@ -129,6 +122,15 @@ static const i2c_conf_t i2c_config[] = {
 #define RADIO_IRQ_PRIO      1
 /** @} */
 
+/**
+ * @name    PWM configuration
+ * @{
+ */
+#define PWM_NUMOF           (1U)
+#define PWM_TIMER           NRF_TIMER2
+#define PWM_PIN             (0U)
+/** @} */
+
 #ifdef __cplusplus
 }
 #endif
-- 
GitLab