Expand description
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
ⓘ
let app_flash_buffer = static_init!([u8; 512], [0; 512]);
let app_flash = static_init!(
capsules::app_flash_driver::AppFlash<'static>,
capsules::app_flash_driver::AppFlash::new(nv_to_page,
board_kernel.create_grant(&grant_cap), app_flash_buffer));