diff options
author | Joel Challis <git@zvecr.com> | 2020-11-18 17:51:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 17:51:53 +0000 |
commit | f00402a2f3d551bcb1fb87245238e2b392192eb5 (patch) | |
tree | aad0bdc88a3fae31ac58cfdd62d99bac06dc67d0 /keyboards/hineybush/hineyg80 | |
parent | e1e13c53acb24c3617c3de88fa401acb3d628074 (diff) |
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
Diffstat (limited to 'keyboards/hineybush/hineyg80')
-rw-r--r-- | keyboards/hineybush/hineyg80/config.h | 5 | ||||
-rw-r--r-- | keyboards/hineybush/hineyg80/hineyg80.c | 47 |
2 files changed, 5 insertions, 47 deletions
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 <http://www.gnu.org/licenses/>. */ #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); -} |