mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
lib/ips/intc: C++-ify interface
This commit is contained in:
parent
e05ff515c7
commit
fc98aaecb4
2 changed files with 10 additions and 8 deletions
|
@ -48,12 +48,12 @@ public:
|
|||
|
||||
bool init();
|
||||
|
||||
int enableInterrupt(IrqMaskType mask, bool polling);
|
||||
int enableInterrupt(IrqPort irq, bool polling)
|
||||
bool enableInterrupt(IrqMaskType mask, bool polling);
|
||||
bool enableInterrupt(IrqPort irq, bool polling)
|
||||
{ return enableInterrupt(1 << irq.num, polling); }
|
||||
|
||||
int disableInterrupt(IrqMaskType mask);
|
||||
int disableInterrupt(IrqPort irq)
|
||||
bool disableInterrupt(IrqMaskType mask);
|
||||
bool disableInterrupt(IrqPort irq)
|
||||
{ return disableInterrupt(1 << irq.num); }
|
||||
|
||||
int waitForInterrupt(int irq);
|
||||
|
|
|
@ -45,7 +45,8 @@ InterruptController::~InterruptController()
|
|||
vfio_pci_msi_deinit(&card->vfio_device , this->efds);
|
||||
}
|
||||
|
||||
bool InterruptController::init()
|
||||
bool
|
||||
InterruptController::init()
|
||||
{
|
||||
const uintptr_t base = getBaseaddr();
|
||||
auto logger = getLogger();
|
||||
|
@ -80,7 +81,7 @@ bool InterruptController::init()
|
|||
return true;
|
||||
}
|
||||
|
||||
int
|
||||
bool
|
||||
InterruptController::enableInterrupt(InterruptController::IrqMaskType mask, bool polling)
|
||||
{
|
||||
auto logger = getLogger();
|
||||
|
@ -115,7 +116,7 @@ InterruptController::enableInterrupt(InterruptController::IrqMaskType mask, bool
|
|||
return true;
|
||||
}
|
||||
|
||||
int
|
||||
bool
|
||||
InterruptController::disableInterrupt(InterruptController::IrqMaskType mask)
|
||||
{
|
||||
const uintptr_t base = getBaseaddr();
|
||||
|
@ -126,7 +127,8 @@ InterruptController::disableInterrupt(InterruptController::IrqMaskType mask)
|
|||
return true;
|
||||
}
|
||||
|
||||
int InterruptController::waitForInterrupt(int irq)
|
||||
int
|
||||
InterruptController::waitForInterrupt(int irq)
|
||||
{
|
||||
assert(irq < maxIrqs);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue