pub trait WriteErase {
    type NativeType;
    fn status(&self) -> Result;
    fn erase_page(&mut self, page: FlashPage) -> Result;
    fn write_native(
        &mut self,
        address: usize,
        array: &[Self::NativeType]
    ) -> Result; fn write(&mut self, address: usize, data: &[u8]) -> Result; }

Associated Types

Native type of the flash for writing with the correct alignment and size

Can be u8, u16, u32, …, or any user defined type

Required methods

check flash status

Erase specified flash page.

The smallest possible write, depends on platform

Read a buffer of bytes to memory, this uses the native writes internally and if it’s not the same length and a set of native writes the write will be padded to fill a native write.

Implementors