From 2e521b509ce0c853b2e62d1d16e0117b900ab9c2 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Mon, 9 Sep 2019 22:03:33 -0700 Subject: [Keyboard] Added a simple 2x5 Keypad with 4 layers (#6699) * Added new 2x5 Keypad with 3 LEDs to indicate the selected layer. By Jonathan Cameron. * Minor refactor from suggestions from qmk team * Added * Moved to 'handwired' directory * Update readme.md * Update readme.md * Update readme.md * Update keyboards/handwired/2x5keypad/readme.md Co-Authored-By: fauxpark * Switch to image offsite * Moved image offsite * Update keyboards/handwired/2x5keypad/keymaps/default/keymap.h Co-Authored-By: fauxpark * Update keyboards/handwired/2x5keypad/2x5keypad.h Co-Authored-By: fauxpark * Moved functions into .c file per suggestions * Cosmetic * Fixed function called, per suggestions. * Update keyboards/handwired/2x5keypad/2x5keypad.h Ok Co-Authored-By: fauxpark * Moved LED functions to the top level since they can be used it various flavors * Declare those moved LED functions! * Update keyboards/handwired/2x5keypad/config.h Co-Authored-By: Drashna Jaelre --- keyboards/handwired/2x5keypad/2x5keypad.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 keyboards/handwired/2x5keypad/2x5keypad.c (limited to 'keyboards/handwired/2x5keypad/2x5keypad.c') diff --git a/keyboards/handwired/2x5keypad/2x5keypad.c b/keyboards/handwired/2x5keypad/2x5keypad.c new file mode 100644 index 0000000000..873c579a17 --- /dev/null +++ b/keyboards/handwired/2x5keypad/2x5keypad.c @@ -0,0 +1,25 @@ +#include "2x5keypad.h" + + +void matrix_init_kb(void) +{ + matrix_init_user(); + + setPinOutput(RED_LED); + setPinOutput(BLUE_LED); + setPinOutput(GREEN_LED); +} + + + +void turn_off_leds(void) +{ + writePinLow(RED_LED); + writePinLow(BLUE_LED); + writePinLow(GREEN_LED); +} + +void turn_on_led(pin_t pin) +{ + writePinHigh(pin); +} -- cgit v1.2.3