bug fix
This commit is contained in:
parent
319f10da5d
commit
b3cdf3a040
@ -90,9 +90,9 @@ pub(crate) mod sealed {
|
|||||||
|
|
||||||
/// Set output compare mode.
|
/// Set output compare mode.
|
||||||
fn set_output_compare_mode(&mut self, channel: Channel, mode: OutputCompareMode) {
|
fn set_output_compare_mode(&mut self, channel: Channel, mode: OutputCompareMode) {
|
||||||
let r = Self::$regs();
|
|
||||||
let raw_channel: usize = channel.index();
|
let raw_channel: usize = channel.index();
|
||||||
r.ccmr_output(raw_channel / 2)
|
Self::$regs()
|
||||||
|
.ccmr_output(raw_channel / 2)
|
||||||
.modify(|w| w.set_ocm(raw_channel % 2, mode.into()));
|
.modify(|w| w.set_ocm(raw_channel % 2, mode.into()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ pub(crate) mod sealed {
|
|||||||
/// Set output compare preload.
|
/// Set output compare preload.
|
||||||
fn set_output_compare_preload(&mut self, channel: Channel, preload: bool) {
|
fn set_output_compare_preload(&mut self, channel: Channel, preload: bool) {
|
||||||
let channel_index = channel.index();
|
let channel_index = channel.index();
|
||||||
Self::regs_1ch()
|
Self::$regs()
|
||||||
.ccmr_output(channel_index / 2)
|
.ccmr_output(channel_index / 2)
|
||||||
.modify(|w| w.set_ocpe(channel_index % 2, preload));
|
.modify(|w| w.set_ocpe(channel_index % 2, preload));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user