quadrature_encoder/
mode.rs1mod linear;
2mod rotary;
3
4use core::marker::PhantomData;
5use quadrature_decoder::Change;
6
7pub use self::{
8 linear::{Linear, LinearMovement},
9 rotary::{Rotary, RotaryMovement},
10};
11
12pub trait Movement: From<Change> + Eq {
13 fn flipped(self) -> Self;
15}
16
17pub trait OperationMode {
19 type Movement: Movement;
21}
22
23pub trait PollMode {}
26
27#[derive(Debug)]
29pub struct Blocking;
30
31#[derive(Debug)]
33pub struct Async(PhantomData<*const ()>);
34
35impl crate::PollMode for Blocking {}
36impl crate::PollMode for Async {}