rtio_clocking: additional warnings, fixes

pull/152/head
mwojcik 2021-10-28 16:44:39 +08:00
parent 7ecee2b3ee
commit 8bc0266bbe
1 changed files with 6 additions and 2 deletions

View File

@ -55,9 +55,13 @@ fn init_rtio(timer: &mut GlobalTimer, _clk: RtioClock) {
info!("Using bypassed external clock"); info!("Using bypassed external clock");
1 1
}, },
x => { RtioClock::Int_125 => {
info!("Using internal RTIO clock"); info!("Using internal RTIO clock");
0 0
},
_ => {
warn!("rtio_clock setting '{:?}' is not supported. Using default internal RTIO clock instead", _clk);
0
} }
}; };
@ -113,7 +117,7 @@ fn setup_si5324(i2c: &mut I2c, timer: &mut GlobalTimer, clk: RtioClock) {
} }
} }
_ => { // same setting as Int_125, but fallback to default _ => { // same setting as Int_125, but fallback to default
warn!("rtio_clock setting '{:x}' is unsupported. Falling back to default internal 125MHz RTIO clock."); warn!("rtio_clock setting '{:?}' is unsupported. Falling back to default internal 125MHz RTIO clock.", clk);
si5324::FrequencySettings { si5324::FrequencySettings {
n1_hs : 10, n1_hs : 10,
nc1_ls : 4, nc1_ls : 4,