aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers/ps2/mouse.c
diff options
context:
space:
mode:
authorMarvin Borner2021-04-17 13:55:51 +0200
committerMarvin Borner2021-04-17 13:55:51 +0200
commit89b5b9acf6037fc1a87f9e85c64831187a47ba94 (patch)
tree54b2cdc2dbedfb8594a2d89730805467602f7d93 /kernel/drivers/ps2/mouse.c
parent7485f7e441ca892876d9401380aa77610eb85f76 (diff)
Implemented I/O polling
Diffstat (limited to 'kernel/drivers/ps2/mouse.c')
-rw-r--r--kernel/drivers/ps2/mouse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/drivers/ps2/mouse.c b/kernel/drivers/ps2/mouse.c
index 1d3c1ae..ba6d338 100644
--- a/kernel/drivers/ps2/mouse.c
+++ b/kernel/drivers/ps2/mouse.c
@@ -45,6 +45,7 @@ static void mouse_handler(struct regs *r)
event->but3 = (mouse_byte[0] >> 2) & 1;
stack_push_bot(queue, event);
mouse_cycle = 0;
+ io_unblock(IO_MOUSE);
break;
default:
break;
@@ -53,7 +54,7 @@ static void mouse_handler(struct regs *r)
static res mouse_ready(void)
{
- return !stack_empty(queue);
+ return !stack_empty(queue) ? EOK : -EAGAIN;
}
static res mouse_read(void *buf, u32 offset, u32 count)