ladybird/Kernel/PIC.h
2019-01-31 17:31:23 +01:00

23 lines
352 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 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 };
};