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

#include <AK/Types.h>

namespace PIC {

void enable(BYTE number);
void disable(BYTE number);
void eoi(BYTE number);
void initialize();
word getISR();

}

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

private:
    BYTE m_irq { 0 };
};