summaryrefslogtreecommitdiff
path: root/keyboards/handwired/arrow_pad
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-07-03 04:35:41 +1000
committerGitHub <noreply@github.com>2023-07-02 19:35:41 +0100
commit9ab16e62f75dc6228549ec0aba00ec0704bbc779 (patch)
tree1a9d2e4ea291b6d8e25bd13f6b68c5c30a709f06 /keyboards/handwired/arrow_pad
parent7ff80a57cbe57e888646c3b90e2f4f9dea977156 (diff)
Get rid of `USB_LED_NUM_LOCK` (#21424)
Diffstat (limited to 'keyboards/handwired/arrow_pad')
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/default/keymap.c7
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c7
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c7
3 files changed, 12 insertions, 9 deletions
diff --git a/keyboards/handwired/arrow_pad/keymaps/default/keymap.c b/keyboards/handwired/arrow_pad/keymaps/default/keymap.c
index cecaefe80d..820851f803 100644
--- a/keyboards/handwired/arrow_pad/keymaps/default/keymap.c
+++ b/keyboards/handwired/arrow_pad/keymaps/default/keymap.c
@@ -96,9 +96,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t * record) {
return true;
}
-void led_set_user(uint8_t usb_led)
+bool led_update_user(led_t led_state)
{
- if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ if (led_state.caps_lock) {
// output high
DDRD |= (1<<6);
PORTD |= (1<<6);
@@ -107,7 +107,7 @@ void led_set_user(uint8_t usb_led)
DDRD &= ~(1<<6);
PORTD &= ~(1<<6);
}
- if (usb_led & (1<<USB_LED_NUM_LOCK)) {
+ if (led_state.num_lock) {
// output low
DDRC |= (1<<7);
PORTC |= ~(1<<7);
@@ -116,4 +116,5 @@ void led_set_user(uint8_t usb_led)
DDRC &= ~(1<<7);
PORTC &= ~(1<<7);
}
+ return false;
}
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c b/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c
index cf291c00cf..c3ab462ce3 100644
--- a/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c
@@ -109,9 +109,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t * record) {
return true;
}
-void led_set_user(uint8_t usb_led)
+bool led_update_user(led_t led_state)
{
- if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ if (led_state.caps_lock) {
// output high
DDRD |= (1<<6);
PORTD |= (1<<6);
@@ -120,7 +120,7 @@ void led_set_user(uint8_t usb_led)
DDRD &= ~(1<<6);
PORTD &= ~(1<<6);
}
- if (usb_led & (1<<USB_LED_NUM_LOCK)) {
+ if (led_state.num_lock) {
// output low
DDRC |= (1<<7);
PORTC |= ~(1<<7);
@@ -129,4 +129,5 @@ void led_set_user(uint8_t usb_led)
DDRC &= ~(1<<7);
PORTC &= ~(1<<7);
}
+ return false;
}
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c b/keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c
index b69d49b7e5..fc044a0e1a 100644
--- a/keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c
@@ -96,9 +96,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t * record) {
return true;
}
-void led_set_user(uint8_t usb_led)
+bool led_update_user(led_t led_state)
{
- if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ if (led_state.caps_lock) {
// output high
DDRD |= (1<<6);
PORTD |= (1<<6);
@@ -107,7 +107,7 @@ void led_set_user(uint8_t usb_led)
DDRD &= ~(1<<6);
PORTD &= ~(1<<6);
}
- if (usb_led & (1<<USB_LED_NUM_LOCK)) {
+ if (led_state.num_lock) {
// output low
DDRC |= (1<<7);
PORTC |= ~(1<<7);
@@ -116,4 +116,5 @@ void led_set_user(uint8_t usb_led)
DDRC &= ~(1<<7);
PORTC &= ~(1<<7);
}
+ return false;
}