diff options
| author | Joel Challis <git@zvecr.com> | 2022-01-22 23:11:42 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-22 23:11:42 +0000 |
| commit | eddd1c05674ce48dd5db0d7da996a4da2ecd705a (patch) | |
| tree | 94700cd5e9c97c31733ee6c6566d087861f2ed8a | |
| parent | 6e83b449409f7fe479210a9fab808e8bcae64977 (diff) | |
Fix BACKLIGHT_CAPS_LOCK warning (#15999)
* Fix BACKLIGHT_CAPS_LOCK warning
* align defs
| -rw-r--r-- | quantum/led.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/quantum/led.c b/quantum/led.c index 7ee67b55e6..68494af3c2 100644 --- a/quantum/led.c +++ b/quantum/led.c | |||
| @@ -17,19 +17,21 @@ | |||
| 17 | #include "host.h" | 17 | #include "host.h" |
| 18 | #include "debug.h" | 18 | #include "debug.h" |
| 19 | 19 | ||
| 20 | #ifdef BACKLIGHT_ENABLE | 20 | #ifdef BACKLIGHT_CAPS_LOCK |
| 21 | # include "backlight.h" | 21 | # ifdef BACKLIGHT_ENABLE |
| 22 | # include "backlight.h" | ||
| 22 | extern backlight_config_t backlight_config; | 23 | extern backlight_config_t backlight_config; |
| 23 | #else | 24 | # else |
| 24 | # pragma message "Cannot use BACKLIGHT_CAPS_LOCK without backlight being enabled" | 25 | # pragma message "Cannot use BACKLIGHT_CAPS_LOCK without backlight being enabled" |
| 25 | # undef BACKLIGHT_CAPS_LOCK | 26 | # undef BACKLIGHT_CAPS_LOCK |
| 27 | # endif | ||
| 26 | #endif | 28 | #endif |
| 27 | 29 | ||
| 28 | #ifndef LED_PIN_ON_STATE | 30 | #ifndef LED_PIN_ON_STATE |
| 29 | # define LED_PIN_ON_STATE 1 | 31 | # define LED_PIN_ON_STATE 1 |
| 30 | #endif | 32 | #endif |
| 31 | 33 | ||
| 32 | #if defined(BACKLIGHT_CAPS_LOCK) | 34 | #ifdef BACKLIGHT_CAPS_LOCK |
| 33 | /** \brief Caps Lock indicator using backlight (for keyboards without dedicated LED) | 35 | /** \brief Caps Lock indicator using backlight (for keyboards without dedicated LED) |
| 34 | */ | 36 | */ |
| 35 | static void handle_backlight_caps_lock(led_t led_state) { | 37 | static void handle_backlight_caps_lock(led_t led_state) { |
