embassy/embassy-traits/src/qei.rs

15 lines
369 B
Rust
Raw Normal View History

2021-03-11 23:25:38 +01:00
use core::future::Future;
use core::pin::Pin;
use embedded_hal::Direction;
// Wait for a specified number of rotations either up or down
pub trait WaitForRotate {
type RotateFuture<'a>: Future<Output = Direction> + 'a;
fn wait_for_rotate<'a>(
self: Pin<&'a mut Self>,
count_down: u16,
count_up: u16,
) -> Self::RotateFuture<'a>;
}