diff options
author | Joel Challis <git@zvecr.com> | 2020-11-21 19:11:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-21 19:11:24 +0000 |
commit | 23222625c201cd960a5b4a99ee52e74d4c13bba9 (patch) | |
tree | 0fc0f24d2a60fb9e327debaca0b9fac72716487a /keyboards/toad | |
parent | 4368611bfd87a544689ed10bb4450a39314bf1a1 (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/toad')
-rw-r--r-- | keyboards/toad/config.h | 4 | ||||
-rw-r--r-- | keyboards/toad/toad.c | 17 |
2 files changed, 4 insertions, 17 deletions
diff --git a/keyboards/toad/config.h b/keyboards/toad/config.h index 5f3eb43c2b..016bd54138 100644 --- a/keyboards/toad/config.h +++ b/keyboards/toad/config.h @@ -23,6 +23,10 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B6 +#define LED_SCROLL_LOCK_PIN B5 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #ifdef BACKLIGHT_PIN diff --git a/keyboards/toad/toad.c b/keyboards/toad/toad.c index bc4db0339e..a58779507f 100644 --- a/keyboards/toad/toad.c +++ b/keyboards/toad/toad.c @@ -1,18 +1 @@ #include "toad.h" - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} |