Struct ace128_driver::Ace128 [−][src]
pub struct Ace128<GpioPin> { /* fields omitted */ }
Holds the GPIO pins in use by the encoder.
Implementations
impl<GpioPin: InputPin> Ace128<GpioPin>
[src]
pub fn new(
p1: GpioPin,
p2: GpioPin,
p3: GpioPin,
p4: GpioPin,
p5: GpioPin,
p6: GpioPin,
p7: GpioPin,
p8: GpioPin
) -> Self
[src]
p1: GpioPin,
p2: GpioPin,
p3: GpioPin,
p4: GpioPin,
p5: GpioPin,
p6: GpioPin,
p7: GpioPin,
p8: GpioPin
) -> Self
Creates a new instance of the encoder driver attached to the eight supplied GpioPin pins.
pub fn read_angle(&self) -> Result<f64, <GpioPin as InputPin>::Error>
[src]
Read the absolute position of the encoder in radians.
pub fn read(&self) -> Result<Option<u8>, <GpioPin as InputPin>::Error>
[src]
Read the output of the encoder from 0 to 127.
Auto Trait Implementations
impl<GpioPin> Send for Ace128<GpioPin> where
GpioPin: Send,
GpioPin: Send,
impl<GpioPin> Sync for Ace128<GpioPin> where
GpioPin: Sync,
GpioPin: Sync,
impl<GpioPin> Unpin for Ace128<GpioPin> where
GpioPin: Unpin,
GpioPin: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,