From f00402a2f3d551bcb1fb87245238e2b392192eb5 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 18 Nov 2020 17:51:53 +0000 Subject: Refactor to use led config - Part 3 (#10966) * Refactor to use led config * Refactor to use led config * Refactor to use led config * Refactor to use led config --- keyboards/hineybush/hineyg80/config.h | 5 ++++ keyboards/hineybush/hineyg80/hineyg80.c | 47 --------------------------------- 2 files changed, 5 insertions(+), 47 deletions(-) (limited to 'keyboards/hineybush/hineyg80') diff --git a/keyboards/hineybush/hineyg80/config.h b/keyboards/hineybush/hineyg80/config.h index 4072def2fb..81bf622722 100644 --- a/keyboards/hineybush/hineyg80/config.h +++ b/keyboards/hineybush/hineyg80/config.h @@ -22,6 +22,11 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW + +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN B6 +#define LED_SCROLL_LOCK_PIN B5 + /* number of backlight levels */ #ifdef BACKLIGHT_PIN diff --git a/keyboards/hineybush/hineyg80/hineyg80.c b/keyboards/hineybush/hineyg80/hineyg80.c index 236c646be7..a56e46e9de 100644 --- a/keyboards/hineybush/hineyg80/hineyg80.c +++ b/keyboards/hineybush/hineyg80/hineyg80.c @@ -14,50 +14,3 @@ * along with this program. If not, see . */ #include "hineyg80.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - // Turn numlock on - writePinHigh(C6); - } else { - // Turn numlock off - writePinLow(C6); - } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - // Turn capslock on - writePinHigh(B6); - } else { - // Turn capslock off - writePinLow(B6); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - // Turn scrolllock on - writePinHigh(B5); - } else { - // Turn scrolllock off - writePinLow(B5); - } - led_set_user(usb_led); -} -- cgit v1.2.3