fix bug with config.counter_mode
This commit is contained in:
parent
4c2d0ac211
commit
613e88f1d2
@ -129,8 +129,10 @@ impl<'d, T: Instance> SequencePwm<'d, T> {
|
|||||||
w.mode().refresh_count()
|
w.mode().refresh_count()
|
||||||
});
|
});
|
||||||
|
|
||||||
r.mode
|
r.mode.write(|w| match config.counter_mode {
|
||||||
.write(|w| unsafe { w.bits(config.counter_mode as u32) });
|
CounterMode::UpAndDown => w.updown().up_and_down(),
|
||||||
|
CounterMode::Up => w.updown().up(),
|
||||||
|
});
|
||||||
r.prescaler
|
r.prescaler
|
||||||
.write(|w| w.prescaler().bits(config.prescaler as u8));
|
.write(|w| w.prescaler().bits(config.prescaler as u8));
|
||||||
r.countertop
|
r.countertop
|
||||||
|
Loading…
Reference in New Issue
Block a user