From 415a8bc249d5c366487f69b3547198d17044a5de Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 28 Feb 2021 15:52:43 +0000 Subject: ARM - Refactor SLEEP_LED to support more platforms (#8403) * Initial refactor of ARM SLEEP_LED to enable more platforms * fix build issues * Disable SLEEP_LED for boards with no caps lock code * Enable GPT14 for boards with caps lock code and SLEEP_LED enabled * Enable GPT for boards with caps lock code and SLEEP_LED enabled --- keyboards/projectkb/alice/config.h | 3 +++ keyboards/projectkb/alice/halconf.h | 2 ++ keyboards/projectkb/alice/mcuconf.h | 2 ++ keyboards/projectkb/signature87/rules.mk | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 keyboards/projectkb/alice/config.h (limited to 'keyboards/projectkb') diff --git a/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/config.h new file mode 100644 index 0000000000..95fb682e17 --- /dev/null +++ b/keyboards/projectkb/alice/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define SLEEP_LED_GPT_DRIVER GPTD1 diff --git a/keyboards/projectkb/alice/halconf.h b/keyboards/projectkb/alice/halconf.h index b17808ffeb..0016e53ba8 100644 --- a/keyboards/projectkb/alice/halconf.h +++ b/keyboards/projectkb/alice/halconf.h @@ -27,5 +27,7 @@ #define HAL_USE_SPI TRUE +#define HAL_USE_GPT TRUE + #include_next diff --git a/keyboards/projectkb/alice/mcuconf.h b/keyboards/projectkb/alice/mcuconf.h index 4bfc7f9465..6e0f1a50d8 100644 --- a/keyboards/projectkb/alice/mcuconf.h +++ b/keyboards/projectkb/alice/mcuconf.h @@ -32,3 +32,5 @@ #undef STM32_SPI_USE_SPI2 #define STM32_SPI_USE_SPI2 TRUE +#undef STM32_GPT_USE_TIM1 +#define STM32_GPT_USE_TIM1 TRUE diff --git a/keyboards/projectkb/signature87/rules.mk b/keyboards/projectkb/signature87/rules.mk index fe0d976d11..caad4c83c2 100644 --- a/keyboards/projectkb/signature87/rules.mk +++ b/keyboards/projectkb/signature87/rules.mk @@ -9,7 +9,7 @@ MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no -- cgit v1.2.3