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

#include <AK/Types.h>

namespace PIC {

void enable(byte number);
void disable(byte number);
void eoi(byte number);
void initialize();
word get_isr();
word get_irr();

}

class IRQHandlerScope {
public:
    explicit IRQHandlerScope(byte irq) : m_irq(irq) { }
    ~IRQHandlerScope() { PIC::eoi(m_irq); }

private:
    byte m_irq { 0 };
};