[−][src]Struct esb::EsbApp
This is the primary Application-side interface.
It is intended to be used outside of the RADIO
interrupt,
and allows for sending or receiving frames from the ESB Radio
hardware.
Methods
impl<OutgoingLen, IncomingLen> EsbApp<OutgoingLen, IncomingLen> where
OutgoingLen: ArrayLength<u8>,
IncomingLen: ArrayLength<u8>,
[src]
OutgoingLen: ArrayLength<u8>,
IncomingLen: ArrayLength<u8>,
pub fn grant_packet(
&mut self,
payload_length: u8,
pid: u8,
pipe: u8,
no_ack: bool
) -> Result<PayloadW<OutgoingLen>, Error>
[src]
&mut self,
payload_length: u8,
pid: u8,
pipe: u8,
no_ack: bool
) -> Result<PayloadW<OutgoingLen>, Error>
Obtain a grant for an outgoing packet to be sent over the Radio
When space is available, this function will return a [PayloadW
],
which can be written into for data to be sent over the radio. If
the given parameters are incorrect, or if no space is available,
an error will be returned.
Notes on valid values:
payload_length
must be between 0 and 252 bytes, inclusive.pid
must be between 0 and 3, inclusive.pipe
must be between 0 and 7, inclusive.
pub fn start_tx(&mut self)
[src]
Starts the radio sending all packets in the queue.
The radio will send until the queue has been drained.
pub fn msg_ready(&mut self) -> bool
[src]
Is there a received message that is ready to be read?
Returns true
if a call to read_packet
would return Some
.
pub fn read_packet(&mut self) -> Option<PayloadR<IncomingLen>>
[src]
Attempt to read a packet that has been received via the radio
Returns Some(PayloadR)
if a packet is ready to be read,
otherwise None
.
Auto Trait Implementations
impl<OutgoingLen, IncomingLen> Send for EsbApp<OutgoingLen, IncomingLen>
impl<OutgoingLen, IncomingLen> !Sync for EsbApp<OutgoingLen, IncomingLen>
impl<OutgoingLen, IncomingLen> Unpin for EsbApp<OutgoingLen, IncomingLen>
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,
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> Same<T> for T
type Output = T
Should always be Self
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.
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>,