baords/samr21-xpro: added third channel for PWM1

This commit is contained in:
Hauke Petersen 2016-02-18 15:28:07 +01:00
parent c82dda9b74
commit a75847ca27

View File

@ -122,7 +122,7 @@ static const uart_conf_t uart_config[] = {
*/ */
#define PWM_0_EN 1 #define PWM_0_EN 1
#define PWM_1_EN 1 #define PWM_1_EN 1
#define PWM_MAX_CHANNELS 2 #define PWM_MAX_CHANNELS 3
/* for compatibility with test application */ /* for compatibility with test application */
#define PWM_0_CHANNELS PWM_MAX_CHANNELS #define PWM_0_CHANNELS PWM_MAX_CHANNELS
#define PWM_1_CHANNELS PWM_MAX_CHANNELS #define PWM_1_CHANNELS PWM_MAX_CHANNELS
@ -133,15 +133,17 @@ static const pwm_conf_t pwm_config[] = {
{TCC1, { {TCC1, {
/* GPIO pin, MUX value, TCC channel */ /* GPIO pin, MUX value, TCC channel */
{ GPIO_PIN(PA, 6), GPIO_MUX_E, 0 }, { GPIO_PIN(PA, 6), GPIO_MUX_E, 0 },
{GPIO_PIN(PA, 7), GPIO_MUX_E, 1} { GPIO_PIN(PA, 7), GPIO_MUX_E, 1 },
{ GPIO_UNDEF, (gpio_mux_t)0, 2 }
}}, }},
#endif #endif
#if PWM_1_EN #if PWM_1_EN
{TCC0, { {TCC0, {
/* GPIO pin, MUX value, TCC channel */ /* GPIO pin, MUX value, TCC channel */
{ GPIO_PIN(PA, 16), GPIO_MUX_F, 0 },
{ GPIO_PIN(PA, 18), GPIO_MUX_F, 2 }, { GPIO_PIN(PA, 18), GPIO_MUX_F, 2 },
{ GPIO_PIN(PA, 19), GPIO_MUX_F, 3 } { GPIO_PIN(PA, 19), GPIO_MUX_F, 3 }
}}, }}
#endif #endif
}; };