Trait kernel::hil::flash::Flash
[−]
[src]
pub trait Flash { type Page: AsMut<[u8]>; fn read_page(
&self,
page_number: usize,
buf: &'static mut Self::Page
) -> ReturnCode; fn write_page(
&self,
page_number: usize,
buf: &'static mut Self::Page
) -> ReturnCode; fn erase_page(&self, page_number: usize) -> ReturnCode; }
A page of writable persistent flash memory.
Associated Types
Required Methods
fn read_page(
&self,
page_number: usize,
buf: &'static mut Self::Page
) -> ReturnCode
&self,
page_number: usize,
buf: &'static mut Self::Page
) -> ReturnCode
Read a page of flash into the buffer.
fn write_page(
&self,
page_number: usize,
buf: &'static mut Self::Page
) -> ReturnCode
&self,
page_number: usize,
buf: &'static mut Self::Page
) -> ReturnCode
Write a page of flash from the buffer.
fn erase_page(&self, page_number: usize) -> ReturnCode
Erase a page of flash.