diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-10-22 12:58:29 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-10-22 12:58:29 +0200 |
commit | a9ca75c98b8e775cb48204c56d6ad02b272d6767 (patch) | |
tree | 0b97d9a1b14ddc1c6e4ef45fc30880eb3edbe802 /Kernel/Keyboard.h | |
parent | 8f941561b49015b867d8f87f6859b5bf77895aa2 (diff) | |
download | serenity-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.h | 22 |
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 }; +}; -} |