mbv: small refactor interrupts
This commit is contained in:
@@ -25,9 +25,8 @@ void SetupTimer() {
|
||||
timer->SetupAsWdt(100'000'000);
|
||||
timer->EnableT1();
|
||||
|
||||
SetIsr(TIMER0_IRQN, Timer0Isr);
|
||||
SetIrqEnabled(TIMER0_IRQN, true);
|
||||
EnableInterrupts();
|
||||
intc::SetIsr(TIMER0_IRQN, Timer0Isr);
|
||||
intc::SetIrqEnabled(TIMER0_IRQN, true);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -37,8 +36,10 @@ int main() {
|
||||
leds->data = 0xa0;
|
||||
|
||||
SetupTimer();
|
||||
SetExternalInterruptHandler(InterruptHandler);
|
||||
intc::EnableInterrupts();
|
||||
SetExternalInterruptHandler(intc::InterruptHandler);
|
||||
EnableExternalInterrupts();
|
||||
EnableInterrupts(true);
|
||||
|
||||
leds->data = 0xa1;
|
||||
|
||||
|
Reference in New Issue
Block a user