[][src]Struct infrared::hal::PeriodicReceiver

pub struct PeriodicReceiver<PROTOCOL, PIN> { /* fields omitted */ }

Periodic and polled Embedded hal Receiver

The poll methods should be called periodically for this receiver to work

Implementations

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

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

Create a new PeriodicReceiver pin : The gpio pin the hw is connected to samplerate : Rate of which you intend to call poll.

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

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

pub fn poll_button<RC: RemoteControl<Cmd = PROTOCOL::Cmd>>(
    &mut self
) -> Result<Option<Button>, PINERR>
[src]

Auto Trait Implementations

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

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

impl<PROTOCOL, PIN> Unpin for PeriodicReceiver<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.