Struct capsules::nonvolatile_to_pages::NonvolatileToPages [] [src]

pub struct NonvolatileToPages<'a, F: Flash + 'static> {
    driver: &'a F,
    client: Cell<Option<&'static NonvolatileStorageClient>>,
    pagebuffer: TakeCell<'static, F::Page>,
    state: Cell<State>,
    buffer: TakeCell<'static, [u8]>,
    address: Cell<usize>,
    length: Cell<usize>,
    remaining_length: Cell<usize>,
    buffer_index: Cell<usize>,
}

Fields

The module providing a Flash interface.

Callback to the user of this capsule.

Buffer correctly sized for the underlying flash page size.

Current state of this capsule.

Temporary holding place for the user's buffer.

Absolute address of where we are reading or writing. This gets updated as the operation proceeds across pages.

Total length to read or write. We need to store this to return it to the client.

How many bytes are left to read or write.

Where we are in the user buffer.

Methods

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

[src]

Trait Implementations

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

[src]

[src]

Read length bytes starting at address address in to the provided buffer. The buffer must be at least length bytes long. The address must be in the address space of the physical storage. Read more

[src]

Write length bytes starting at address address from the provided buffer. The buffer must be at least length bytes long. This address must be in the address space of the physical storage. Read more

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

[src]

Flash read complete.

[src]

Flash write complete.

[src]

Flash erase complete.