ref: dcc535daeb6866c72fe7eea3947702314d9c2f72
parent: 963783fb08c7d5f93a4aa9759291eec6da28fc59
author: mkf <mkf@cloud9p.org>
date: Tue Dec 5 16:46:28 EST 2023
put keymap inside ps2.c, rather than ps2.h, which would make it available everywhere
--- a/include/ps2.h
+++ b/include/ps2.h
@@ -1,24 +1,4 @@
#pragma once
-static char keymap[2][128] =
-{
- {
- "\0\x1b""1234567890-=\b\t"
- "qwertyuiop[]\r\0as"
- "dfghjkl;'`\0\\zxcv"
- "bnm,./\0*\0 \0\0\0\0\0\0"
- "\0\0\0\0\0\0\0""789-456+1"
- "230."
- },
- {
- "\0\x1b""!@#$%^&*()_+\b\t"
- "QWERTYUIOP{}\r\0AS"
- "DFGHJKL:\"~\0|ZXCV"
- "BNM<>?\0\0\0 \0\0\0\0\0\0"
- "\0\0\0\0\0\0\0""789-456+1"
- "230."
- },
-};
-
enum KB_CTR_CMD
{
ENABLE = 0xAE,
--- a/pc/ps2.c
+++ b/pc/ps2.c
@@ -1,6 +1,25 @@
#include <u.h>
#include <x86.h>
#include <ps2.h>
+static char keymap[2][128] =
+{
+ {
+ "\0\x1b""1234567890-=\b\t"
+ "qwertyuiop[]\r\0as"
+ "dfghjkl;'`\0\\zxcv"
+ "bnm,./\0*\0 \0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0""789-456+1"
+ "230."
+ },
+ {
+ "\0\x1b""!@#$%^&*()_+\b\t"
+ "QWERTYUIOP{}\r\0AS"
+ "DFGHJKL:\"~\0|ZXCV"
+ "BNM<>?\0\0\0 \0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0""789-456+1"
+ "230."
+ },
+};
uint8
ps2_read_status(void)