aboutsummaryrefslogtreecommitdiff
path: root/src/idt/interrupthandler.cc
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-02-28 22:39:25 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2021-02-28 22:39:25 +0200
commitae4265ea5d77b68757af39d73fe47df1a3563b42 (patch)
tree7282e3d43c471b195bb5a4742ed911c7b7626dcb /src/idt/interrupthandler.cc
parentFix interrupts causing exception 0xd (diff)
downloadkernel.cpp-ae4265ea5d77b68757af39d73fe47df1a3563b42.tar.xz
Add keyboard driver
Diffstat (limited to 'src/idt/interrupthandler.cc')
-rw-r--r--src/idt/interrupthandler.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/idt/interrupthandler.cc b/src/idt/interrupthandler.cc
new file mode 100644
index 0000000..7af830b
--- /dev/null
+++ b/src/idt/interrupthandler.cc
@@ -0,0 +1,14 @@
+#include <stdlib.h>
+#include "../idt.h"
+
+InterruptHandler::InterruptHandler(uint8_t irq) : m_irq(irq) {
+ IDT::install(m_irq, this);
+}
+
+InterruptHandler::~InterruptHandler() {
+ IDT::uninstall(m_irq, this);
+}
+
+void InterruptHandler::trigger() {
+ printk("Unhandled interrupt ", uhex{m_irq}, '\n');
+}