[−][src]Struct esb::app::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.
Implementations
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,
header: EsbHeader
) -> Result<PayloadW<OutgoingLen>, Error>
[src]
&mut self,
header: EsbHeader
) -> 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,
or if a grant is already in progress, an error will be returned.
Notes
Once a grant has been created, the maximum size of the grant can not
be increased, only shrunk. If a larger grant is needed, you must
drop
the old grant, and create a new one.
Only one grant may be active at a time.
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. This method must be called again if the queue is completely drained before the user commits new packets.
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
.
pub fn maximum_payload_size(&self) -> usize
[src]
Gets the maximum payload size (in bytes) that the driver was configured to use.
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>,