Skip to content

Commit d81cf7c

Browse files
bors[bot]eldruin
andauthored
Merge #238
238: Pwm: allow get_duty to return the old value for some time r=therealprof a=eldruin This is #140 applied to the `Pwm` trait as well, since the same concerns apply. Follows up on #236. Co-authored-by: Diego Barrios Romero <[email protected]>
2 parents 5b898bb + 0b05478 commit d81cf7c

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
@@ -79,6 +79,9 @@ pub trait Pwm {
7979
fn try_get_period(&self) -> Result<Self::Time, Self::Error>;
8080

8181
/// Returns the current duty cycle
82+
///
83+
/// While the pin is transitioning to the new duty cycle after a `try_set_duty` call, this may
84+
/// return the old or the new duty cycle depending on the implementation.
8285
fn try_get_duty(&self, channel: Self::Channel) -> Result<Self::Duty, Self::Error>;
8386

8487
/// Returns the maximum duty cycle value

0 commit comments

Comments
 (0)