summaryrefslogtreecommitdiffstats
path: root/keyboards/gh80_3000/keymaps
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/gh80_3000/keymaps')
-rw-r--r--keyboards/gh80_3000/keymaps/ansi_std/keymap.c28
-rw-r--r--keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c40
-rw-r--r--keyboards/gh80_3000/keymaps/default/keymap.c28
-rw-r--r--keyboards/gh80_3000/keymaps/iso_default/keymap.c28
-rw-r--r--keyboards/gh80_3000/keymaps/iso_std/keymap.c40
-rw-r--r--keyboards/gh80_3000/keymaps/iso_wkl/keymap.c40
6 files changed, 120 insertions, 84 deletions
diff --git a/keyboards/gh80_3000/keymaps/ansi_std/keymap.c b/keyboards/gh80_3000/keymaps/ansi_std/keymap.c
index f33767ca64..f99d522ead 100644
--- a/keyboards/gh80_3000/keymaps/ansi_std/keymap.c
+++ b/keyboards/gh80_3000/keymaps/ansi_std/keymap.c
@@ -12,23 +12,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
- DDRB |= (1 << 5); PORTB &= ~(1 << 5);
+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);
+ DDRB &= ~(1 << 5);
+ PORTB &= ~(1 << 5);
}
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
- DDRB |= (1 << 6); PORTB &= ~(1 << 6);
+ if (led_state.caps_lock) {
+ DDRB |= (1 << 6);
+ PORTB &= ~(1 << 6);
} else {
- DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
+ DDRB &= ~(1 << 6);
+ PORTB &= ~(1 << 6);
}
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
- DDRB |= (1 << 7); PORTB &= ~(1 << 7);
+ if (led_state.scroll_lock) {
+ DDRB |= (1 << 7);
+ PORTB &= ~(1 << 7);
} else {
- DDRB &= ~(1 << 7); PORTB &= ~(1 << 7);
+ DDRB &= ~(1 << 7);
+ PORTB &= ~(1 << 7);
}
+ return false;
}
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;
}
diff --git a/keyboards/gh80_3000/keymaps/default/keymap.c b/keyboards/gh80_3000/keymaps/default/keymap.c
index 264f20fbca..b74127fc5e 100644
--- a/keyboards/gh80_3000/keymaps/default/keymap.c
+++ b/keyboards/gh80_3000/keymaps/default/keymap.c
@@ -12,23 +12,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
- DDRB |= (1 << 5); PORTB &= ~(1 << 5);
+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);
+ DDRB &= ~(1 << 5);
+ PORTB &= ~(1 << 5);
}
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
- DDRB |= (1 << 6); PORTB &= ~(1 << 6);
+ if (led_state.caps_lock) {
+ DDRB |= (1 << 6);
+ PORTB &= ~(1 << 6);
} else {
- DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
+ DDRB &= ~(1 << 6);
+ PORTB &= ~(1 << 6);
}
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
- DDRB |= (1 << 7); PORTB &= ~(1 << 7);
+ if (led_state.scroll_lock) {
+ DDRB |= (1 << 7);
+ PORTB &= ~(1 << 7);
} else {
- DDRB &= ~(1 << 7); PORTB &= ~(1 << 7);
+ DDRB &= ~(1 << 7);
+ PORTB &= ~(1 << 7);
}
+ return false;
}
diff --git a/keyboards/gh80_3000/keymaps/iso_default/keymap.c b/keyboards/gh80_3000/keymaps/iso_default/keymap.c
index 137a6513b6..4c4b10f458 100644
--- a/keyboards/gh80_3000/keymaps/iso_default/keymap.c
+++ b/keyboards/gh80_3000/keymaps/iso_default/keymap.c
@@ -12,23 +12,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
- DDRB |= (1 << 5); PORTB &= ~(1 << 5);
+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);
+ DDRB &= ~(1 << 5);
+ PORTB &= ~(1 << 5);
}
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
- DDRB |= (1 << 6); PORTB &= ~(1 << 6);
+ if (led_state.caps_lock) {
+ DDRB |= (1 << 6);
+ PORTB &= ~(1 << 6);
} else {
- DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
+ DDRB &= ~(1 << 6);
+ PORTB &= ~(1 << 6);
}
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
- DDRB |= (1 << 7); PORTB &= ~(1 << 7);
+ if (led_state.scroll_lock) {
+ DDRB |= (1 << 7);
+ PORTB &= ~(1 << 7);
} else {
- DDRB &= ~(1 << 7); PORTB &= ~(1 << 7);
+ DDRB &= ~(1 << 7);
+ PORTB &= ~(1 << 7);
}
+ return false;
}
diff --git a/keyboards/gh80_3000/keymaps/iso_std/keymap.c b/keyboards/gh80_3000/keymaps/iso_std/keymap.c
index 434abf68f5..9559bde119 100644
--- a/keyboards/gh80_3000/keymaps/iso_std/keymap.c
+++ b/keyboards/gh80_3000/keymaps/iso_std/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;
}
diff --git a/keyboards/gh80_3000/keymaps/iso_wkl/keymap.c b/keyboards/gh80_3000/keymaps/iso_wkl/keymap.c
index f275a3e789..86054ba1fd 100644
--- a/keyboards/gh80_3000/keymaps/iso_wkl/keymap.c
+++ b/keyboards/gh80_3000/keymaps/iso_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;
}