summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--kernel/kernel.c4
-rw-r--r--kernel/mouse.c12
3 files changed, 12 insertions, 9 deletions
diff --git a/README.md b/README.md
index 5e7b289..8022f25 100644
--- a/README.md
+++ b/README.md
@@ -60,17 +60,18 @@ Please note that all features are only very rudimentary and buggy.
* VESA
* ACPI / MP (to get processor info)
* Spinlocks
+* PS2 Mouse driver (not finished)
+* Keyboard driver (redesign!)
Todos
-----
+* Port newlib and gcc
* Shell
* E1000 driver
-* Port c lib and gcc
* Networking stack
* Web-server
* User space
-* mouse driver
* window manager
* 64-bit
diff --git a/kernel/kernel.c b/kernel/kernel.c
index f8b6571..419a808 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -203,10 +203,6 @@ void kernel_main(uint32_t initial_stack, int mp)
//vesa_init_doublebuff();
while(1)
{
-
- // lock_spin(0);
-// log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"x: %d y:%d",mouse_get_x(), mouse_get_y());
- // lock_release(0);
}
diff --git a/kernel/mouse.c b/kernel/mouse.c
index de1e3bf..bee595c 100644
--- a/kernel/mouse.c
+++ b/kernel/mouse.c
@@ -12,8 +12,9 @@
static volatile uint8_t mouse_cycle;
static volatile int8_t mouse_byte[3];
-static volatile int8_t mouse_x;
-static volatile int8_t mouse_y;
+static volatile uint8_t mouse_x;
+static volatile uint8_t mouse_y;
+static volatile uint8_t mouse_a;
uint8_t mouse_read();
@@ -59,6 +60,10 @@ void mouse_init()
}
+void mouse_log()
+{
+ log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"%d delta x: %d delta y: %d ",mouse_a, mouse_x,mouse_y);
+}
//Mouse functions
void mouse_handler()//struct regs *a_r) //struct regs *a_r (not used but just there)
{
@@ -76,14 +81,15 @@ void mouse_handler()//struct regs *a_r) //struct regs *a_r (not used but just th
break;
case 2:
mouse_byte[2]=x86_inb(0x60);
+ mouse_a=mouse_byte[0];
mouse_x=mouse_byte[1];
mouse_y=mouse_byte[2];
mouse_cycle=0;
+ mouse_log();
break;
}
- //log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"irq12");
X86_IRQ_END
}