mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
23 lines
352 B
C++
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 };
|
|
};
|