Commit cc096474 authored by Stéphane Clérambault's avatar Stéphane Clérambault
Browse files

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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment