pub struct Mfrc522<SPI, NSS> { /* private fields */ }
Expand description
MFRC522 driver
Implementations
sourceimpl<E, NSS, SPI> Mfrc522<SPI, NSS> where
SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
NSS: OutputPin,
impl<E, NSS, SPI> Mfrc522<SPI, NSS> where
SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
NSS: OutputPin,
sourcepub fn new(spi: SPI, nss: NSS) -> Result<Self, E>
pub fn new(spi: SPI, nss: NSS) -> Result<Self, E>
Creates a new driver from a SPI driver and a NSS pin
sourcepub fn select(&mut self, atqa: &AtqA) -> Result<Uid, Error<E>>
pub fn select(&mut self, atqa: &AtqA) -> Result<Uid, Error<E>>
Selects a PICC in the READY state
sourcepub fn stop_crypto1(&mut self) -> Result<(), E>
pub fn stop_crypto1(&mut self) -> Result<(), E>
Switch off the MIFARE Crypto1 unit. Must be done after communication with an authenticated PICC
pub fn mf_authenticate(
&mut self,
uid: &Uid,
block: u8,
key: &MifareKey
) -> Result<(), Error<E>>
pub fn mf_read(&mut self, block: u8) -> Result<[u8; 16], Error<E>>
pub fn mf_write(&mut self, block: u8, data: [u8; 16]) -> Result<(), Error<E>>
pub fn new_card_present(&mut self) -> Result<AtqA, Error<E>>
Auto Trait Implementations
impl<SPI, NSS> RefUnwindSafe for Mfrc522<SPI, NSS> where
NSS: RefUnwindSafe,
SPI: RefUnwindSafe,
impl<SPI, NSS> Send for Mfrc522<SPI, NSS> where
NSS: Send,
SPI: Send,
impl<SPI, NSS> Sync for Mfrc522<SPI, NSS> where
NSS: Sync,
SPI: Sync,
impl<SPI, NSS> Unpin for Mfrc522<SPI, NSS> where
NSS: Unpin,
SPI: Unpin,
impl<SPI, NSS> UnwindSafe for Mfrc522<SPI, NSS> where
NSS: UnwindSafe,
SPI: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more