runtime: allow #[cfg(not(has_ethmac))] builds.

This commit is contained in:
whitequark 2017-11-03 16:09:22 +00:00
parent 4835431ac3
commit dfb2fe0b80
1 changed files with 12 additions and 0 deletions

View File

@ -36,6 +36,7 @@ macro_rules! borrow_mut {
} }
mod config; mod config;
#[cfg(has_ethmac)]
mod ethmac; mod ethmac;
#[cfg(has_rtio_core)] #[cfg(has_rtio_core)]
mod rtio_mgt; mod rtio_mgt;
@ -84,6 +85,17 @@ fn startup() {
#[cfg(has_ad9154)] #[cfg(has_ad9154)]
board::ad9154::init().expect("cannot initialize AD9154"); board::ad9154::init().expect("cannot initialize AD9154");
#[cfg(has_ethmac)]
startup_ethernet();
#[cfg(not(has_ethmac))]
{
info!("done");
loop {}
}
}
#[cfg(has_ethmac)]
fn startup_ethernet() {
let hardware_addr; let hardware_addr;
match config::read_str("mac", |r| r?.parse()) { match config::read_str("mac", |r| r?.parse()) {
Err(()) => { Err(()) => {