forked from M-Labs/artiq
1
0
Fork 0

runtime: add support for targets without SPI flash

This commit is contained in:
Sebastien Bourdeauducq 2017-08-20 11:28:57 -04:00
parent 1dab7df846
commit ac83bfbd8e
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,19 @@
pub fn read<F: FnOnce(Result<&[u8], ()>) -> R, R>(_key: &str, f: F) -> R {
f(Err(()))
}
pub fn read_str<F: FnOnce(Result<&str, ()>) -> R, R>(_key: &str, f: F) -> R {
f(Err(()))
}
pub fn write(_key: &str, _value: &[u8]) -> Result<(), ()> {
Err(())
}
pub fn remove(_key: &str) -> Result<(), ()> {
Err(())
}
pub fn erase() -> Result<(), ()> {
Err(())
}

View File

@ -36,7 +36,10 @@ macro_rules! borrow_mut {
})
}
#[cfg(has_spiflash)]
mod config;
#[cfg(not(has_spiflash))]
#[path="config_dummy.rs"] mod config;
mod ethmac;
mod rtio_mgt;