Add PWM remap fonctionnality.
On GD32V103f there is 4 types of remaps for PWM. Not all timers are able to be
configured with this 4 remaps types. Also it is not possible to deduce the
Remap type with the pins used (e.g TIMER0).
The implementation works with an intermediate trait Pins<TIMER, REMAP> which is
implemented for all compatibles tuples of gpio::P** for the specified couple
TIMER, REMAP.
```rust
// ...
let mut pwm_t0 = PwmTimer::<TIMER0, NoRemap>::new(
timer0, (None, Some(&pa9), Some(&pa10), None), &mut rcu, &mut afio
);
// ...
pwm_t0.set_duty(Channel::CH1, 100);
```
parent
288c8af2
Please register or sign in to comment