mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 06:47:34 +00:00
Add a PIC::getISR() helper.
This commit is contained in:
parent
e0f31d38a2
commit
9aa88fe186
2 changed files with 12 additions and 0 deletions
|
@ -93,4 +93,13 @@ void initialize()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
word getISR()
|
||||||
|
{
|
||||||
|
IO::out8(PIC0_CTL, 0x0b);
|
||||||
|
IO::out8(PIC1_CTL, 0x0b);
|
||||||
|
byte isr0 = IO::in8(PIC0_CTL);
|
||||||
|
byte isr1 = IO::in8(PIC1_CTL);
|
||||||
|
return (isr1 << 8) | isr0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <AK/Types.h>
|
||||||
|
|
||||||
namespace PIC {
|
namespace PIC {
|
||||||
|
|
||||||
void enable(BYTE number);
|
void enable(BYTE number);
|
||||||
void disable(BYTE number);
|
void disable(BYTE number);
|
||||||
void eoi(BYTE number);
|
void eoi(BYTE number);
|
||||||
void initialize();
|
void initialize();
|
||||||
|
word getISR();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue