From 4139de3cc9c56a157d78e1e418893d08e3f23bde Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 30 Jan 2020 23:44:40 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20AVR=20boards=20which=20were=20overriding?= =?UTF-8?q?=20backlight=20without=20setting=E2=80=A6=20(#8044)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add backlight custom driver to all boards not declaring it but overriding backlight * Apply suggestions from code review Co-Authored-By: fauxpark * Apply suggestions from code review Co-Authored-By: fauxpark * Remove old tmk references from show_options.mk Co-authored-by: fauxpark --- keyboards/amj96/config.h | 16 ---------------- keyboards/amj96/rules.mk | 6 +++--- keyboards/clueboard/17/rules.mk | 1 + keyboards/clueboard/66/rev2/rules.mk | 1 + keyboards/clueboard/66/rev3/rules.mk | 1 + .../clueboard/66_hotswap/prototype/rules.mk | 1 + keyboards/clueboard/card/rules.mk | 3 ++- keyboards/cu75/rules.mk | 5 +++++ keyboards/duck/eagle_viper/v2/rules.mk | 3 ++- keyboards/duck/jetfire/rules.mk | 3 ++- keyboards/duck/lightsaver/rules.mk | 3 ++- keyboards/duck/octagon/v1/rules.mk | 3 ++- keyboards/duck/octagon/v2/rules.mk | 3 ++- keyboards/duck/orion/v3/rules.mk | 3 ++- keyboards/kmac/config.h | 2 +- keyboards/kmac/rules.mk | 2 +- keyboards/kmini/config.h | 2 +- keyboards/kmini/rules.mk | 2 +- keyboards/lazydesigners/dimple/rules.mk | 2 +- keyboards/lfkeyboards/lfk78/rules.mk | 1 + keyboards/lfkeyboards/lfk87/rules.mk | 3 ++- keyboards/lfkeyboards/mini1800/rules.mk | 5 +++++ show_options.mk | 2 -- 23 files changed, 39 insertions(+), 34 deletions(-) diff --git a/keyboards/amj96/config.h b/keyboards/amj96/config.h index 1f1be03ce298dc8ba8e7e61804739832375988d6..8b56aaf7f87e88e11e3ec7eb16db9a0b8152133c 100644 --- a/keyboards/amj96/config.h +++ b/keyboards/amj96/config.h @@ -47,22 +47,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -// #define BACKLIGHT_PIN D4 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - -/* number of backlight levels */ -#ifdef BREATHING_LED_ENABLE -#ifdef FADING_LED_ENABLE -#define BACKLIGHT_LEVELS 8 -#else -#define BACKLIGHT_LEVELS 6 -#endif -#else -#define BACKLIGHT_LEVELS 3 -#endif -#define BACKLIGHT_CUSTOM - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/amj96/rules.mk b/keyboards/amj96/rules.mk index e6838d71957f762ece21e2dc603e7a0b50fc8206..4fd85850962099b472eb1f4570ae11d2e5382fe1 100644 --- a/keyboards/amj96/rules.mk +++ b/keyboards/amj96/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,8 +22,8 @@ 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 = 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 on B7 by default +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode diff --git a/keyboards/clueboard/17/rules.mk b/keyboards/clueboard/17/rules.mk index d70fd8f85a9b80087cf167955c8e29773767d178..703bf3d2db40570510151024c3689d843b008049 100644 --- a/keyboards/clueboard/17/rules.mk +++ b/keyboards/clueboard/17/rules.mk @@ -19,6 +19,7 @@ CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode diff --git a/keyboards/clueboard/66/rev2/rules.mk b/keyboards/clueboard/66/rev2/rules.mk index 6917c0f06895157f7e87a1ffb3a99dd2be7902f7..16d9251d6aa7ea4bae6fcb6ead05396e6f4d2bb2 100644 --- a/keyboards/clueboard/66/rev2/rules.mk +++ b/keyboards/clueboard/66/rev2/rules.mk @@ -13,6 +13,7 @@ BOOTLOADER = atmel-dfu # Build Options BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/clueboard/66/rev3/rules.mk b/keyboards/clueboard/66/rev3/rules.mk index 28f497ec3af20eeb009c749e6847e5c2fce5043e..55f3050e357cf4bfb304891194b4c60d9eeb98cc 100644 --- a/keyboards/clueboard/66/rev3/rules.mk +++ b/keyboards/clueboard/66/rev3/rules.mk @@ -15,6 +15,7 @@ BOOTLOADER = atmel-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/clueboard/66_hotswap/prototype/rules.mk b/keyboards/clueboard/66_hotswap/prototype/rules.mk index 0a2a734cf5bf53d696371b70bcf78c4d394efae7..7f5afcf73e44ea6acd4a614369d68ea69294e3f7 100644 --- a/keyboards/clueboard/66_hotswap/prototype/rules.mk +++ b/keyboards/clueboard/66_hotswap/prototype/rules.mk @@ -15,6 +15,7 @@ BOOTLOADER = atmel-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes diff --git a/keyboards/clueboard/card/rules.mk b/keyboards/clueboard/card/rules.mk index 65f2c8fa395d551f9bbe3bfc16b3306b1c72f5cd..37d1d866efea215c0680ae7dd2a5906e481e78a0 100644 --- a/keyboards/clueboard/card/rules.mk +++ b/keyboards/clueboard/card/rules.mk @@ -19,7 +19,8 @@ CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # USB Nkey Rollover RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/cu75/rules.mk b/keyboards/cu75/rules.mk index 697d8d18f23ac144b35990ab4c09e0587694bbd6..1eb9cf8f76fd6330e1fb826c6b7a18392f7f4fc7 100644 --- a/keyboards/cu75/rules.mk +++ b/keyboards/cu75/rules.mk @@ -11,4 +11,9 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu +# Build Options +# change yes to no to disable +# +BACKLIGHT_DRIVER = custom + SRC = ../lfkeyboards/TWIlib.c ../lfkeyboards/issi.c ../lfkeyboards/lighting.c diff --git a/keyboards/duck/eagle_viper/v2/rules.mk b/keyboards/duck/eagle_viper/v2/rules.mk index 71d318946efd9ffeba6f02bbd99ff3983f4bd54b..a8c804e52c4263e7bc8c34c3fb778618c18a6658 100644 --- a/keyboards/duck/eagle_viper/v2/rules.mk +++ b/keyboards/duck/eagle_viper/v2/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration 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 on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk index b51285bd4f6ce6082278bc2a505e237611529bfd..09a5d1eccf9d52ed33a8b1a8fe7d3ad6331d963e 100644 --- a/keyboards/duck/jetfire/rules.mk +++ b/keyboards/duck/jetfire/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration 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 = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode diff --git a/keyboards/duck/lightsaver/rules.mk b/keyboards/duck/lightsaver/rules.mk index 8f2589139fcc3d103e1599081b09c4e991359b5c..64e18c9b11dd681bdb8936d8e74e22b15580d2f3 100644 --- a/keyboards/duck/lightsaver/rules.mk +++ b/keyboards/duck/lightsaver/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration 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 on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/duck/octagon/v1/rules.mk b/keyboards/duck/octagon/v1/rules.mk index a750a8f006921ebd8236e3ef409f0a92461e7285..4a8191fa61405e92a3e22eacf53f167a9ccd6e4c 100644 --- a/keyboards/duck/octagon/v1/rules.mk +++ b/keyboards/duck/octagon/v1/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration 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 on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/duck/octagon/v2/rules.mk b/keyboards/duck/octagon/v2/rules.mk index 0b2b1244450e7e82b945cc1dac3603e49b801795..49f3f12f52deafe60a3a1690845794eb6e598a90 100644 --- a/keyboards/duck/octagon/v2/rules.mk +++ b/keyboards/duck/octagon/v2/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration 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 on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/duck/orion/v3/rules.mk b/keyboards/duck/orion/v3/rules.mk index 7463d7da457635aec3d72872ecc9f35da376561d..019dd7dd3dfc3eadaae027b2ea3ad62fab917201 100644 --- a/keyboards/duck/orion/v3/rules.mk +++ b/keyboards/duck/orion/v3/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration 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 on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index 652263d2b76f789350898db82a9bccae24ac4523..b2c7f4d441d4b91dda5c40215d1ea4cf7073bdb4 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . //#define DIODE_DIRECTION /* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/kmac/rules.mk b/keyboards/kmac/rules.mk index c36191eb662ed7e99a65e59586d273116f98867a..beda52398cf13a2b76b06462d60bf0ef4c1160da 100644 --- a/keyboards/kmac/rules.mk +++ b/keyboards/kmac/rules.mk @@ -27,7 +27,7 @@ CUSTOM_MATRIX = yes # Custom matrix file 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kmini/config.h b/keyboards/kmini/config.h index b5460c9dea169fea222843922e72de9259c93784..6224a739ef72e78f0c89c49cf6d967cc50a3bd0b 100755 --- a/keyboards/kmini/config.h +++ b/keyboards/kmini/config.h @@ -43,7 +43,7 @@ //#define DIODE_DIRECTION /* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/kmini/rules.mk b/keyboards/kmini/rules.mk index 740dae2d23f08e8ef6d68ee230e6f56355074a1e..076770a0a05419593557239e05049e8dc373960b 100755 --- a/keyboards/kmini/rules.mk +++ b/keyboards/kmini/rules.mk @@ -27,7 +27,7 @@ CUSTOM_MATRIX = yes # Custom matrix file 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/lazydesigners/dimple/rules.mk b/keyboards/lazydesigners/dimple/rules.mk index d369613ead8a3a7853f2149f4ea873a1d35d605e..395cd8e9a6e28f4576e640fdd709f5ace349406c 100644 --- a/keyboards/lazydesigners/dimple/rules.mk +++ b/keyboards/lazydesigners/dimple/rules.mk @@ -18,5 +18,5 @@ BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/lfkeyboards/lfk78/rules.mk b/keyboards/lfkeyboards/lfk78/rules.mk index 3af30211e9f556e5c92b87b6b06c720d4552fa66..74a1f79897f85676f0cc5f03dcb86ca23f1fb77c 100644 --- a/keyboards/lfkeyboards/lfk78/rules.mk +++ b/keyboards/lfkeyboards/lfk78/rules.mk @@ -26,6 +26,7 @@ CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/lfkeyboards/lfk87/rules.mk b/keyboards/lfkeyboards/lfk87/rules.mk index b322bdf56293f9b5e9d983a45d7507638edd8785..dc6fa376aa6c27ccb8a2efcbf5e1f23e6bc30e6b 100644 --- a/keyboards/lfkeyboards/lfk87/rules.mk +++ b/keyboards/lfkeyboards/lfk87/rules.mk @@ -30,7 +30,8 @@ EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/lfkeyboards/mini1800/rules.mk b/keyboards/lfkeyboards/mini1800/rules.mk index d3e6a24023d6423e6b5d9c0b061cfa6a01bb3c1e..a9c29c4b91e23d12df7b785c9ca64260d569fe9f 100644 --- a/keyboards/lfkeyboards/mini1800/rules.mk +++ b/keyboards/lfkeyboards/mini1800/rules.mk @@ -21,3 +21,8 @@ SRC = TWIlib.c issi.c lighting.c ifeq ($(strip $(ISSI_ENABLE)), yes) # TMK_COMMON_DEFS += -DISSI_ENABLE endif + +# Build Options +# change yes to no to disable +# +BACKLIGHT_DRIVER = custom diff --git a/show_options.mk b/show_options.mk index b79653d5c3ff7fee4aabab85377ede45a6603eaf..63823adc7bdd5df572babb4db16f792b318b72ee 100644 --- a/show_options.mk +++ b/show_options.mk @@ -58,10 +58,8 @@ OTHER_OPTION_NAMES = \ HELIX ZINC \ ADAFRUIT_BLE_ENABLE \ AUTOLOG_ENABLE \ - BREATHING_LED_ENABLE \ DEBUG_ENABLE \ ENCODER_ENABLE_CUSTOM \ - FADING_LED_ENABLE \ GERMAN_ENABLE \ HAPTIC_ENABLE \ HHKB_RN42_ENABLE \