Struct embedded_nrf24l01::StandbyMode
[−]
[src]
pub struct StandbyMode<D: Device> { /* fields omitted */ }
Represents Standby-I mode
This represents the state the device is in inbetween TX or RX mode.
Methods
impl<D: Device> StandbyMode<D>
[src]
pub fn power_up(device: D) -> Result<Self, (D, D::Error)>
[src]
Constructor
Puts the device
into standy mode
pub fn rx(self) -> Result<RxMode<D>, (D, D::Error)>
[src]
Go into RX mode
pub fn tx(self) -> Result<TxMode<D>, (D, D::Error)>
[src]
Go into TX mode
Trait Implementations
impl<D: Device> Debug for StandbyMode<D>
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<D: Device> Configuration for StandbyMode<D>
[src]
type Inner = D
Underlying trait Device
fn device(&mut self) -> &mut Self::Inner
[src]
Get a mutable reference to the underlying device
fn flush_rx(&mut self) -> Result<(), <Self::Inner as Device>::Error>
[src]
Flush RX queue Read more
fn flush_tx(&mut self) -> Result<(), <Self::Inner as Device>::Error>
[src]
Flush TX queue, discarding any unsent packets
fn get_channel(&mut self) -> Result<u8, <Self::Inner as Device>::Error>
[src]
Get the channel number, as offset in MHz to 2.4 GHz
fn set_channel(
&mut self,
freq_offset: u8
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
freq_offset: u8
) -> Result<(), <Self::Inner as Device>::Error>
Set the channel number, as offset in MHz to 2.4 GHz
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>
power: 0
: -18 dBm, 3
: 0 dBm
fn set_crc(
&mut self,
mode: &CrcMode
) -> Result<(), <Self::Inner as Device>::Error>
[src]
&mut self,
mode: &CrcMode
) -> Result<(), <Self::Inner as Device>::Error>
Set CRC mode
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>
Configure which RX pipes to enable
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>
Set address addr
of pipe number pipe_no
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>
Set address of the TX pipe
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>
Configure auto-retransmit Read more
fn get_auto_ack(&mut self) -> Result<[bool; 6], <Self::Inner as Device>::Error>
[src]
Obtain auto-acknowledgment configuration for all pipes
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>
Configure auto-acknowledgment for all RX pipes Read more
fn get_address_width(&mut self) -> Result<u8, <Self::Inner as Device>::Error>
[src]
Get address width configuration
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>
Obtain interrupt pending status as (RX_DR, TX_DR, MAX_RT)
where RX_DR
indicates new data in the RX FIFO, TX_DR
indicates that a packet has been sent, and MAX_RT
indicates maximum retransmissions without auto-ack. Read more
fn clear_interrupts(&mut self) -> Result<(), <Self::Inner as Device>::Error>
[src]
Clear all interrupts
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>
bools
* None
: Dynamic payload length * Some(len)
: Static payload length len
Read more
Auto Trait Implementations
impl<D> Send for StandbyMode<D> where
D: Send,
D: Send,
impl<D> Sync for StandbyMode<D> where
D: Sync,
D: Sync,