Struct capsules::app_flash_driver::AppFlash [] [src]

pub struct AppFlash<'a> {
    driver: &'a NonvolatileStorage,
    apps: Grant<App>,
    current_app: Cell<Option<AppId>>,
    buffer: TakeCell<'static, [u8]>,
}

Fields

Methods

impl<'a> AppFlash<'a>
[src]

[src]

[src]

Trait Implementations

impl<'a> NonvolatileStorageClient for AppFlash<'a>
[src]

[src]

read_done is called when the implementor is finished reading in to the buffer. The callback returns the buffer and the number of bytes that were actually read. Read more

[src]

write_done is called when the implementor is finished writing from the buffer. The callback returns the buffer and the number of bytes that were actually written. Read more

impl<'a> Driver for AppFlash<'a>
[src]

[src]

Setup buffer to write from.

allow_num

  • 0: Set write buffer. This entire buffer will be written to flash.

[src]

Setup callbacks.

subscribe_num

  • 0: Set a write_done callback.

[src]

App flash control.

command_num

  • 0: Driver check.
  • 1: Write the memory from the allow buffer to the address in flash.