mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/feather-m0: update PWM configuration
This commit is contained in:
parent
f76f6f4935
commit
5bb1978de2
@ -151,31 +151,34 @@ static const uart_conf_t uart_config[] = {
|
||||
*/
|
||||
#define PWM_0_EN 1
|
||||
#define PWM_1_EN 1
|
||||
#define PWM_MAX_CHANNELS 2
|
||||
/* for compatibility with test application */
|
||||
#define PWM_0_CHANNELS PWM_MAX_CHANNELS
|
||||
#define PWM_1_CHANNELS PWM_MAX_CHANNELS
|
||||
|
||||
#if PWM_0_EN
|
||||
/* PWM0 channels */
|
||||
static const pwm_conf_chan_t pwm_chan0_config[] = {
|
||||
/* GPIO pin, MUX value, TCC channel */
|
||||
{ GPIO_PIN(PA, 7), GPIO_MUX_E, 1 }, /* ~9 */
|
||||
};
|
||||
#endif
|
||||
#if PWM_1_EN
|
||||
/* PWM1 channels */
|
||||
static const pwm_conf_chan_t pwm_chan1_config[] = {
|
||||
/* GPIO pin, MUX value, TCC channel */
|
||||
{ GPIO_PIN(PA, 16), GPIO_MUX_E, 0 }, /* ~11 */
|
||||
};
|
||||
#endif
|
||||
|
||||
/* PWM device configuration */
|
||||
static const pwm_conf_t pwm_config[] = {
|
||||
#if PWM_0_EN
|
||||
{TCC0, {
|
||||
/* GPIO pin, MUX value, TCC channel */
|
||||
{ GPIO_UNDEF, (gpio_mux_t)0, 0 },
|
||||
{ GPIO_PIN(PA, 7), GPIO_MUX_E, 1 }, /* ~9 */
|
||||
}},
|
||||
{TCC0, pwm_chan0_config, ARRAY_SIZE(pwm_chan0_config)},
|
||||
#endif
|
||||
#if PWM_1_EN
|
||||
{TCC2, {
|
||||
/* GPIO pin, MUX value, TCC channel */
|
||||
{ GPIO_PIN(PA, 16), GPIO_MUX_E, 0 }, /* ~11 */
|
||||
{ GPIO_UNDEF, (gpio_mux_t)0, 1 },
|
||||
}},
|
||||
{TCC2, pwm_chan1_config, ARRAY_SIZE(pwm_chan1_config)},
|
||||
#endif
|
||||
};
|
||||
|
||||
/* number of devices that are actually defined */
|
||||
#define PWM_NUMOF (2U)
|
||||
#define PWM_NUMOF ARRAY_SIZE(pwm_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user