blob: c8265d9f7ea64fd310d072a3facfd2b6c8b3caed (
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(u8 number);
void disable(u8 number);
void eoi(u8 number);
void initialize();
u16 get_isr();
u16 get_irr();
}
class IRQHandlerScope {
public:
explicit IRQHandlerScope(u8 irq)
: m_irq(irq)
{
}
~IRQHandlerScope() { PIC::eoi(m_irq); }
private:
u8 m_irq { 0 };
};
|