summaryrefslogtreecommitdiff
path: root/keyboards/espectro
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-11-21 19:11:24 +0000
committerGitHub <noreply@github.com>2020-11-21 19:11:24 +0000
commit23222625c201cd960a5b4a99ee52e74d4c13bba9 (patch)
tree0fc0f24d2a60fb9e327debaca0b9fac72716487a /keyboards/espectro
parent4368611bfd87a544689ed10bb4450a39314bf1a1 (diff)
Refactor to use led config - Part 5 (#10975)
* Refactor to use led config * Refactor to use led config * Refactor to use led config
Diffstat (limited to 'keyboards/espectro')
-rwxr-xr-xkeyboards/espectro/config.h5
-rwxr-xr-xkeyboards/espectro/espectro.c61
2 files changed, 6 insertions, 60 deletions
diff --git a/keyboards/espectro/config.h b/keyboards/espectro/config.h
index 2736c1d880..b344c641e5 100755
--- a/keyboards/espectro/config.h
+++ b/keyboards/espectro/config.h
@@ -38,6 +38,11 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN B0
+#define LED_CAPS_LOCK_PIN B2
+#define LED_SCROLL_LOCK_PIN B1
+#define LED_PIN_ON_STATE 0
+
/* number of backlight levels */
#define BACKLIGHT_PIN B6
#define BACKLIGHT_LEVELS 5
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 <http://www.gnu.org/licenses/>.
*/
-
-#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"