ladybird/Kernel/PIC.h
2018-10-17 16:54:49 +02:00

23 lines
335 B
C++

#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 };
};