Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BACKLIGHT_CAPS_LOCK warning #15999

Merged
merged 2 commits into from
Jan 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions quantum/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down