ladybird/Kernel/IRQHandler.h
Andreas Kling a9ca75c98b Add IRQHandler class that can be subclasses to handle an IRQ.
Also move Keyboard to a class implementation using this pattern.
2018-10-22 12:58:29 +02:00

22 lines
312 B
C++

#pragma once
#include <AK/Types.h>
class IRQHandler {
public:
virtual ~IRQHandler();
virtual void handleIRQ() = 0;
byte irqNumber() const { return m_irqNumber; }
void enableIRQ();
void disableIRQ();
protected:
explicit IRQHandler(byte irq);
private:
byte m_irqNumber { 0 };
};