blob: 7b0dcbe6a5115ad86e30022b55bcc152b407c155 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#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 };
};
|