summaryrefslogtreecommitdiffstats
path: root/keyboards/gh80_3000/keymaps/ansi_wkl
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-07-03 04:24:22 +1000
committerGitHub <noreply@github.com>2023-07-02 19:24:22 +0100
commit7ff80a57cbe57e888646c3b90e2f4f9dea977156 (patch)
tree9917aa79a37e2c51124b63af094da8a96591313c /keyboards/gh80_3000/keymaps/ansi_wkl
parent9dbad1fa5c068c42f0e948242a2f1922824fbb22 (diff)
Get rid of `USB_LED_SCROLL_LOCK` (#21405)
Diffstat (limited to 'keyboards/gh80_3000/keymaps/ansi_wkl')
-rw-r--r--keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c40
1 files changed, 23 insertions, 17 deletions
diff --git a/keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c b/keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c
index 28a34c4269..b3f2426e88 100644
--- a/keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c
+++ b/keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c
@@ -12,23 +12,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void led_set_user(uint8_t usb_led) {
+bool led_update_user(led_t led_state) {
+ if (led_state.num_lock) {
+ DDRB |= (1 << 5);
+ PORTB &= ~(1 << 5);
+ } else {
+ DDRB &= ~(1 << 5);
+ PORTB &= ~(1 << 5);
+ }
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
- DDRB |= (1 << 5); PORTB &= ~(1 << 5);
- } else {
- DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
- }
+ if (led_state.caps_lock) {
+ DDRB |= (1 << 6);
+ PORTB &= ~(1 << 6);
+ } else {
+ DDRB &= ~(1 << 6);
+ PORTB &= ~(1 << 6);
+ }
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
- DDRB |= (1 << 6); PORTB &= ~(1 << 6);
- } else {
- DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
- }
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
- DDRB |= (1 << 7); PORTB &= ~(1 << 7);
- } else {
- DDRB &= ~(1 << 7); PORTB &= ~(1 << 7);
- }
+ if (led_state.scroll_lock) {
+ DDRB |= (1 << 7);
+ PORTB &= ~(1 << 7);
+ } else {
+ DDRB &= ~(1 << 7);
+ PORTB &= ~(1 << 7);
+ }
+ return false;
}