From 78314c25fb8d9713bd0572fd1dc70007398b3607 Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Sat, 23 Oct 2021 13:57:45 +0800 Subject: [PATCH] driver/ps2: set ps2_Mouse4Bytes instead of assuming it is false --- driver/irq/pic/ps2/ps2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/driver/irq/pic/ps2/ps2.c b/driver/irq/pic/ps2/ps2.c index 55661d7..bf1d137 100644 --- a/driver/irq/pic/ps2/ps2.c +++ b/driver/irq/pic/ps2/ps2.c @@ -71,8 +71,7 @@ void irq_pic_ps2_Init() { __ps2_ReadACK(); uint8_t id = __ps2_ReadData(); // receive device ID io_Printf(", MOUSE PS/2 ID=%d\n", id); - if (id == 3) // Z-axis is enabled - irq_pic_ps2_Mouse4Bytes = true; + irq_pic_ps2_Mouse4Bytes = (id == 3); // Z-axis is enabled irq_pic_IRQHandler[IRQ_PIC_PS2_MOUSE] = irq_pic_ps2_IRQHandlerM; irq_pic_Mask(IRQ_PIC_PS2_MOUSE, false);