We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4e776c commit 16bd944Copy full SHA for 16bd944
src/lib.rs
@@ -974,14 +974,17 @@ pub trait PwmPin {
974
// reason: needs to be re-evaluated in the new singletons world. At the very least this needs a
975
// reference implementation
976
pub trait Qei {
977
+ /// Enumeration of `Qei` errors
978
+ type Error;
979
+
980
/// The type of the value returned by `count`
981
type Count;
982
983
/// Returns the current pulse count of the encoder
- fn count(&self) -> Self::Count;
984
+ fn count(&self) -> Result<Self::Count, Self::Error>;
985
986
/// Returns the count direction
- fn direction(&self) -> Direction;
987
+ fn direction(&self) -> Result<Direction, Self::Error>;
988
}
989
990
/// Count direction
0 commit comments