2018-10-22 12:58:29 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/Types.h>
|
|
|
|
|
|
|
|
class IRQHandler {
|
|
|
|
public:
|
|
|
|
virtual ~IRQHandler();
|
2018-12-03 00:39:25 +01:00
|
|
|
virtual void handle_irq() = 0;
|
2018-10-22 12:58:29 +02:00
|
|
|
|
2019-07-03 21:17:35 +02:00
|
|
|
u8 irq_number() const { return m_irq_number; }
|
2018-10-22 12:58:29 +02:00
|
|
|
|
2018-12-03 00:39:25 +01:00
|
|
|
void enable_irq();
|
|
|
|
void disable_irq();
|
2018-10-22 12:58:29 +02:00
|
|
|
|
|
|
|
protected:
|
2019-07-03 21:17:35 +02:00
|
|
|
explicit IRQHandler(u8 irq);
|
2018-10-22 12:58:29 +02:00
|
|
|
|
|
|
|
private:
|
2019-07-03 21:17:35 +02:00
|
|
|
u8 m_irq_number { 0 };
|
2018-10-22 12:58:29 +02:00
|
|
|
};
|