feature flag

This commit is contained in:
Rogan Morrow 2025-02-28 12:40:01 +11:00
parent 065071b467
commit 2cc21d4883

View File

@ -254,9 +254,12 @@ fn clear_idle_flag(r: Regs) -> Sr {
// This read also clears the error and idle interrupt flags on v1.
unsafe { rdr(r).read_volatile() };
let mut clear_idle = regs::Icr(0);
clear_idle.set_idle(true);
r.icr().write_value(clear_idle);
#[cfg(any(usart_v3, usart_v4))]
{
let mut clear_idle = regs::Icr(0);
clear_idle.set_idle(true);
r.icr().write_value(clear_idle);
}
r.cr1().modify(|w| w.set_idleie(true));