stm32: can: fd: on_interrupt: simplify, rm redundant code
PED, PEA are never enabled in the interrupt enable code in peripheral.rs; no need to process the flags here
This commit is contained in:
parent
bab4affe7c
commit
901bdfc7b8
1 changed files with 27 additions and 37 deletions
|
@ -44,7 +44,6 @@ impl<T: Instance> interrupt::typelevel::Handler<T::IT0Interrupt> for IT0Interrup
|
||||||
|
|
||||||
let ir = regs.ir().read();
|
let ir = regs.ir().read();
|
||||||
|
|
||||||
{
|
|
||||||
if ir.tc() {
|
if ir.tc() {
|
||||||
regs.ir().write(|w| w.set_tc(true));
|
regs.ir().write(|w| w.set_tc(true));
|
||||||
}
|
}
|
||||||
|
@ -75,19 +74,10 @@ impl<T: Instance> interrupt::typelevel::Handler<T::IT0Interrupt> for IT0Interrup
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ir.ped() || ir.pea() {
|
|
||||||
regs.ir().write(|w| {
|
|
||||||
w.set_ped(true);
|
|
||||||
w.set_pea(true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if ir.rfn(0) {
|
if ir.rfn(0) {
|
||||||
T::state().rx_mode.on_interrupt::<T>(0);
|
T::state().rx_mode.on_interrupt::<T>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ir.rfn(1) {
|
if ir.rfn(1) {
|
||||||
T::state().rx_mode.on_interrupt::<T>(1);
|
T::state().rx_mode.on_interrupt::<T>(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue