[][src]Struct infrared::hal::EventReceiver

pub struct EventReceiver<PROTOCOL, PIN> {
    pub pin: PIN,
    // some fields omitted
}

Event driven Hal receiver

Fields

pin: PIN

Implementations

impl<PIN, PINERR, PROTOCOL> EventReceiver<PROTOCOL, PIN> where
    PROTOCOL: ReceiverSM,
    PIN: InputPin<Error = PINERR>, 
[src]

pub fn new(pin: PIN, samplerate: u32) -> Self[src]

Create a new EventReceiver pin: The Inputpin connected to the receiver, samplerate: Sample rate of the receiver

pub fn destroy(self) -> PIN[src]

Destroy Receiver and hand back pin

pub fn edge_event(&mut self, dt: u32) -> Result<Option<PROTOCOL::Cmd>, PINERR>[src]

Tell the receiver to read the new pin value and update the receiver state machine

Returns Ok(None) until a command is detected

Auto Trait Implementations

impl<PROTOCOL, PIN> Send for EventReceiver<PROTOCOL, PIN> where
    PIN: Send,
    PROTOCOL: Send
[src]

impl<PROTOCOL, PIN> Sync for EventReceiver<PROTOCOL, PIN> where
    PIN: Sync,
    PROTOCOL: Sync
[src]

impl<PROTOCOL, PIN> Unpin for EventReceiver<PROTOCOL, PIN> where
    PIN: Unpin,
    PROTOCOL: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.