Unverified Commit 1e0fda1f authored by Oxynux's avatar Oxynux Committed by GitHub

Fix get_scancode()

parent 811f0322
...@@ -60,12 +60,12 @@ unsigned char kbdus[128] = { ...@@ -60,12 +60,12 @@ unsigned char kbdus[128] = {
* *
*/ */
static inline void outb(uint16_t port, uint8_t val) // static inline void outb(uint16_t port, uint8_t val)
{ // {
asm volatile ( "outb %0, %1" // asm volatile ( "outb %0, %1"
: // :
: "a"(val), "Nd"(port) ); // : "a"(val), "Nd"(port) );
} // }
/* /*
...@@ -99,9 +99,8 @@ static inline uint8_t inb(uint16_t port) ...@@ -99,9 +99,8 @@ static inline uint8_t inb(uint16_t port)
static unsigned char get_scancode() static unsigned char get_scancode()
{ {
unsigned char c = 0; unsigned char c = 0;
outb(0x60, 0x0);
do { do {
if(inb(0x60) != c){ if(inb(0x64) & 0x01){
c = inb(0x60); c = inb(0x60);
return c; return c;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment