flash_store_refactor #49

Merged
sb10q merged 4 commits from flash_store_refactor into master 2021-01-13 17:30:12 +08:00
Showing only changes of commit 0200aa69bd - Show all commits

View File

@ -11,6 +11,7 @@ pub const FLASH_SECTOR: u8 = 12;
static mut BACKUP_SPACE: [u8; FLASH_SECTOR_SIZE] = [0; FLASH_SECTOR_SIZE]; static mut BACKUP_SPACE: [u8; FLASH_SECTOR_SIZE] = [0; FLASH_SECTOR_SIZE];
extern "C" { extern "C" {
// These are from memory.x
static _config_start: usize; static _config_start: usize;
static _flash_start: usize; static _flash_start: usize;
} }
@ -24,7 +25,7 @@ unsafe fn get_offset() -> usize {
} }
impl StoreBackend for FlashBackend { impl StoreBackend for FlashBackend {
type Data = [u8]; type Data = [u8];
fn data(&self) -> &Self::Data { fn data(&self) -> &Self::Data {
unsafe { unsafe {