Trait embedded_storage::nor_flash::ReadNorFlash[][src]

pub trait ReadNorFlash {
    type Error;

    const READ_SIZE: usize;

    fn try_read(
        &mut self,
        offset: u32,
        bytes: &mut [u8]
    ) -> Result<(), Self::Error>;
fn capacity(&self) -> usize; }
Expand description

Read only NOR flash trait.

Associated Types

type Error[src]

Expand description

An enumeration of storage errors

Associated Constants

const READ_SIZE: usize[src]

Expand description

The minumum number of bytes the storage peripheral can read

Required methods

fn try_read(&mut self, offset: u32, bytes: &mut [u8]) -> Result<(), Self::Error>[src]

Expand description

Read a slice of data from the storage peripheral, starting the read operation at the given address offset, and reading bytes.len() bytes.

This should throw an error in case bytes.len() will be larger than the peripheral end address.

fn capacity(&self) -> usize[src]

Expand description

The capacity of the peripheral in bytes.

Implementors