aboutsummaryrefslogtreecommitdiff
path: root/drivers/keyboard.h
blob: cac0cb0c52f7048e140c5c6ede2994fef03d5d88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include "idt.h"
#include "ports.h"

/* PS/2 Keyboard */
class Keyboard : public InterruptHandler {
public:
  Keyboard();

  void trigger() override;

private:
  /* 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;
};