Skip to content

Commit

Permalink
fix MCPWM typos
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpolo committed Mar 5, 2023
1 parent edfa9c8 commit f168d96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions esp-hal-common/src/mcpwm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,10 @@ unsafe impl PwmPeripheral for PWM {
match (OP, IS_A) {
(0, true) => OutputSignal::PWM0_0A,
(1, true) => OutputSignal::PWM0_1A,
(2, true) => OutputSignal::PWM0_1A,
(2, true) => OutputSignal::PWM0_2A,
(0, false) => OutputSignal::PWM0_0B,
(1, false) => OutputSignal::PWM0_1B,
(2, false) => OutputSignal::PWM0_1B,
(2, false) => OutputSignal::PWM0_2B,
_ => unreachable!(),
}
}
Expand All @@ -318,10 +318,10 @@ unsafe impl PwmPeripheral for crate::peripherals::PWM1 {
match (OP, IS_A) {
(0, true) => OutputSignal::PWM1_0A,
(1, true) => OutputSignal::PWM1_1A,
(2, true) => OutputSignal::PWM1_1A,
(2, true) => OutputSignal::PWM1_2A,
(0, false) => OutputSignal::PWM1_0B,
(1, false) => OutputSignal::PWM1_1B,
(2, false) => OutputSignal::PWM1_1B,
(2, false) => OutputSignal::PWM1_2B,
_ => unreachable!(),
}
}
Expand Down
4 changes: 2 additions & 2 deletions esp-hal-common/src/mcpwm/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl<'d, Pin: OutputPin, PWM: PwmPeripheral, const OP: u8, const IS_A: bool>
}
}

/// Set how a new timestamp syncs with the timer.
/// Write a new timestamp.
/// The written value will take effect according to the set
/// [`PwmUpdateMethod`].
#[cfg(esp32)]
Expand All @@ -282,7 +282,7 @@ impl<'d, Pin: OutputPin, PWM: PwmPeripheral, const OP: u8, const IS_A: bool>
#[cfg(esp32s3)]
pub fn set_timestamp(&mut self, value: u16) {
// SAFETY:
// We only write to our GENx_TSTMP_x register
// We only write to our CMPRx_VALUEx register
let block = unsafe { &*PWM::block() };
match (OP, IS_A) {
(0, true) => block.cmpr0_value0.write(|w| w.cmpr0_a().variant(value)),
Expand Down

0 comments on commit f168d96

Please sign in to comment.