From 330d373bda426479d22852966cc69071bf3a139c Mon Sep 17 00:00:00 2001 From: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Thu, 30 Jul 2020 01:37:34 -0700 Subject: [PATCH 1/6] updated via keymap, reduced eeprom usage --- keyboards/metamechs/timberwolf/config.h | 2 +- keyboards/metamechs/timberwolf/keymaps/via/keymap.c | 10 +++++----- keyboards/metamechs/timberwolf/rules.mk | 1 + keyboards/metamechs/timberwolf/timberwolf.c | 11 +++++++---- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/keyboards/metamechs/timberwolf/config.h b/keyboards/metamechs/timberwolf/config.h index 8c92e2283d12..c6e0a8fe3d8d 100644 --- a/keyboards/metamechs/timberwolf/config.h +++ b/keyboards/metamechs/timberwolf/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . /* Backlighting code used for caps lock indicator */ #define BACKLIGHT_PIN C6 -#define BACKLIGHT_LEVELS 9 +#define BACKLIGHT_LEVELS 16 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ // #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c index 57614bd7a7b1..e19d3bbae777 100644 --- a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c @@ -19,10 +19,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [0] = LAYOUT_all( KC_MUTE,KC_ESC ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_INS ,KC_HOME,KC_PGUP, - RESET ,KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS,KC_EQL ,K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_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ + _______,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ ), [2] = LAYOUT_all( _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, diff --git a/keyboards/metamechs/timberwolf/rules.mk b/keyboards/metamechs/timberwolf/rules.mk index 240f806a6d9a..b8288ca787c4 100644 --- a/keyboards/metamechs/timberwolf/rules.mk +++ b/keyboards/metamechs/timberwolf/rules.mk @@ -31,5 +31,6 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs ENCODER_ENABLE = yes # Enable encoder support +LINK_TIME_OPTIMIZATION_ENABLE = yes BACKLIGHT_DRIVER = pwm \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/timberwolf.c b/keyboards/metamechs/timberwolf/timberwolf.c index c3fb24924bae..64a61ab84b94 100644 --- a/keyboards/metamechs/timberwolf/timberwolf.c +++ b/keyboards/metamechs/timberwolf/timberwolf.c @@ -16,12 +16,15 @@ #include "timberwolf.h" + bool led_update_kb(led_t led_state) { bool runDefault = led_update_user(led_state); - if (led_state.caps_lock) { - backlight_enable(); - } else { - backlight_disable(); + if(runDefault) { + if (led_state.caps_lock) { + backlight_level_noeeprom(get_backlight_level()); + } else { + backlight_set(0); + } } return runDefault; } \ No newline at end of file From 087be12d90a32a4ebc772217fb79afd170d907e0 Mon Sep 17 00:00:00 2001 From: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Thu, 30 Jul 2020 04:12:32 -0700 Subject: [PATCH 2/6] Update keyboards/metamechs/timberwolf/rules.mk Co-authored-by: Ryan --- keyboards/metamechs/timberwolf/rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/metamechs/timberwolf/rules.mk b/keyboards/metamechs/timberwolf/rules.mk index b8288ca787c4..85c771c23912 100644 --- a/keyboards/metamechs/timberwolf/rules.mk +++ b/keyboards/metamechs/timberwolf/rules.mk @@ -31,6 +31,6 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs ENCODER_ENABLE = yes # Enable encoder support -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes -BACKLIGHT_DRIVER = pwm \ No newline at end of file +BACKLIGHT_DRIVER = pwm From 417581c4a18ba3f303f4ade8dbc6e99aa873a36c Mon Sep 17 00:00:00 2001 From: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Thu, 30 Jul 2020 04:12:38 -0700 Subject: [PATCH 3/6] Update keyboards/metamechs/timberwolf/rules.mk Co-authored-by: Ryan --- keyboards/metamechs/timberwolf/rules.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/metamechs/timberwolf/rules.mk b/keyboards/metamechs/timberwolf/rules.mk index 85c771c23912..c97230047850 100644 --- a/keyboards/metamechs/timberwolf/rules.mk +++ b/keyboards/metamechs/timberwolf/rules.mk @@ -28,8 +28,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs ENCODER_ENABLE = yes # Enable encoder support LTO_ENABLE = yes From 1fb097800796117ab68032d68522fa7e3a1ba026 Mon Sep 17 00:00:00 2001 From: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Thu, 30 Jul 2020 04:12:47 -0700 Subject: [PATCH 4/6] Update keyboards/metamechs/timberwolf/timberwolf.c Co-authored-by: Ryan --- keyboards/metamechs/timberwolf/timberwolf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/metamechs/timberwolf/timberwolf.c b/keyboards/metamechs/timberwolf/timberwolf.c index 64a61ab84b94..77a3411ac1a4 100644 --- a/keyboards/metamechs/timberwolf/timberwolf.c +++ b/keyboards/metamechs/timberwolf/timberwolf.c @@ -16,7 +16,6 @@ #include "timberwolf.h" - bool led_update_kb(led_t led_state) { bool runDefault = led_update_user(led_state); if(runDefault) { @@ -27,4 +26,4 @@ bool led_update_kb(led_t led_state) { } } return runDefault; -} \ No newline at end of file +} From 6c598226d0b784a30238d93dc725661a7977bf0b Mon Sep 17 00:00:00 2001 From: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Thu, 30 Jul 2020 04:13:11 -0700 Subject: [PATCH 5/6] Update keyboards/metamechs/timberwolf/timberwolf.c Co-authored-by: Ryan --- keyboards/metamechs/timberwolf/timberwolf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/metamechs/timberwolf/timberwolf.c b/keyboards/metamechs/timberwolf/timberwolf.c index 77a3411ac1a4..c9a750f45c9e 100644 --- a/keyboards/metamechs/timberwolf/timberwolf.c +++ b/keyboards/metamechs/timberwolf/timberwolf.c @@ -18,12 +18,12 @@ bool led_update_kb(led_t led_state) { bool runDefault = led_update_user(led_state); - if(runDefault) { - if (led_state.caps_lock) { - backlight_level_noeeprom(get_backlight_level()); - } else { - backlight_set(0); - } - } + if(runDefault) { + if (led_state.caps_lock) { + backlight_level_noeeprom(get_backlight_level()); + } else { + backlight_set(0); + } + } return runDefault; } From be9be2f3bc96055770f34263efae3040ebd0098d Mon Sep 17 00:00:00 2001 From: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Thu, 30 Jul 2020 04:46:06 -0700 Subject: [PATCH 6/6] Update keyboards/metamechs/timberwolf/rules.mk Co-authored-by: Ryan --- keyboards/metamechs/timberwolf/rules.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/keyboards/metamechs/timberwolf/rules.mk b/keyboards/metamechs/timberwolf/rules.mk index c97230047850..d6da3177415e 100644 --- a/keyboards/metamechs/timberwolf/rules.mk +++ b/keyboards/metamechs/timberwolf/rules.mk @@ -25,9 +25,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes # Enable encoder support LTO_ENABLE = yes