2015-10-13 14:11:06 +00:00
|
|
|
#ifndef _KEYBOARD_HPP
|
|
|
|
#define _KEYBOARD_HPP
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <input.hpp>
|
|
|
|
#include <io.h>
|
|
|
|
#include <idt.hpp>
|
|
|
|
namespace MTGosHAL {
|
2015-10-15 18:14:04 +00:00
|
|
|
|
2015-10-13 14:11:06 +00:00
|
|
|
class Keyboard: public Input {
|
|
|
|
private:
|
|
|
|
//This kernel has a buffer of 16 chars
|
|
|
|
char buf[16];
|
|
|
|
int len;
|
|
|
|
auto getChar() -> char;
|
|
|
|
auto sendCommand(uint8_t command) -> void;
|
|
|
|
static auto handleIRQ1(struct cpu_state* cpu) -> void;
|
|
|
|
bool shift, numlock, caps, scrollock;
|
|
|
|
public:
|
|
|
|
Keyboard();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // -Wno-pmf-conversions
|