Skip to content

Commit

Permalink
Fix AVR boards which were overriding backlight without setting… (#8044)
Browse files Browse the repository at this point in the history
* Add backlight custom driver to all boards not declaring it but overriding backlight

* Apply suggestions from code review

Co-Authored-By: fauxpark <[email protected]>

* Apply suggestions from code review

Co-Authored-By: fauxpark <[email protected]>

* Remove old tmk references from show_options.mk

Co-authored-by: fauxpark <[email protected]>
  • Loading branch information
zvecr and fauxpark committed Jan 30, 2020
1 parent 7514f51 commit 4139de3
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 34 deletions.
16 changes: 0 additions & 16 deletions keyboards/amj96/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,6 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.
/* 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

Expand Down
6 changes: 3 additions & 3 deletions keyboards/amj96/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ 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
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
Expand Down
1 change: 1 addition & 0 deletions keyboards/clueboard/17/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions keyboards/clueboard/66/rev2/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions keyboards/clueboard/66/rev3/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions keyboards/clueboard/66_hotswap/prototype/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/clueboard/card/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions keyboards/cu75/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion keyboards/duck/eagle_viper/v2/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/duck/jetfire/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/duck/lightsaver/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/duck/octagon/v1/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/duck/octagon/v2/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/duck/orion/v3/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion keyboards/kmac/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.
//#define DIODE_DIRECTION

/* number of backlight levels */
#define BACKLIGHT_LEVELS 3
//#define BACKLIGHT_LEVELS 3
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING

Expand Down
2 changes: 1 addition & 1 deletion keyboards/kmac/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion keyboards/kmini/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion keyboards/kmini/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion keyboards/lazydesigners/dimple/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions keyboards/lfkeyboards/lfk78/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/lfkeyboards/lfk87/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions keyboards/lfkeyboards/mini1800/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions show_options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 4139de3

Please sign in to comment.