From 69a63a75b4f7a9b7fc4359633be66b32061609c2 Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Wed, 12 Apr 2023 16:54:04 -0700 Subject: [PATCH 1/3] [Bug] Fix compilation issues with PS/2 driver on F4x1 controllers --- drivers/ps2/ps2_interrupt.c | 1 + platforms/chibios/drivers/ps2/ps2_io.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/ps2/ps2_interrupt.c b/drivers/ps2/ps2_interrupt.c index 2810a0f1267b..f7400564ef9e 100644 --- a/drivers/ps2/ps2_interrupt.c +++ b/drivers/ps2/ps2_interrupt.c @@ -47,6 +47,7 @@ POSSIBILITY OF SUCH DAMAGE. // chibiOS headers # include "ch.h" # include "hal.h" +# include "gpio.h" #endif #include "ps2.h" diff --git a/platforms/chibios/drivers/ps2/ps2_io.c b/platforms/chibios/drivers/ps2/ps2_io.c index 906d85d84840..9eb56d63da2c 100644 --- a/platforms/chibios/drivers/ps2/ps2_io.c +++ b/platforms/chibios/drivers/ps2/ps2_io.c @@ -4,6 +4,7 @@ // chibiOS headers #include "ch.h" #include "hal.h" +#include "gpio.h" /* Check port settings for clock and data line */ #if !(defined(PS2_CLOCK_PIN)) From 2cd6df7834c1588a1faed93521a2e278ba4f8786 Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Wed, 12 Apr 2023 17:14:24 -0700 Subject: [PATCH 2/3] Also ensure that HID Mouse subsystem is enabled --- builddefs/common_features.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 6a22c28b050b..2f2995c343f3 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -811,7 +811,7 @@ ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes) PS2_ENABLE := yes SRC += ps2_mouse.c OPT_DEFS += -DPS2_MOUSE_ENABLE - OPT_DEFS += -DMOUSE_ENABLE + MOUSE_ENABLE := yes endif VALID_PS2_DRIVER_TYPES := busywait interrupt usart vendor From 1edfa50efb011d3b0f3e710554f1f8dd2fda2441 Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Wed, 12 Apr 2023 19:42:13 -0700 Subject: [PATCH 3/3] Change order in makefiles --- builddefs/common_features.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 2f2995c343f3..dc64ed2394e0 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -809,9 +809,9 @@ endif ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes) PS2_ENABLE := yes + MOUSE_ENABLE := yes SRC += ps2_mouse.c OPT_DEFS += -DPS2_MOUSE_ENABLE - MOUSE_ENABLE := yes endif VALID_PS2_DRIVER_TYPES := busywait interrupt usart vendor