mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
platform intc
This commit is contained in:
parent
14a8c67bd2
commit
aee77860ba
1 changed files with 22 additions and 0 deletions
22
fpga/include/villas/fpga/ips/platform_intc.hpp
Normal file
22
fpga/include/villas/fpga/ips/platform_intc.hpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include <villas/fpga/ips/intc.hpp>
|
||||
#include <villas/kernel/vfio_device.hpp>
|
||||
|
||||
class PlatformInterruptController
|
||||
: public villas::fpga::ip::InterruptController {
|
||||
public:
|
||||
PlatformInterruptController(
|
||||
std::shared_ptr<villas::kernel::vfio::Device> 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;
|
||||
}
|
||||
};
|
Loading…
Add table
Reference in a new issue