execute fetch in isr

main
Eggert Jung 6 months ago
parent d5dc4935a5
commit 58f8cf1815

@ -7,6 +7,8 @@
#include "../debug/kernelpanic.h"
#include "../debug/output.h"
#include "../device/ps2controller.h"
void printContext(const InterruptContext *context) {
DBG << "ip: " << hex << context->cs << ':' << context->ip
<< " sp: " << context->ss << ':' << context->sp << " flags" << bin
@ -65,8 +67,13 @@ enum PAGE_FAULT_ERROR {
kernelpanic("Page fault!");
}
extern TextStream kout;
void handle_keyboard() {
dout[0] << "test"<<endl<<flush;
//dout[0] << "test"<<endl<<flush;
Key key = Key();
if (PS2Controller::fetch(key)) {
kout << key.ascii() << flush ;
}
}
[[gnu::interrupt]] void handle_panic(InterruptContext *context) {

@ -125,12 +125,9 @@ extern "C" int main() {
Core::Interrupt::enable();
Key key = Key();
while (true){
if (PS2Controller::fetch(key)) {
kout << key.ascii() << flush ;
}
}
return 0;
}

Loading…
Cancel
Save