Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


updated devices to use new host event interface
[palacios.git] / geekos / src / geekos / keyboard.c
index e33e989..501359e 100644 (file)
 #include <geekos/keyboard.h>
 
 
+#include <geekos/vmm_stubs.h>
 
 
 
-static enum {TARGET_GEEKOS,TARGET_VMM} target = TARGET_VMM;
+static enum {TARGET_GEEKOS, TARGET_VMM} target = TARGET_VMM;
+
 
 
-extern void deliver_key_to_vmm(uchar_t status, uchar_t scancode);
 
 /* ----------------------------------------------------------------------
  * Private data and functions
@@ -264,7 +265,7 @@ noflagchange:
       
 skip_flagchange:
 
-      if (target==TARGET_GEEKOS) { 
+      if (target == TARGET_GEEKOS) { 
        if (raw_scancode==0xc4) {  // F10 release
          Print("Switching keyboard to VMM\n");
          target=TARGET_VMM;
@@ -284,13 +285,15 @@ skip_flagchange:
           */
          g_needReschedule = true;
        }
-      } else if (target==TARGET_VMM) { 
-       if (raw_scancode==0xc4) {   // F10 release
+      } else if (target == TARGET_VMM) { 
+
+       if (raw_scancode == 0xc4) {   // F10 release
          Print("Switching keyboard to GeekOS\n");
-         target=TARGET_GEEKOS;
+         target = TARGET_GEEKOS;
        } else {
-         deliver_key_to_vmm(raw_status,raw_scancode);
+         send_key_to_vmm(raw_status, raw_scancode);
        }
+
       }
     }