remove qei trait

This commit is contained in:
xoviat
2021-04-02 13:52:31 -05:00
parent 388558263b
commit 6f0fb6cab1
5 changed files with 1 additions and 116 deletions

View File

@ -12,6 +12,5 @@ pub mod delay;
pub mod flash;
pub mod gpio;
pub mod i2c;
pub mod qei;
pub mod spi;
pub mod uart;

View File

@ -1,22 +0,0 @@
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;
/// Wait for a specified number of rotations, in ticks, either up or down.
///
/// Return Direction::Upcounting if the high bound is reached.
/// Return Direction::Downcounting if the low bound is reached.
///
/// Number of ticks is encoder dependent. As an example, if we connect
/// the Bourns PEC11H-4120F-S0020, we have 20 ticks per full rotation.
/// Other encoders may vary.
fn wait_for_rotate<'a>(
self: Pin<&'a mut Self>,
count_down: u16,
count_up: u16,
) -> Self::RotateFuture<'a>;
}