[−][src]Struct embedded_nrf24l01::NRF24L01
Driver for the nRF24L01+
Never deal with this directly. Instead, you store one of the following types:
where D:
Device
Implementations
impl<E: Debug, CE: OutputPin<Error = E>, CSN: OutputPin<Error = E>, SPI: SpiTransfer<u8, Error = SPIE>, SPIE: Debug> NRF24L01<E, 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]
Reads and validates content of the SETUP_AW
register.
Trait Implementations
impl<E: Debug, CE: OutputPin<Error = E>, CSN: OutputPin<Error = E>, SPI: SpiTransfer<u8, Error = SPIE>, SPIE: Debug> Debug for NRF24L01<E, CE, CSN, SPI>
[src]
impl<E: Debug, CE: OutputPin<Error = E>, CSN: OutputPin<Error = E>, SPI: SpiTransfer<u8, Error = SPIE>, SPIE: Debug> Device for NRF24L01<E, CE, CSN, SPI>
[src]
type Error = Error<SPIE>
Error from the SPI implementation
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,
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,
Auto Trait Implementations
impl<E, CE, CSN, SPI> Send for NRF24L01<E, CE, CSN, SPI> where
CE: Send,
CSN: Send,
SPI: Send,
CE: Send,
CSN: Send,
SPI: Send,
impl<E, CE, CSN, SPI> Sync for NRF24L01<E, CE, CSN, SPI> where
CE: Sync,
CSN: Sync,
SPI: Sync,
CE: Sync,
CSN: Sync,
SPI: Sync,
impl<E, CE, CSN, SPI> Unpin for NRF24L01<E, CE, CSN, SPI> where
CE: Unpin,
CSN: Unpin,
SPI: Unpin,
CE: Unpin,
CSN: Unpin,
SPI: 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>,