From 5f2c4349543e06821d3c0b724f36e12767a04e54 Mon Sep 17 00:00:00 2001 From: kaylanm <1063516+kaylanm@users.noreply.github.com> Date: Thu, 5 Nov 2020 23:58:00 -0500 Subject: E85 backlight & LED indicator updates (#10678) * Enable in-switch backlight on e85 for VIA keymaps. Update LED indicator code for e85 hotswap/soldered PCBs. --- keyboards/exclusive/e85/config.h | 6 +++--- keyboards/exclusive/e85/hotswap/hotswap.c | 15 +++++++++++++++ keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk | 3 ++- keyboards/exclusive/e85/soldered/keymaps/via/rules.mk | 3 ++- keyboards/exclusive/e85/soldered/soldered.c | 8 +++++--- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/keyboards/exclusive/e85/config.h b/keyboards/exclusive/e85/config.h index 758cd8b78c..844c910256 100644 --- a/keyboards/exclusive/e85/config.h +++ b/keyboards/exclusive/e85/config.h @@ -52,9 +52,9 @@ along with this program. If not, see . */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 -// #define BACKLIGHT_PIN B6 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 6 #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN diff --git a/keyboards/exclusive/e85/hotswap/hotswap.c b/keyboards/exclusive/e85/hotswap/hotswap.c index a5893e6bc5..db14971dab 100644 --- a/keyboards/exclusive/e85/hotswap/hotswap.c +++ b/keyboards/exclusive/e85/hotswap/hotswap.c @@ -15,3 +15,18 @@ */ #include "hotswap.h" + +void keyboard_pre_init_kb(void) { + setPinOutput(C7); + setPinOutput(B5); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(C7, led_state.caps_lock); + writePin(B5, led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk b/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk index 29a6f75191..45681e1b1b 100644 --- a/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk +++ b/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk @@ -1,3 +1,4 @@ VIA_ENABLE = yes CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration \ No newline at end of file +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = yes diff --git a/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk b/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk index 29a6f75191..45681e1b1b 100644 --- a/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk +++ b/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk @@ -1,3 +1,4 @@ VIA_ENABLE = yes CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration \ No newline at end of file +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = yes diff --git a/keyboards/exclusive/e85/soldered/soldered.c b/keyboards/exclusive/e85/soldered/soldered.c index 0a7de55ce7..e97a543b57 100644 --- a/keyboards/exclusive/e85/soldered/soldered.c +++ b/keyboards/exclusive/e85/soldered/soldered.c @@ -17,14 +17,16 @@ #include "soldered.h" void keyboard_pre_init_kb(void) { - setPinOutput(C7); - - keyboard_pre_init_user(); + setPinOutput(C7); + setPinOutput(B5); + + keyboard_pre_init_user(); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { writePin(C7, led_state.caps_lock); + writePin(B5, led_state.scroll_lock); } return true; } -- cgit v1.2.1