mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
runtime: add support for targets without SPI flash
This commit is contained in:
parent
1dab7df846
commit
ac83bfbd8e
19
artiq/firmware/runtime/config_dummy.rs
Normal file
19
artiq/firmware/runtime/config_dummy.rs
Normal 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(())
|
||||
}
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user