Module capsules::app_flash_driver [] [src]

This allows multiple apps to write their own flash region.

All write requests from userland are checked to ensure that they are only trying to write their own flash space, and not the TBF header either.

This driver can handle non page aligned writes.

Userland apps should allocate buffers in flash when they are compiled to ensure that there is room to write to. This should be accomplished by declaring const buffers.

Usage

pub static mut APP_FLASH_BUFFER: [u8; 512] = [0; 512];
let app_flash = static_init!(
    capsules::app_flash_driver::AppFlash<'static>,
    capsules::app_flash_driver::AppFlash::new(nv_to_page,
        kernel::Grant::create(), &mut APP_FLASH_BUFFER));

Reexports

use core::cell::Cell;
use core::cmp;
use kernel::AppId;
use kernel::AppSlice;
use kernel::Callback;
use kernel::Driver;
use kernel::Grant;
use kernel::ReturnCode;
use kernel::Shared;
use kernel::common::take_cell::TakeCell;
use kernel::hil;

Structs

App
AppFlash