aboutsummaryrefslogtreecommitdiff
path: root/embassy-traits/src
diff options
context:
space:
mode:
authorxoviat <[email protected]>2021-03-14 17:41:59 -0500
committerxoviat <[email protected]>2021-03-14 17:41:59 -0500
commita4bee1c1d2c8b252142bed7be8c16f9d77f3d1ff (patch)
tree99c0cf4b7711719bc3665d0217ef854cc1fc183b /embassy-traits/src
parent6cebd27cc127cdef04f14ad0ff2982714e456b8b (diff)
update docs
Diffstat (limited to 'embassy-traits/src')
-rw-r--r--embassy-traits/src/qei.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/embassy-traits/src/qei.rs b/embassy-traits/src/qei.rs
index 7e0a8961f..73581256d 100644
--- a/embassy-traits/src/qei.rs
+++ b/embassy-traits/src/qei.rs
@@ -6,6 +6,14 @@ use embedded_hal::Direction;
6pub trait WaitForRotate { 6pub trait WaitForRotate {
7 type RotateFuture<'a>: Future<Output = Direction> + 'a; 7 type RotateFuture<'a>: Future<Output = Direction> + 'a;
8 8
9 /// Wait for a specified number of rotations, in ticks, either up or down.
10 ///
11 /// Return Direction::Upcounting if the high bound is reached.
12 /// Return Direction::Downcounting if the low bound is reached.
13 ///
14 /// Number of ticks is encoder dependent. As an example, if we connect
15 /// the Bourns PEC11H-4120F-S0020, we have 20 ticks per full rotation.
16 /// Other encoders may vary.
9 fn wait_for_rotate<'a>( 17 fn wait_for_rotate<'a>(
10 self: Pin<&'a mut Self>, 18 self: Pin<&'a mut Self>,
11 count_down: u16, 19 count_down: u16,