- Add embassy example - improve timer API - restructure examples - restructure and improve SPI - Add REB1 M95M01 NVM module
This commit is contained in:
10
bootloader/src/lib.rs
Normal file
10
bootloader/src/lib.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
#![no_std]
|
||||
|
||||
use core::convert::Infallible;
|
||||
|
||||
/// Simple trait which makes swapping the NVM easier. NVMs only need to implement this interface.
|
||||
pub trait NvmInterface {
|
||||
fn write(&mut self, address: u32, data: &[u8]) -> Result<(), Infallible>;
|
||||
fn read(&mut self, address: u32, buf: &mut [u8]) -> Result<(), Infallible>;
|
||||
fn verify(&mut self, address: u32, data: &[u8]) -> Result<bool, Infallible>;
|
||||
}
|
||||
Reference in New Issue
Block a user