StrikeBox/modules/core/include/vixen/hw/basic/irq.h
StrikerX3 3ef26120ee Replace CPU modules with virt86
Restructure CMake projects
2019-02-20 23:38:36 -03:00

26 lines
395 B
C++

#pragma once
#include <cstdint>
namespace vixen {
class IRQHandler {
public:
virtual void HandleIRQ(uint8_t irqNum, bool level) = 0;
};
struct IRQ {
IRQHandler *handler;
uint8_t num;
inline void Handle(bool level) {
if (handler != nullptr) {
handler->HandleIRQ(num, level);
}
}
};
IRQ *AllocateIRQs(IRQHandler *handler, uint8_t numIRQs);
}