Struct capsules::virtual_flash::MuxFlash
[−]
[src]
pub struct MuxFlash<'a, F: Flash + 'static> { flash: &'a F, users: List<'a, FlashUser<'a, F>>, inflight: Cell<Option<&'a FlashUser<'a, F>>>, }
Handle keeping a list of active users of flash hardware and serialize their requests. After each completed request the list is checked to see if there is another flash user with an outstanding read, write, or erase request.
Fields
flash: &'a F
users: List<'a, FlashUser<'a, F>>
inflight: Cell<Option<&'a FlashUser<'a, F>>>
Methods
impl<'a, F: Flash + 'a> MuxFlash<'a, F>
[src]
pub const fn new(flash: &'a F) -> MuxFlash<'a, F>
[src]
fn do_next_op(&self)
[src]
Scan the list of users and find the first user that has a pending request, then issue that request to the flash hardware.
Trait Implementations
impl<'a, F: Flash + 'a> Client<F> for MuxFlash<'a, F>
[src]
fn read_complete(&self, pagebuffer: &'static mut F::Page, error: Error)
[src]
Flash read complete.
fn write_complete(&self, pagebuffer: &'static mut F::Page, error: Error)
[src]
Flash write complete.
fn erase_complete(&self, error: Error)
[src]
Flash erase complete.