From 64263bbb0255df756dc30467ee6643054d325597 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 29 Dec 2019 11:16:24 -0800 Subject: [Keyboard] Orion Locking Indicator LED Support (#7683) * add indicator lighting support thanks to Keebology tracing * set the correct number of underglow LEDs * add comments and skeletal structure for layer indicator LEDs * add backlight areas pins * update readme * we can't turn leds on based on zones, so we use multiple backlight pin support instead to turn them ALL on and control them. * add comments to backlight setting * make a more useful default keymap that can also be used for testing * add duck orion to list * add indicator led support * update readme * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * add the appropriate header files * fix indent so Drashna will not die * Update keyboards/duck/orion/v3/v3.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/duck/orion/v3/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/duck/orion/v3/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/duck/orion/v3/readme.md Co-Authored-By: fauxpark * Update keyboards/duck/orion/v3/readme.md Co-Authored-By: fauxpark * Update keyboards/duck/orion/v3/readme.md Co-Authored-By: fauxpark Co-authored-by: Drashna Jaelre Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: fauxpark --- keyboards/duck/orion/v3/matrix.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'keyboards/duck/orion/v3/matrix.c') diff --git a/keyboards/duck/orion/v3/matrix.c b/keyboards/duck/orion/v3/matrix.c index 3c3240b9f..f93c7a9cd 100644 --- a/keyboards/duck/orion/v3/matrix.c +++ b/keyboards/duck/orion/v3/matrix.c @@ -14,13 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include -#include -#include -#include "matrix.h" -#include "util.h" -#include "print.h" -#include "debug.h" +#include "quantum.h" static uint8_t debouncing = DEBOUNCE; @@ -54,18 +48,23 @@ void matrix_scan_user(void) { void backlight_init_ports(void) { - DDRD |= 0b11010000; - PORTD &= ~0b01010000; - PORTD |= 0b10000000; - DDRB |= 0b00011111; - PORTB &= ~0b00001110; - PORTB |= 0b00010001; - DDRE |= 0b01000000; - PORTE &= ~0b01000000; + +} + +void indicator_init_ports(void) { + + // Num LED + setPinOutput(B4); + + // Caps Lock + setPinOutput(B0); + + // Scroll Lock + setPinOutput(D7); } void matrix_init(void) { - backlight_init_ports(); + indicator_init_ports(); unselect_cols(); init_rows(); -- cgit v1.2.3