Skip to content

Commit 5b898bb

Browse files
bors[bot]chrysn
andauthored
Merge #236
236: PwmPin: allow get_duty to return the old value for some time r=therealprof a=eldruin This is #140 rebased to master. However, I suppose the same thing applies to the `Pwm::try_get_duty()` method. Shouldn't the same note be added to that method as well? Closes #140 Co-authored-by: chrysn <[email protected]>
2 parents 83f5bea + d26ccb9 commit 5b898bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/pwm.rs

+3
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ pub trait PwmPin {
114114
fn try_enable(&mut self) -> Result<(), Self::Error>;
115115

116116
/// Returns the current duty cycle
117+
///
118+
/// While the pin is transitioning to the new duty cycle after a `try_set_duty` call, this may
119+
/// return the old or the new duty cycle depending on the implementation.
117120
fn try_get_duty(&self) -> Result<Self::Duty, Self::Error>;
118121

119122
/// Returns the maximum duty cycle value

0 commit comments

Comments
 (0)