diff --git a/fpga/include/villas/fpga/ips/platform_intc.hpp b/fpga/include/villas/fpga/ips/platform_intc.hpp new file mode 100644 index 000000000..e24bfd67f --- /dev/null +++ b/fpga/include/villas/fpga/ips/platform_intc.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include +#include + +class PlatformInterruptController + : public villas::fpga::ip::InterruptController { +public: + PlatformInterruptController( + std::shared_ptr vfioDevice) { + //TODO: efds + this->num_irqs = vfioDevice->platformInterruptInit(efds); + } + + bool enableInterrupt(IrqMaskType mask, bool polling) override { + for (int i = 0; i < num_irqs; i++) { + if (mask & (1 << i)) + this->polling[i] = polling; + } + return true; + } +}; \ No newline at end of file