Trait pn532::Interface[][src]

pub trait Interface {
    type Error: Debug;
    fn write(&mut self, frame: &[u8]) -> Result<(), Self::Error>;
fn wait_ready(&mut self) -> Poll<Result<(), Self::Error>>;
fn read(&mut self, buf: &mut [u8]) -> Result<(), Self::Error>; }
Expand description

Abstraction over the different serial links. Either SPI, I2C or HSU (High Speed UART).

Associated Types

Error specific to the serial link.

Required methods

Writes a frame to the Pn532

Checks if the Pn532 has data to be read. Uses either the serial link or the IRQ pin.

Reads data from the Pn532 into buf. This method will only be called if wait_ready returned Poll::Ready(Ok(())) before.

Implementations on Foreign Types

Implementors