summaryrefslogtreecommitdiff
path: root/keyboards/handwired
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-07-06 18:48:02 +1000
committerGitHub <noreply@github.com>2023-07-06 09:48:02 +0100
commit87b11345a55d076966846d87b60d0f315b8bb984 (patch)
treea64503358d5f30b55a722b882eebaf1b60b03e1f /keyboards/handwired
parent928e03e8d669cb35a96c2aa4a09012c527b27892 (diff)
Get rid of `USB_LED_CAPS_LOCK` (#21436)
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/frenchdev/keymaps/default/keymap.c6
-rw-r--r--keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c18
-rw-r--r--keyboards/handwired/promethium/keymaps/default/keymap.c5
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c5
4 files changed, 9 insertions, 25 deletions
diff --git a/keyboards/handwired/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c
index e5a5dcc6c1..60e355f290 100644
--- a/keyboards/handwired/frenchdev/keymaps/default/keymap.c
+++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c
@@ -351,11 +351,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void led_set_user(uint8_t usb_led) {
- if (usb_led & (1<<USB_LED_CAPS_LOCK)){
+bool led_update_user(led_t led_state) {
+ if (led_state.caps_lock){
frenchdev_led_3_on();
} else {
frenchdev_led_3_off();
}
- return ;
+ return false;
}
diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c
index f617fb5e68..f54ceb4491 100644
--- a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c
+++ b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c
@@ -67,24 +67,6 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}
bool oled_task_user(void) {
- // Host Keyboard Layer Status
- /*oled_write_P(PSTR("Lyr: "), false);
- switch (get_highest_layer(layer_state)) {
- case 0:
- oled_write_P(PSTR("Alpha\n"), false);
- break;
- case 1:
- oled_write_P(PSTR("FN\n"), false);
- break;
- default:
- // Or use the write_ln shortcut over adding '\n' to the end of your string
- oled_write_ln_P(PSTR("Undefined"), false);
- }
-
- uint8_t led_usb_state = host_keyboard_leds();
- oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
- */
-
static const char PROGMEM qmk_logo[] = {
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c
index 42819245c7..ff73e51d5e 100644
--- a/keyboards/handwired/promethium/keymaps/default/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/default/keymap.c
@@ -1303,8 +1303,8 @@ void turn_off_capslock(void) {
rgbsps_send();
}
- void led_set_user(uint8_t usb_led) {
- bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK);
+ bool led_update_user(led_t led_state) {
+ bool new_capslock = led_state.caps_lock;
if (new_capslock ^ capslock) { // capslock state is different
if ((capslock = new_capslock)) {
rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK);
@@ -1313,6 +1313,7 @@ void turn_off_capslock(void) {
}
rgbsps_send();
}
+ return false;
}
#endif
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
index 203a0eda22..37cff59cb1 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -1306,8 +1306,8 @@ void turn_off_capslock(void) {
rgbsps_send();
}
- void led_set_user(uint8_t usb_led) {
- bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK);
+ bool led_update_user(led_t led_state) {
+ bool new_capslock = led_state.caps_lock;
if (new_capslock ^ capslock) { // capslock state is different
if ((capslock = new_capslock)) {
rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK);
@@ -1316,6 +1316,7 @@ void turn_off_capslock(void) {
}
rgbsps_send();
}
+ return false;
}
#endif