feature flag
This commit is contained in:
parent
065071b467
commit
2cc21d4883
@ -254,9 +254,12 @@ fn clear_idle_flag(r: Regs) -> Sr {
|
|||||||
|
|
||||||
// This read also clears the error and idle interrupt flags on v1.
|
// This read also clears the error and idle interrupt flags on v1.
|
||||||
unsafe { rdr(r).read_volatile() };
|
unsafe { rdr(r).read_volatile() };
|
||||||
|
#[cfg(any(usart_v3, usart_v4))]
|
||||||
|
{
|
||||||
let mut clear_idle = regs::Icr(0);
|
let mut clear_idle = regs::Icr(0);
|
||||||
clear_idle.set_idle(true);
|
clear_idle.set_idle(true);
|
||||||
r.icr().write_value(clear_idle);
|
r.icr().write_value(clear_idle);
|
||||||
|
}
|
||||||
|
|
||||||
r.cr1().modify(|w| w.set_idleie(true));
|
r.cr1().modify(|w| w.set_idleie(true));
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user