mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-13 01:40:36 +00:00
27f699ef0c
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
24 lines
396 B
C++
24 lines
396 B
C++
#include "IRQHandler.h"
|
|
#include "PIC.h"
|
|
#include <Kernel/Arch/i386/CPU.h>
|
|
|
|
IRQHandler::IRQHandler(u8 irq)
|
|
: m_irq_number(irq)
|
|
{
|
|
register_irq_handler(m_irq_number, *this);
|
|
}
|
|
|
|
IRQHandler::~IRQHandler()
|
|
{
|
|
unregister_irq_handler(m_irq_number, *this);
|
|
}
|
|
|
|
void IRQHandler::enable_irq()
|
|
{
|
|
PIC::enable(m_irq_number);
|
|
}
|
|
|
|
void IRQHandler::disable_irq()
|
|
{
|
|
PIC::disable(m_irq_number);
|
|
}
|