To ease the pain of debuggin I can now interact with the system through a very simplistic terminal. Hopefully things can be tested more easily by activating the piece through a simple command. The max characters for a command is 10. To achieve this I have had to make the following changes. - Changed IRQ to update a global status variable - Added a standalone keyboard driver with getKey functions - Changed the main kernel loop to display a prompt - Added a strncmp function to the clib/string file
35 lines
509 B
C
35 lines
509 B
C
#pragma once
|
|
#include <stdint.h>
|
|
#include "../tty/kterm.h"
|
|
typedef enum ScanCodeSet{
|
|
None = 0,
|
|
ScanCodeSet1 = 1,
|
|
ScanCodeSet2 = 2,
|
|
ScanCodeSet3 = 3,
|
|
};
|
|
|
|
typedef enum Modifiers{
|
|
LSHIFT = 1,
|
|
RSHIFT = 2,
|
|
|
|
LCTRL = 3,
|
|
RCTRL = 4,
|
|
|
|
LALT = 5,
|
|
RALT = 6
|
|
};
|
|
|
|
struct KeyPressInfo{
|
|
uint8_t PressedModifiers;
|
|
uint8_t ScanCode;
|
|
};
|
|
|
|
|
|
|
|
extern KeyPressInfo keyPress;
|
|
|
|
void KeyHandled();
|
|
|
|
char getASCIIKey();
|
|
uint8_t getKey();
|