driver/ps2: move EnableReporting to the end of mouse init sequence
This commit is contained in:
parent
218e5c2c96
commit
430a3abf7d
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user