Struct capsules::virtual_flash::FlashUser [] [src]

pub struct FlashUser<'a, F: Flash + 'static> {
    mux: &'a MuxFlash<'a, F>,
    buffer: TakeCell<'static, F::Page>,
    operation: Cell<Op>,
    next: ListLink<'a, FlashUser<'a, F>>,
    client: Cell<Option<&'a Client<FlashUser<'a, F>>>>,
}

Keep state for each flash user. All uses of the virtualized flash interface need to create one of these to be a user of the flash. The new() function handles most of the work, a user only has to pass in a reference to the MuxFlash object.

Fields

Methods

impl<'a, F: Flash + 'a> FlashUser<'a, F>
[src]

[src]

Trait Implementations

impl<'a, F: Flash + 'a, C: Client<Self>> HasClient<'a, C> for FlashUser<'a, F>
[src]

[src]

Set the client for this flash peripheral. The client will be called when operations complete. Read more

impl<'a, F: Flash + 'a> Client<F> for FlashUser<'a, F>
[src]

[src]

Flash read complete.

[src]

Flash write complete.

[src]

Flash erase complete.

impl<'a, F: Flash + 'a> ListNode<'a, FlashUser<'a, F>> for FlashUser<'a, F>
[src]

[src]

impl<'a, F: Flash + 'a> Flash for FlashUser<'a, F>
[src]

Type of a single flash page for the given implementation.

[src]

Read a page of flash into the buffer.

[src]

Write a page of flash from the buffer.

[src]

Erase a page of flash.