summaryrefslogtreecommitdiff
path: root/Kernel/PIC.h
blob: a0ed90aede01a52109a03e193df905abd5128fed (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 getISR();
word get_irr();

}

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

private:
    byte m_irq { 0 };
};