1
Files
interrupt-handling-using-th…/code/interruptdispatcher_assign.cpp
2023-02-26 21:12:51 +01:00

9 lines
315 B
C++

// Excerpt from the "InterruptDispatcher" class
void InterruptDispatcher::assign(uint8_t slot, InterruptHandler &isr) {
if (handler[slot] == nullptr) {
handler[slot] = new Util::ArrayList<InterruptHandler*>;
}
handler[slot]->add(&isr); // Register an interrupt handler to an interrupt vector
}