Skip to content

Commit 1b90f0a

Browse files
committed
fix MCPWM typos
1 parent bfa1bd9 commit 1b90f0a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

esp-hal-common/src/mcpwm/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,10 @@ unsafe impl PwmPeripheral for crate::peripherals::PWM0 {
261261
match (OP, IS_A) {
262262
(0, true) => OutputSignal::PWM0_0A,
263263
(1, true) => OutputSignal::PWM0_1A,
264-
(2, true) => OutputSignal::PWM0_1A,
264+
(2, true) => OutputSignal::PWM0_2A,
265265
(0, false) => OutputSignal::PWM0_0B,
266266
(1, false) => OutputSignal::PWM0_1B,
267-
(2, false) => OutputSignal::PWM0_1B,
267+
(2, false) => OutputSignal::PWM0_2B,
268268
_ => unreachable!(),
269269
}
270270
}
@@ -283,10 +283,10 @@ unsafe impl PwmPeripheral for crate::peripherals::PWM1 {
283283
match (OP, IS_A) {
284284
(0, true) => OutputSignal::PWM1_0A,
285285
(1, true) => OutputSignal::PWM1_1A,
286-
(2, true) => OutputSignal::PWM1_1A,
286+
(2, true) => OutputSignal::PWM1_2A,
287287
(0, false) => OutputSignal::PWM1_0B,
288288
(1, false) => OutputSignal::PWM1_1B,
289-
(2, false) => OutputSignal::PWM1_1B,
289+
(2, false) => OutputSignal::PWM1_2B,
290290
_ => unreachable!(),
291291
}
292292
}

esp-hal-common/src/mcpwm/operator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ impl<'d, Pin: OutputPin, PWM: PwmPeripheral, const OP: u8, const IS_A: bool>
223223
}
224224
}
225225

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

0 commit comments

Comments
 (0)