diff --git a/driver/irq/pic/ps2/ps2.c b/driver/irq/pic/ps2/ps2.c index bf1d137..1b87612 100644 --- a/driver/irq/pic/ps2/ps2.c +++ b/driver/irq/pic/ps2/ps2.c @@ -55,11 +55,6 @@ void irq_pic_ps2_Init() { } io_Printf("%X ", data); - // enable mouse reporting - io_WriteConsoleASCII("MOUSE_ENABLE_REPORTING... "); - __ps2_WriteCommandData(IRQ_PIC_PS2_CMD_SEND_MOUSE, IRQ_PIC_PS2_CMD_DEVICE_MOUSE_ENABLE_REPORTING); - __ps2_ReadACK(); // receive ACK - // enable 4-byte mode for mouse, pure magic! irq_pic_ps2_Mouse4Bytes = false; __ps2_SetMouseRate(200); @@ -79,6 +74,11 @@ void irq_pic_ps2_Init() { // set the actual mouse sample rate __ps2_SetMouseRate(IRQ_PIC_PS2_MOUSE_SAMPLERATE); + // enable mouse reporting + io_WriteConsoleASCII("MOUSE_ENABLE_REPORTING... "); + __ps2_WriteCommandData(IRQ_PIC_PS2_CMD_SEND_MOUSE, IRQ_PIC_PS2_CMD_DEVICE_MOUSE_ENABLE_REPORTING); + __ps2_ReadACK(); // receive ACK + INTERRUPT_RESTORE; } diff --git a/driver/irq/pic/ps2/ps2.h b/driver/irq/pic/ps2/ps2.h index 254759c..15fd075 100644 --- a/driver/irq/pic/ps2/ps2.h +++ b/driver/irq/pic/ps2/ps2.h @@ -46,6 +46,7 @@ extern "C" { #define IRQ_PIC_PS2_CMD_DEVICE_RESET 0xff #define IRQ_PIC_PS2_CMD_DEVICE_MOUSE_DISABLE_REPORTING 0xf5 #define IRQ_PIC_PS2_CMD_DEVICE_MOUSE_ENABLE_REPORTING 0xf4 +#define IRQ_PIC_PS2_CMD_DEVICE_MOUSE_REQUEST_PACKET 0xeb void irq_pic_ps2_Init();