mbv: small refactor interrupts

This commit is contained in:
2025-06-24 23:02:38 -07:00
parent 6553fa04aa
commit d18d41fc02
6 changed files with 43 additions and 16 deletions

View File

@@ -1,7 +1,9 @@
#include "intc.h"
// this interrupt controller is tied to the pol0 design
#include "pol0.h"
namespace intc {
namespace {
struct IntC {
@@ -22,7 +24,7 @@ struct IntC {
IntC* intc = reinterpret_cast<IntC*>(INTC_BASE);
Isr isrs[NIRQ] = {};
}
} // namespace
bool SetIrqEnabled(uint8_t irqn, bool enabled) {
uint32_t mask = 1 << irqn;
@@ -60,3 +62,5 @@ void InterruptHandler() {
}
}
}
} // namespace intc