Struct embedded_nrf24l01::NRF24L01
[−]
[src]
pub struct NRF24L01<CE: OutputPin, CSN: OutputPin, SPI: SpiTransfer<u8>> { /* fields omitted */ }
Driver for the nRF24L01+
Methods
impl<CE: OutputPin, CSN: OutputPin, SPI: SpiTransfer<u8, Error = SPIE>, SPIE: Debug> NRF24L01<CE, CSN, SPI>
[src]
pub fn new(ce: CE, csn: CSN, spi: SPI) -> Result<StandbyMode<Self>, Error<SPIE>>
[src]
Construct a new driver instance.
pub fn is_connected(&mut self) -> Result<bool, Error<SPIE>>
[src]
Trait Implementations
impl<CE: OutputPin, CSN: OutputPin, SPI: SpiTransfer<u8, Error = SPIE>, SPIE: Debug> Debug for NRF24L01<CE, CSN, SPI>
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<CE: OutputPin, CSN: OutputPin, SPI: SpiTransfer<u8, Error = SPIE>, SPIE: Debug> Device for NRF24L01<CE, CSN, SPI>
[src]
type Error = Error<SPIE>
fn ce_enable(&mut self)
[src]
fn ce_disable(&mut self)
[src]
fn send_command<C: Command>(
&mut self,
command: &C
) -> Result<(Status, C::Response), Self::Error>
[src]
&mut self,
command: &C
) -> Result<(Status, C::Response), Self::Error>
fn write_register<R: Register>(
&mut self,
register: R
) -> Result<Status, Self::Error>
[src]
&mut self,
register: R
) -> Result<Status, Self::Error>
fn read_register<R: Register>(&mut self) -> Result<(Status, R), Self::Error>
[src]
fn update_config<F, R>(&mut self, f: F) -> Result<R, Self::Error> where
F: FnOnce(&mut Config) -> R,
[src]
F: FnOnce(&mut Config) -> R,
fn with_ce_disabled<F, R>(&mut self, f: F) -> R where
F: FnOnce(&mut Self) -> R,
[src]
F: FnOnce(&mut Self) -> R,
Helper; the receiving during RX and sending during TX require CE
to be low. Read more
fn update_register<Reg, F, R>(&mut self, f: F) -> Result<R, Self::Error> where
Reg: Register + PartialEq + Clone,
F: FnOnce(&mut Reg) -> R,
[src]
Reg: Register + PartialEq + Clone,
F: FnOnce(&mut Reg) -> R,