From 23222625c201cd960a5b4a99ee52e74d4c13bba9 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 21 Nov 2020 19:11:24 +0000 Subject: Refactor to use led config - Part 5 (#10975) * Refactor to use led config * Refactor to use led config * Refactor to use led config --- keyboards/espectro/espectro.c | 61 +------------------------------------------ 1 file changed, 1 insertion(+), 60 deletions(-) (limited to 'keyboards/espectro/espectro.c') diff --git a/keyboards/espectro/espectro.c b/keyboards/espectro/espectro.c index 13030cdd41..64494c49c1 100755 --- a/keyboards/espectro/espectro.c +++ b/keyboards/espectro/espectro.c @@ -14,63 +14,4 @@ * along with this program. If not, see . */ - -#include QMK_KEYBOARD_H -#include "quantum.h" - - -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 - - led_set_user(usb_led); -} - -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - DDRB |= (1 << 0); PORTB &= ~(1 << 0); - } else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 1); PORTB &= ~(1 << 1); - } else { - DDRB &= ~(1 << 1); PORTB &= ~(1 << 1); - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - -} - +#include "espectro.h" -- cgit v1.2.3