forked from M-Labs/artiq
runtime: no startup_clock config is not an error
This commit is contained in:
parent
71db953ea0
commit
5809e08686
|
@ -219,16 +219,25 @@ pub fn startup(io: &Io) {
|
||||||
|
|
||||||
let clk = config::read("startup_clock", |result| {
|
let clk = config::read("startup_clock", |result| {
|
||||||
match result {
|
match result {
|
||||||
Ok(b"i") => RtioClock::Internal,
|
Ok(b"i") => {
|
||||||
Ok(b"e") => RtioClock::External,
|
info!("using internal startup RTIO clock");
|
||||||
_ => {
|
RtioClock::Internal
|
||||||
error!("unrecognized startup_clock configuration entry");
|
},
|
||||||
|
Ok(b"e") => {
|
||||||
|
info!("using external startup RTIO clock");
|
||||||
|
RtioClock::External
|
||||||
|
},
|
||||||
|
Err(()) => {
|
||||||
|
info!("using internal startup RTIO clock (by default)");
|
||||||
|
RtioClock::Internal
|
||||||
|
},
|
||||||
|
Ok(_) => {
|
||||||
|
error!("unrecognized startup_clock configuration entry, using internal RTIO clock");
|
||||||
RtioClock::Internal
|
RtioClock::Internal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
info!("startup RTIO clock: {:?}", clk);
|
|
||||||
if !crg::switch_clock(clk as u8) {
|
if !crg::switch_clock(clk as u8) {
|
||||||
error!("startup RTIO clock failed");
|
error!("startup RTIO clock failed");
|
||||||
warn!("this may cause the system initialization to fail");
|
warn!("this may cause the system initialization to fail");
|
||||||
|
|
Loading…
Reference in New Issue