Robin Mueller d6f69d4a54
Some checks are pending
Rust/va108xx-rs/pipeline/pr-main Build queued...
Finished flashloader and bootloader implementation
2024-09-30 11:41:52 +02:00

11 lines
414 B
Rust

#![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: usize, data: &[u8]) -> Result<(), Infallible>;
fn read(&mut self, address: usize, buf: &mut [u8]) -> Result<(), Infallible>;
fn verify(&mut self, address: usize, data: &[u8]) -> Result<bool, Infallible>;
}