Fix oversampling message for usart v1
This commit is contained in:
parent
387a4fcb8e
commit
c5bf36eebf
@ -878,9 +878,13 @@ fn configure(r: Regs, config: &Config, pclk_freq: Hertz, kind: Kind, enable_rx:
|
|||||||
assert!(found, "USART: baudrate too low");
|
assert!(found, "USART: baudrate too low");
|
||||||
|
|
||||||
let brr = unsafe { r.brr().read().brr() as u32 };
|
let brr = unsafe { r.brr().read().brr() as u32 };
|
||||||
|
#[cfg(not(usart_v1))]
|
||||||
|
let oversampling = if over8 { "8 bit" } else { "16 bit" };
|
||||||
|
#[cfg(usart_v1)]
|
||||||
|
let oversampling = "default";
|
||||||
trace!(
|
trace!(
|
||||||
"Using {}, desired baudrate: {}, actual baudrate: {}",
|
"Using {} oversampling, desired baudrate: {}, actual baudrate: {}",
|
||||||
if over8 { "OVER8" } else { "OVER16" },
|
oversampling,
|
||||||
config.baudrate,
|
config.baudrate,
|
||||||
pclk_freq.0 / brr
|
pclk_freq.0 / brr
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user