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
This commit is contained in:
parent
a3cbc8a004
commit
415a8bc249
25 changed files with 96 additions and 71 deletions
|
|
@ -74,3 +74,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define BACKLIGHT_LEVELS 6
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BREATHING_PERIOD 6
|
||||
|
||||
#define SLEEP_LED_GPT_DRIVER GPTD1
|
||||
|
|
|
|||
|
|
@ -27,5 +27,7 @@
|
|||
|
||||
#define HAL_USE_SPI TRUE
|
||||
|
||||
#define HAL_USE_GPT TRUE
|
||||
|
||||
#include_next <halconf.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
|
||||
|
|
|
|||
|
|
@ -11,7 +11,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
|
||||
CUSTOM_MATRIX = no # Custom matrix file
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
|
|
|||
|
|
@ -11,7 +11,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
|
||||
CUSTOM_MATRIX = no # Custom matrix file
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
|
|
|||
|
|
@ -10,7 +10,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
|
||||
CUSTOM_MATRIX = no # Custom matrix file
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
|
|
|||
|
|
@ -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
|
||||
CUSTOM_MATRIX = no # Custom matrix file
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
|
|
|||
|
|
@ -15,7 +15,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 = no # Breathing sleep LED during USB suspend
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
CUSTOM_MATRIX = no # Custom matrix file
|
||||
ENCODER_ENABLE = yes
|
||||
|
|
|
|||
|
|
@ -11,7 +11,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
|
||||
CUSTOM_MATRIX = no # Custom matrix file
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
|
|
|||
|
|
@ -11,7 +11,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
|
||||
CUSTOM_MATRIX = no # Custom matrix file
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
|
|||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
|
|||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
|
|
|
|||
|
|
@ -10,7 +10,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
|
||||
CUSTOM_MATRIX = no # Custom matrix file
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
|||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
|
|
|
|||
3
keyboards/projectkb/alice/config.h
Normal file
3
keyboards/projectkb/alice/config.h
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
#define SLEEP_LED_GPT_DRIVER GPTD1
|
||||
|
|
@ -27,5 +27,7 @@
|
|||
|
||||
#define HAL_USE_SPI TRUE
|
||||
|
||||
#define HAL_USE_GPT TRUE
|
||||
|
||||
#include_next <halconf.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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define RGBLED_NUM 24
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
#define SLEEP_LED_GPT_DRIVER GPTD1
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
|
|
|
|||
|
|
@ -23,5 +23,7 @@
|
|||
|
||||
#define HAL_USE_PWM TRUE
|
||||
|
||||
#define HAL_USE_GPT TRUE
|
||||
|
||||
#include_next <halconf.h>
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue