From 83b322f9ce3c7bcd4737f1924d2eb9c89b57003b Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Fri, 23 Oct 2015 11:39:56 +0200 Subject: [PATCH] s board: fixes - moved pwm_conf[_chan]_t to periph_cpu.h - fixed comments for channel definitions --- boards/samr21-xpro/include/periph_conf.h | 25 ++---------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/boards/samr21-xpro/include/periph_conf.h b/boards/samr21-xpro/include/periph_conf.h index 1d52d04603..9561e8549e 100644 --- a/boards/samr21-xpro/include/periph_conf.h +++ b/boards/samr21-xpro/include/periph_conf.h @@ -132,40 +132,19 @@ static const uart_conf_t uart_config[] = { #define PWM_0_CHANNELS PWM_MAX_CHANNELS #define PWM_1_CHANNELS PWM_MAX_CHANNELS -/** - * @brief PWM channel configuration data structure - * - * TODO: this should be moved into the CPU folder - */ -typedef struct { - gpio_t pin; /**< GPIO pin */ - gpio_mux_t mux; /**< pin function multiplex value */ - uint8_t chan; /**< TCC channel to use */ -} pwm_conf_chan_t; - -/** - * @brief PWM device configuration data structure - * - * TODO: this should be moved into the CPU folder - */ -typedef struct { - Tcc *dev; /*< TCC device to use */ - pwm_conf_chan_t chan[2]; /**< channel configuration */ -} pwm_conf_t; - /* PWM device configuration */ #if PWM_NUMOF static const pwm_conf_t pwm_config[] = { #if PWM_0_EN {TCC1, { - /* port , pin, AF, chan */ + /* GPIO pin, MUX value, TCC channel */ {GPIO_PIN(PA,6), GPIO_MUX_E, 0}, {GPIO_PIN(PA,7), GPIO_MUX_E, 1} }}, #endif #if PWM_1_EN {TCC0, { - /* port , pin, AF, chan */ + /* GPIO pin, MUX value, TCC channel */ {GPIO_PIN(PA, 18), GPIO_MUX_F, 2}, {GPIO_PIN(PA, 19), GPIO_MUX_F, 3} }},