Changes to the module loader to handle specific errors from modules
[tpg/acess2.git] / Kernel / drv / kb.c
index a546153..65d340e 100644 (file)
@@ -56,10 +56,18 @@ Uint8       gbaKB_States[3][256];
  */
 int KB_Install(char **Arguments)
 {
+       Uint8   temp;
+       
+       // Attempt to get around a strange bug in Bochs/Qemu by toggling
+       // the controller on and off
+       temp = inb(0x61);
+       outb(0x61, temp | 0x80);
+       outb(0x61, temp & 0x7F);
+       
        IRQ_AddHandler(1, KB_IRQHandler);
        DevFS_AddDevice( &gKB_DevInfo );
        //Log("KB_Install: Installed");
-       return 1;
+       return MODULE_ERR_OK;
 }
 
 /**
@@ -76,7 +84,7 @@ void KB_IRQHandler()
 
        scancode = inb(0x60); // Read from the keyboard's data buffer
 
-       Log("KB_IRQHandler: scancode = 0x%02x", scancode);
+       //Log("KB_IRQHandler: scancode = 0x%02x", scancode);
 
        // Ignore ACKs
        if(scancode == 0xFA) {

UCC git Repository :: git.ucc.asn.au