summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c5
-rw-r--r--keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c5
-rw-r--r--keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c5
-rw-r--r--keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c5
-rw-r--r--keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c7
-rw-r--r--keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c7
-rw-r--r--keyboards/40percentclub/ut47/led.c31
-rw-r--r--keyboards/converter/siemens_tastatur/keymaps/default/keymap.c5
-rw-r--r--keyboards/dz60/keymaps/muzfuz/keymap.c5
-rw-r--r--keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c4
-rw-r--r--keyboards/dztech/dz60rgb_ansi/keymaps/muralisc/keymap.c4
-rw-r--r--keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c5
-rw-r--r--keyboards/ergodox_ez/keymaps/smurmann/keymap.c5
-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
-rw-r--r--keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/keymap.c17
-rw-r--r--keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c6
-rw-r--r--keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c5
-rw-r--r--keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c5
-rwxr-xr-xkeyboards/kmini/keymaps/default/keymap.c5
-rw-r--r--keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c2
-rw-r--r--keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c5
-rw-r--r--keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c5
-rw-r--r--keyboards/lazydesigners/dimple/staggered/keymaps/tominabox1/keymap.c5
-rw-r--r--keyboards/lazydesigners/the50/keymaps/default/keymap.c5
-rw-r--r--keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c5
-rw-r--r--keyboards/noxary/268/keymaps/ansi/keymap.c5
-rw-r--r--keyboards/noxary/268/keymaps/default/keymap.c5
-rw-r--r--keyboards/noxary/268/keymaps/iso/keymap.c5
-rw-r--r--keyboards/noxary/268/keymaps/sixtyeight/keymap.c5
-rw-r--r--keyboards/owlab/spring/spring.c2
-rw-r--r--keyboards/percent/canoe/keymaps/boy_314/keymap.c5
-rw-r--r--keyboards/planck/keymaps/altgr/common/init.h11
-rw-r--r--keyboards/planck/keymaps/hiea/common/init.h11
-rw-r--r--keyboards/planck/keymaps/hieax/common/init.h11
-rw-r--r--keyboards/planck/keymaps/rootiest/keymap.c2
-rw-r--r--keyboards/planck/keymaps/sdothum/common/init.h11
-rw-r--r--keyboards/playkbtw/ca66/keymaps/olivia/keymap.c15
-rw-r--r--keyboards/playkbtw/pk60/keymaps/default/keymap.c5
-rw-r--r--keyboards/primekb/prime_e/keymaps/jetpacktuxedo/keymap.c5
-rw-r--r--keyboards/primekb/prime_e/keymaps/madhatter/keymap.c5
-rw-r--r--keyboards/shoc/keymaps/bongo/keymap.c2
-rw-r--r--keyboards/thevankeyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c5
-rw-r--r--keyboards/uk78/keymaps/default/keymap.c5
-rw-r--r--keyboards/uk78/keymaps/rask/keymap.c5
-rw-r--r--keyboards/v60_type_r/keymaps/followingghosts/keymap.c5
-rw-r--r--keyboards/v60_type_r/keymaps/vimouse/keymap.c5
-rw-r--r--keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c5
-rw-r--r--keyboards/work_louder/work_board/keymaps/drashna/keymap.c4
-rw-r--r--keyboards/xbows/woody/woody.c2
-rw-r--r--keyboards/xiudi/xd75/keymaps/bulbizarre/keymap.c13
-rw-r--r--layouts/community/60_ansi_arrow_split_bs_7u_spc/mrsendyyk/keymap.c5
-rw-r--r--layouts/community/ergodox/colemak_code_friendly/keymap.c8
-rw-r--r--layouts/community/ergodox/drashna/keymap.c8
-rw-r--r--layouts/community/ergodox/jjerrell/keymap.c4
-rw-r--r--layouts/community/ergodox/ordinary/keymap.c2
-rw-r--r--layouts/community/ergodox/ordinary_osx/keymap.c2
-rw-r--r--layouts/community/ergodox/osx_neo2/keymap.c7
-rw-r--r--layouts/community/ergodox/software_neo2/keymap.c2
-rw-r--r--layouts/community/ergodox/swedish-lindhe/keymap.c7
-rw-r--r--layouts/community/ortho_4x12/brandonschlack/keymap.c5
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c4
-rw-r--r--platforms/avr/sleep_led.c9
-rw-r--r--platforms/chibios/sleep_led.c11
-rw-r--r--quantum/led.c6
-rw-r--r--quantum/led.h3
-rw-r--r--users/curry/rgb_lighting_user.c6
-rw-r--r--users/turbomech/backupturbomech.c5
70 files changed, 214 insertions, 226 deletions
diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c
index 15b7c9faa7..5792f51ca8 100644
--- a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c
@@ -18,12 +18,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-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) {
setPinOutput(B2);
writePinLow(B2);
} else {
setPinInput(B2);
writePinLow(B2);
}
+ return false;
}
diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c
index fd6087a238..20783c22cb 100644
--- a/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c
+++ b/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c
@@ -18,12 +18,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-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) {
setPinOutput(B2);
writePinLow(B2);
} else {
setPinInput(B2);
writePinLow(B2);
}
+ return false;
}
diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c
index 78d00dd06d..453bf8c961 100644
--- a/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c
+++ b/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c
@@ -72,10 +72,11 @@ layer_state_t layer_state_set_user(layer_state_t state) {
}
// support for standard mod state keys (caps lock, scroll lock, etc.)
-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) {
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
} else {
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
}
+ return false;
}
diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c
index a45947de54..5cc9227885 100644
--- a/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c
+++ b/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c
@@ -18,12 +18,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-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) {
setPinOutput(B2);
writePinLow(B2);
} else {
setPinInput(B2);
writePinLow(B2);
}
+ return false;
}
diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c
index c3e359e24e..f7899ad886 100644
--- a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c
+++ b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c
@@ -157,11 +157,11 @@ void dynamic_macro_record_end_user(int8_t direction) {
// Custom Caps Lock backlight behaviour
// ------------------------------------
-void led_set_user(uint8_t usb_led) {
+bool led_update_user(led_t led_state) {
// This exists because I don't like the backlight to turn OFF when the Caps Lock is ON.
// That is, this will turn the backlight ON (at half the brightness) when the Caps Lock is ON as well.
static bool prev_is_caps_on;
- bool is_caps_on = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK);
+ bool is_caps_on = led_state.caps_lock;
if (prev_is_caps_on != is_caps_on) {
prev_is_caps_on = is_caps_on;
@@ -178,7 +178,7 @@ void led_set_user(uint8_t usb_led) {
}
// Turn on the Pro Micro's on-board LEDs for Caps Lock
- if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+ if (led_state.caps_lock) {
// Set to low
setPinOutput(B0);
writePinLow(B0);
@@ -189,6 +189,7 @@ void led_set_user(uint8_t usb_led) {
setPinInput(B0);
setPinInput(D5);
}
+ return false;
}
// Backlight idle timeout feature
diff --git a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c
index ea659979ea..3932a1ee9b 100644
--- a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c
+++ b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c
@@ -35,11 +35,9 @@ 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){
//turn on the Pro Micro's on board LEDs for CAPS LOCK
- if(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)){
+ if(led_state.caps_lock){
//set led pins to low
setPinOutput(B0);
writePinLow(B0);
@@ -50,4 +48,5 @@ void led_set_user(uint8_t usb_led){
setPinInput(B0);
setPinInput(D5);
}
+ return false;
}
diff --git a/keyboards/40percentclub/ut47/led.c b/keyboards/40percentclub/ut47/led.c
index f5d8ffc12e..867a6e2e2a 100644
--- a/keyboards/40percentclub/ut47/led.c
+++ b/keyboards/40percentclub/ut47/led.c
@@ -19,20 +19,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdint.h>
#include "led.h"
-
-void led_set(uint8_t usb_led)
+bool led_update_kb(led_t led_state)
{
- if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
- // output low
- DDRB |= (1<<0);
- PORTB &= ~(1<<0);
- DDRD |= (1<<5);
- PORTD &= ~(1<<5);
- } else {
- // Hi-Z
- DDRB &= ~(1<<0);
- PORTB &= ~(1<<0);
- DDRD &= ~(1<<5);
- PORTD &= ~(1<<5);
+ bool res = led_update_user(led_state);
+ if (res) {
+ if (led_state.caps_lock) {
+ // output low
+ DDRB |= (1<<0);
+ PORTB &= ~(1<<0);
+ DDRD |= (1<<5);
+ PORTD &= ~(1<<5);
+ } else {
+ // Hi-Z
+ DDRB &= ~(1<<0);
+ PORTB &= ~(1<<0);
+ DDRD &= ~(1<<5);
+ PORTD &= ~(1<<5);
+ }
}
+ return false;
}
diff --git a/keyboards/converter/siemens_tastatur/keymaps/default/keymap.c b/keyboards/converter/siemens_tastatur/keymaps/default/keymap.c
index 0ce8a64ab7..0f3911a2d3 100644
--- a/keyboards/converter/siemens_tastatur/keymaps/default/keymap.c
+++ b/keyboards/converter/siemens_tastatur/keymaps/default/keymap.c
@@ -51,10 +51,11 @@ void matrix_init_user(void) {
writePinLow(B0);
}
-void led_set_user(uint8_t usb_led) {
- if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+bool led_update_user(led_t led_state) {
+ if (led_state.caps_lock) {
writePinHigh(B0);
} else {
writePinLow(B0);
}
+ return false;
}
diff --git a/keyboards/dz60/keymaps/muzfuz/keymap.c b/keyboards/dz60/keymaps/muzfuz/keymap.c
index fcd4c317d1..1a71b9bb86 100644
--- a/keyboards/dz60/keymaps/muzfuz/keymap.c
+++ b/keyboards/dz60/keymaps/muzfuz/keymap.c
@@ -25,12 +25,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
};
-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) {
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
} else {
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
}
+ return false;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record)
diff --git a/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c b/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c
index 7f3b24de74..e5f5083ee5 100644
--- a/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c
+++ b/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c
@@ -85,7 +85,7 @@ void highlight_layer3(void){
}
bool rgb_matrix_indicators_user(void) {
- uint8_t this_led = host_keyboard_leds();
+ led_t led_state = host_keyboard_led_state();
if (!g_suspend_state) {
switch (get_highest_layer(layer_state)) {
case 3:
@@ -94,7 +94,7 @@ bool rgb_matrix_indicators_user(void) {
break;
}
}
- if ( this_led & (1<<USB_LED_CAPS_LOCK)) {
+ if (led_state.caps_lock) {
rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
}
return false;
diff --git a/keyboards/dztech/dz60rgb_ansi/keymaps/muralisc/keymap.c b/keyboards/dztech/dz60rgb_ansi/keymaps/muralisc/keymap.c
index af2d9fa3dc..ff829f53fa 100644
--- a/keyboards/dztech/dz60rgb_ansi/keymaps/muralisc/keymap.c
+++ b/keyboards/dztech/dz60rgb_ansi/keymaps/muralisc/keymap.c
@@ -146,7 +146,7 @@ void highlight_layer3(void) {
}
bool rgb_matrix_indicators_user(void) {
- uint8_t this_led = host_keyboard_leds();
+ led_t led_state = host_keyboard_led_state();
if (!g_suspend_state) {
switch (get_highest_layer(layer_state)) {
case 1:
@@ -161,7 +161,7 @@ bool rgb_matrix_indicators_user(void) {
break;
}
}
- if ( this_led & (1<<USB_LED_CAPS_LOCK)) {
+ if (led_state.caps_lock) {
rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
}
return false;
diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c
index 34284e146d..f8fce23ce5 100644
--- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c
@@ -296,12 +296,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-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) {
ergodox_right_led_1_on();
} else {
ergodox_right_led_1_off();
}
+ return false;
}
diff --git a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c
index 0d60e46bfc..65a7a08ec7 100644
--- a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c
@@ -194,11 +194,12 @@ void matrix_scan_user(void) {
}
};
-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)
{
capsOn = true;
}else {
capsOn = false;
}
+ return false;
}
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) {</