[−][src]Trait spi_flash::FlashAccess
Trait for objects which provide access to SPI flash.
Providers only need to implement exchange()
, which asserts CS, writes all the bytes
in data
, then returns all the received bytes. If it provides a performance optimisation,
providers may also implement write()
, which does not require the received data.
Required methods
pub fn exchange(&mut self, data: &[u8]) -> Result<Vec<u8>>
[src]
Assert CS, write all bytes in data
while capturing received data, then de-assert CS.
Returns the received data.
Provided methods
pub fn write(&mut self, data: &[u8]) -> Result<()>
[src]
Assert CS, write all bytes in data
to the SPI bus, then de-assert CS.