summaryrefslogtreecommitdiff
path: root/Kernel/IRQHandler.h
blob: 4abadf6b2029d3d10f736fa350e2a69c5371e6e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <AK/Types.h>

class IRQHandler {
public:
    virtual ~IRQHandler();
    virtual void handle_irq() = 0;

    byte irq_number() const { return m_irq_number; }

    void enable_irq();
    void disable_irq();

protected:
    explicit IRQHandler(byte irq);

private:
    byte m_irq_number { 0 };
};