summaryrefslogtreecommitdiff
path: root/keyboards/kbdfans/kbd8x/kbd8x.h
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-11-17 17:06:23 +0000
committerGitHub <noreply@github.com>2020-11-17 17:06:23 +0000
commitadfd34c4512f6215a49a8f705ce408d6c82fb8cc (patch)
tree8906980e1e581609db99856c449395afece1709e /keyboards/kbdfans/kbd8x/kbd8x.h
parent3c156e130b3e7a24166eb20bf862aaaac8ceff53 (diff)
Refactor to use led config - Part 2 (#10906)
* Refactor to use led config * Refactor to use led config * Refactor to use led config
Diffstat (limited to 'keyboards/kbdfans/kbd8x/kbd8x.h')
-rw-r--r--keyboards/kbdfans/kbd8x/kbd8x.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/keyboards/kbdfans/kbd8x/kbd8x.h b/keyboards/kbdfans/kbd8x/kbd8x.h
index f28b8ca7a1..4433722c5a 100644
--- a/keyboards/kbdfans/kbd8x/kbd8x.h
+++ b/keyboards/kbdfans/kbd8x/kbd8x.h
@@ -19,15 +19,14 @@
#include "led.h"
// Functions for setting LEDs on toggle keys
-inline void caps_led_on(void) { DDRB |= (1<<3); PORTB &= ~(1<<3); }
-inline void caps_led_off(void) { DDRB &= ~(1<<3); PORTB &= ~(1<<3); }
+inline void caps_led_on(void) { writePinHigh(LED_CAPS_LOCK_PIN); }
+inline void caps_led_off(void) { writePinLow(LED_CAPS_LOCK_PIN); }
-inline void num_led_on(void) { DDRB |= (1<<1); PORTB &= ~(1<<1); }
-inline void num_led_off(void) { DDRB &= ~(1<<1); PORTB &= ~(1<<1); }
-
-inline void scroll_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); }
-inline void scroll_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }
+inline void num_led_on(void) { writePinHigh(LED_NUM_LOCK_PIN); }
+inline void num_led_off(void) { writePinLow(LED_NUM_LOCK_PIN); }
+inline void scroll_led_on(void) { writePinHigh(LED_SCROLL_LOCK_PIN); }
+inline void scroll_led_off(void) { writePinLow(LED_SCROLL_LOCK_PIN); }
// LAYOUT depicting all possible switch positions.
// LAYOUT_all supports ISO, split backspace and split left/right shift.