[−][src]Struct infrared::hal::PeriodicReceiver
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]
PROTOCOL: ReceiverSM,
PIN: InputPin<Error = PINERR>,
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]
&mut self
) -> Result<Option<Button>, PINERR>
Auto Trait Implementations
impl<PROTOCOL, PIN> Send for PeriodicReceiver<PROTOCOL, PIN> where
PIN: Send,
PROTOCOL: Send,
[src]
PIN: Send,
PROTOCOL: Send,
impl<PROTOCOL, PIN> Sync for PeriodicReceiver<PROTOCOL, PIN> where
PIN: Sync,
PROTOCOL: Sync,
[src]
PIN: Sync,
PROTOCOL: Sync,
impl<PROTOCOL, PIN> Unpin for PeriodicReceiver<PROTOCOL, PIN> where
PIN: Unpin,
PROTOCOL: Unpin,
[src]
PIN: Unpin,
PROTOCOL: 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>,