summaryrefslogtreecommitdiff
path: root/src/drivers/hdi/ps2/keyboard.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-07-16 08:19:05 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-07-16 08:19:05 +0200
commit1e8bad98827b651009a8ad4b8134d8a72a004be3 (patch)
tree3c93acf15ff42d3f07d807d02852f43d8ac21b1b /src/drivers/hdi/ps2/keyboard.c
parent21c1989527191fa3739984a167d7a1cf939cfd6b (diff)
downloadabaos-1e8bad98827b651009a8ad4b8134d8a72a004be3.tar.gz
abaos-1e8bad98827b651009a8ad4b8134d8a72a004be3.tar.bz2
moved registering of mouse/keyboard interrupts into the driver activation instead
of having them directly in kernel.c also more standardization of the driver init functions (mouse set_resolution instead of constructor parameters res_x and res_y)
Diffstat (limited to 'src/drivers/hdi/ps2/keyboard.c')
-rw-r--r--src/drivers/hdi/ps2/keyboard.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/drivers/hdi/ps2/keyboard.c b/src/drivers/hdi/ps2/keyboard.c
index 1c5f978..d4003b2 100644
--- a/src/drivers/hdi/ps2/keyboard.c
+++ b/src/drivers/hdi/ps2/keyboard.c
@@ -92,6 +92,7 @@ void keyboard_activate( void *obj )
{
puts( "Activating driver for PS/2 keyboard.." );
+ driver_t *driver = obj;
keyboard_t *keyboard = obj;
// first switch off port 1
@@ -122,6 +123,9 @@ void keyboard_activate( void *obj )
//send_command( keyboard, KBD_ACTIVATE );
//read_ack( keyboard );
+ interrupt_handler_init( &keyboard->interrupt_handler, IRQ_BASE + 0x01, driver->interrupt, keyboard_handle_interrupt, obj );
+ interrupts_register_interrupt_handler( keyboard->interrupt_handler );
+
// enable port 1
send_command( keyboard, COMMAND_ENABLE_PORT1 );
}