Trait Read

Source
pub trait Read<Addr, SPI: SpiDevice<u8>> {
    // Required method
    fn read(&mut self, addr: Addr, buf: &mut [u8]) -> Result<(), Error<SPI>>;
}
Expand description

A trait for reading operations from a memory chip.

Required Methods§

Source

fn read(&mut self, addr: Addr, buf: &mut [u8]) -> Result<(), Error<SPI>>

Reads bytes from a memory chip.

§Parameters
  • addr: The address to start reading at.
  • buf: The buffer to read buf.len() bytes into.

Implementors§