mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
27f699ef0c
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
26 lines
356 B
C++
26 lines
356 B
C++
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
|
|
namespace PIC {
|
|
|
|
void enable(u8 number);
|
|
void disable(u8 number);
|
|
void eoi(u8 number);
|
|
void initialize();
|
|
u16 get_isr();
|
|
u16 get_irr();
|
|
|
|
}
|
|
|
|
class IRQHandlerScope {
|
|
public:
|
|
explicit IRQHandlerScope(u8 irq)
|
|
: m_irq(irq)
|
|
{
|
|
}
|
|
~IRQHandlerScope() { PIC::eoi(m_irq); }
|
|
|
|
private:
|
|
u8 m_irq { 0 };
|
|
};
|