s board: fixes
- moved pwm_conf[_chan]_t to periph_cpu.h - fixed comments for channel definitions
This commit is contained in:
parent
d70d59592e
commit
83b322f9ce
@ -132,40 +132,19 @@ static const uart_conf_t uart_config[] = {
|
|||||||
#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
|
||||||
|
|
||||||
/**
|
|
||||||
* @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 */
|
/* PWM device configuration */
|
||||||
#if PWM_NUMOF
|
#if PWM_NUMOF
|
||||||
static const pwm_conf_t pwm_config[] = {
|
static const pwm_conf_t pwm_config[] = {
|
||||||
#if PWM_0_EN
|
#if PWM_0_EN
|
||||||
{TCC1, {
|
{TCC1, {
|
||||||
/* port , pin, AF, chan */
|
/* 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}
|
||||||
}},
|
}},
|
||||||
#endif
|
#endif
|
||||||
#if PWM_1_EN
|
#if PWM_1_EN
|
||||||
{TCC0, {
|
{TCC0, {
|
||||||
/* port , pin, AF, chan */
|
/* GPIO pin, MUX value, TCC channel */
|
||||||
{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}
|
||||||
}},
|
}},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user