aboutsummaryrefslogtreecommitdiff
path: root/drivers/keyboard.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-03-03 11:43:43 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2021-03-03 11:43:43 +0200
commit02a703e8dca690780d6e00198274a2139e89f01a (patch)
tree0688710e65f0a8e81719b739393935399ef1022e /drivers/keyboard.h
parentAdd keyboard driver (diff)
downloadkernel.cpp-02a703e8dca690780d6e00198274a2139e89f01a.tar.xz
Add some comments to keyboard driver
Diffstat (limited to 'drivers/keyboard.h')
-rw-r--r--drivers/keyboard.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/keyboard.h b/drivers/keyboard.h
index a14c2c0..cac0cb0 100644
--- a/drivers/keyboard.h
+++ b/drivers/keyboard.h
@@ -3,6 +3,7 @@
#include "idt.h"
#include "ports.h"
+/* PS/2 Keyboard */
class Keyboard : public InterruptHandler {
public:
Keyboard();
@@ -10,6 +11,11 @@ public:
void trigger() override;
private:
- keyboard_comm_t commandport;
- keyboard_data_t dataport;
+ /* 8042 PS/2 Controller Ports */
+ typedef Port<0x60, uint8_t> data_port_t; // rw data port
+ typedef Port<0x64, uint8_t> comm_port_t; // r status register
+ // w command register
+
+ data_port_t dataport;
+ comm_port_t commstatport;
};