summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-01-22 23:11:42 +0000
committerGitHub <noreply@github.com>2022-01-22 23:11:42 +0000
commiteddd1c05674ce48dd5db0d7da996a4da2ecd705a (patch)
tree94700cd5e9c97c31733ee6c6566d087861f2ed8a
parent6e83b449409f7fe479210a9fab808e8bcae64977 (diff)
Fix BACKLIGHT_CAPS_LOCK warning (#15999)
* Fix BACKLIGHT_CAPS_LOCK warning * align defs
-rw-r--r--quantum/led.c14
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 @@
#include "host.h"
#include "debug.h"
-#ifdef BACKLIGHT_ENABLE
-# include "backlight.h"
+#ifdef BACKLIGHT_CAPS_LOCK
+# ifdef BACKLIGHT_ENABLE
+# include "backlight.h"
extern backlight_config_t backlight_config;
-#else
-# pragma message "Cannot use BACKLIGHT_CAPS_LOCK without backlight being enabled"
-# undef BACKLIGHT_CAPS_LOCK
+# else
+# pragma message "Cannot use BACKLIGHT_CAPS_LOCK without backlight being enabled"
+# undef BACKLIGHT_CAPS_LOCK
+# endif
#endif
#ifndef LED_PIN_ON_STATE
# define LED_PIN_ON_STATE 1
#endif
-#if defined(BACKLIGHT_CAPS_LOCK)
+#ifdef BACKLIGHT_CAPS_LOCK
/** \brief Caps Lock indicator using backlight (for keyboards without dedicated LED)
*/
static void handle_backlight_caps_lock(led_t led_state) {