summaryrefslogtreecommitdiff
path: root/Kernel/Keyboard.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-22 12:58:29 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-22 12:58:29 +0200
commita9ca75c98b8e775cb48204c56d6ad02b272d6767 (patch)
tree0b97d9a1b14ddc1c6e4ef45fc30880eb3edbe802 /Kernel/Keyboard.h
parent8f941561b49015b867d8f87f6859b5bf77895aa2 (diff)
downloadserenity-a9ca75c98b8e775cb48204c56d6ad02b272d6767.zip
Add IRQHandler class that can be subclasses to handle an IRQ.
Also move Keyboard to a class implementation using this pattern.
Diffstat (limited to 'Kernel/Keyboard.h')
-rw-r--r--Kernel/Keyboard.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/Kernel/Keyboard.h b/Kernel/Keyboard.h
index a2ed06fa7e..02aa5cec06 100644
--- a/Kernel/Keyboard.h
+++ b/Kernel/Keyboard.h
@@ -1,16 +1,16 @@
#pragma once
-namespace Keyboard {
+#include <AK/Types.h>
+#include "IRQHandler.h"
-enum class LED {
- ScrollLock = 1 << 0,
- NumLock = 1 << 1,
- CapsLock = 1 << 2,
-};
+class Keyboard final : public IRQHandler {
+public:
+ virtual ~Keyboard() override;
+ Keyboard();
+
+private:
+ virtual void handleIRQ() override;
-void initialize();
-void setLED(LED);
-void unsetLED(LED);
-void handleInterrupt();
+ byte m_modifiers { 0 };
+};
-}