diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-09-08 23:16:06 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-09-08 23:16:06 +0200 |
| commit | 1b0f4d48412875705fc3b717b14d61c23c9ea17b (patch) | |
| tree | 59a8431322df6e7105356bea3275c9e2b0afcf2e | |
| parent | db967b35d4c24000ef69283c2995010a08efb598 (diff) | |
changed logging for mouse
| -rw-r--r-- | README.md | 5 | ||||
| -rw-r--r-- | kernel/kernel.c | 4 | ||||
| -rw-r--r-- | kernel/mouse.c | 12 |
3 files changed, 12 insertions, 9 deletions
@@ -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 } |
