Fix oversampling message for usart v1

This commit is contained in:
Rasmus Melchior Jacobsen 2023-05-25 17:56:52 +02:00
parent 387a4fcb8e
commit c5bf36eebf

View File

@ -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
); );