[−][src]Struct embedded_nrf24l01::TxMode
Represents TX Mode and the associated TX Settling and Standby-II states
Timing
The datasheet states the follwing:
It is important to never keep the nRF24L01 in TX mode for more than 4ms at a time.
No effects have been observed when exceeding this limit. The warranty could get void.
Implementations
impl<D: Device> TxMode<D>
[src]
pub fn standby(self) -> Result<StandbyMode<D>, D::Error>
[src]
Disable CE
so that you can switch into RX mode.
pub fn is_empty(&mut self) -> Result<bool, D::Error>
[src]
Is TX FIFO empty?
pub fn is_full(&mut self) -> Result<bool, D::Error>
[src]
Is TX FIFO full?
pub fn can_send(&mut self) -> Result<bool, D::Error>
[src]
Does the TX FIFO have space?
pub fn send(&mut self, packet: &[u8]) -> Result<(), D::Error>
[src]
Send asynchronously
pub fn poll_send(&mut self) -> Result<bool, D::Error>
[src]
Poll completion of one or multiple send operations and check whether transmission was successful.
This function behaves like wait_empty()
, except that it returns whether sending was
successful and that it provides an asynchronous interface.
pub fn wait_empty(&mut self) -> Result<(), D::Error>
[src]
Wait until TX FIFO is empty
If any packet cannot be delivered and the maximum amount of retries is reached, the TX FIFO is flushed and all other packets in the FIFO are lost.
pub fn observe(&mut self) -> Result<ObserveTx, D::Error>
[src]
Read the OBSERVE_TX
register
Trait Implementations
impl<D: Device> Configuration for TxMode<D>
[src]
type Inner = D
Underlying trait Device
fn device(&mut self) -> &mut Self::Inner
[src]
fn flush_rx(&mut self) -> Result<(), <Self::Inner as Device>::Error>
[src]
fn flush_tx(&mut self) -> Result<(), <Self::Inner as Device>::Error>
[src]
fn get_frequency(&mut self) -> Result<u8, <Self::Inner as Device>::Error>
[src]
fn set_frequency(
&mut self,
freq_offset: u8
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
freq_offset: u8
) -> Result<(), <Self::Inner as Device>::Error>
fn set_rf(
&mut self,
rate: &DataRate,
power: u8
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
rate: &DataRate,
power: u8
) -> Result<(), <Self::Inner as Device>::Error>
fn set_crc(
&mut self,
mode: CrcMode
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
mode: CrcMode
) -> Result<(), <Self::Inner as Device>::Error>
fn set_interrupt_mask(
&mut self,
data_ready_rx: bool,
data_sent_tx: bool,
max_retransmits_tx: bool
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
data_ready_rx: bool,
data_sent_tx: bool,
max_retransmits_tx: bool
) -> Result<(), <Self::Inner as Device>::Error>
fn set_pipes_rx_enable(
&mut self,
bools: &[bool; 6]
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
bools: &[bool; 6]
) -> Result<(), <Self::Inner as Device>::Error>
fn set_rx_addr(
&mut self,
pipe_no: usize,
addr: &[u8]
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
pipe_no: usize,
addr: &[u8]
) -> Result<(), <Self::Inner as Device>::Error>
fn set_tx_addr(
&mut self,
addr: &[u8]
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
addr: &[u8]
) -> Result<(), <Self::Inner as Device>::Error>
fn set_auto_retransmit(
&mut self,
delay: u8,
count: u8
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
delay: u8,
count: u8
) -> Result<(), <Self::Inner as Device>::Error>
fn get_auto_ack(&mut self) -> Result<[bool; 6], <Self::Inner as Device>::Error>
[src]
fn set_auto_ack(
&mut self,
bools: &[bool; 6]
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
bools: &[bool; 6]
) -> Result<(), <Self::Inner as Device>::Error>
fn get_address_width(&mut self) -> Result<u8, <Self::Inner as Device>::Error>
[src]
fn get_interrupts(
&mut self
) -> Result<(bool, bool, bool), <Self::Inner as Device>::Error>
[src]
&mut self
) -> Result<(bool, bool, bool), <Self::Inner as Device>::Error>
fn clear_interrupts(&mut self) -> Result<(), <Self::Inner as Device>::Error>
[src]
fn set_pipes_rx_lengths(
&mut self,
lengths: &[Option<u8>; 6]
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
lengths: &[Option<u8>; 6]
) -> Result<(), <Self::Inner as Device>::Error>
impl<D: Device> Debug for TxMode<D>
[src]
Auto Trait Implementations
impl<D> Send for TxMode<D> where
D: Send,
D: Send,
impl<D> Sync for TxMode<D> where
D: Sync,
D: Sync,
impl<D> Unpin for TxMode<D> where
D: Unpin,
D: 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,
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.
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>,