summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/curry/oled.c10
-rwxr-xr-xusers/ericgebhart/oled/oled_stuff.c13
-rw-r--r--users/spidey3/layer_rgb.c12
-rw-r--r--users/xulkal/custom_oled.c14
-rw-r--r--users/zer09/zer09.c9
5 files changed, 28 insertions, 30 deletions
diff --git a/users/curry/oled.c b/users/curry/oled.c
index 89112af121..2defcbd80e 100644
--- a/users/curry/oled.c
+++ b/users/curry/oled.c
@@ -86,12 +86,12 @@ void render_layer_state(void) {
86 oled_write_P(PSTR(" Mods"), layer_state_is(_MODS)); 86 oled_write_P(PSTR(" Mods"), layer_state_is(_MODS));
87} 87}
88 88
89void render_keylock_status(uint8_t led_usb_state) { 89void render_keylock_status(led_t led_state) {
90 oled_write_P(PSTR("Lock:"), false); 90 oled_write_P(PSTR("Lock:"), false);
91 oled_write_P(PSTR(" "), false); 91 oled_write_P(PSTR(" "), false);
92 oled_write_P(PSTR("N"), led_usb_state & (1 << USB_LED_NUM_LOCK)); 92 oled_write_P(PSTR("N"), led_state.num_lock);
93 oled_write_P(PSTR("C"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); 93 oled_write_P(PSTR("C"), led_state.caps_lock);
94 oled_write_ln_P(PSTR("S"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); 94 oled_write_ln_P(PSTR("S"), led_state.scroll_lock);
95} 95}
96 96
97void render_mod_status(uint8_t modifiers) { 97void render_mod_status(uint8_t modifiers) {
@@ -129,7 +129,7 @@ void render_user_status(void) {
129void render_status_main(void) { 129void render_status_main(void) {
130 /* Show Keyboard Layout */ 130 /* Show Keyboard Layout */
131 render_default_layer_state(); 131 render_default_layer_state();
132 render_keylock_status(host_keyboard_leds()); 132 render_keylock_status(host_keyboard_led_state());
133 render_bootmagic_status(); 133 render_bootmagic_status();
134 render_user_status(); 134 render_user_status();
135 135
diff --git a/users/ericgebhart/oled/oled_stuff.c b/users/ericgebhart/oled/oled_stuff.c
index f2c4f0f394..211fe4ab3e 100755
--- a/users/ericgebhart/oled/oled_stuff.c
+++ b/users/ericgebhart/oled/oled_stuff.c
@@ -32,11 +32,11 @@ void oled_render_locale(void) {
32 } 32 }
33} 33}
34 34
35void oled_render_keylock_status(uint8_t led_usb_state) { 35void oled_render_keylock_status(led_t led_state) {
36 oled_write_P(PSTR(" Lock:"), false); 36 oled_write_P(PSTR(" Lock:"), false);
37 oled_write_P(PSTR("N"), led_usb_state & (1 << USB_LED_NUM_LOCK)); 37 oled_write_P(PSTR("N"), led_state.num_lock);
38 oled_write_P(PSTR("C"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); 38 oled_write_P(PSTR("C"), led_state.caps_lock);
39 oled_write_P(PSTR("S"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); 39 oled_write_P(PSTR("S"), led_state.scroll_lock);
40} 40}
41 41
42void oled_render_mod_status(uint8_t modifiers) { 42void oled_render_mod_status(uint8_t modifiers) {
@@ -49,7 +49,7 @@ void oled_render_mod_status(uint8_t modifiers) {
49 49
50void oled_render_mod_lock_status(void){ 50void oled_render_mod_lock_status(void){
51 oled_render_mod_status(get_mods() | get_oneshot_mods()); 51 oled_render_mod_status(get_mods() | get_oneshot_mods());
52 oled_render_keylock_status(host_keyboard_leds()); 52 oled_render_keylock_status(host_keyboard_led_state());
53} 53}
54 54
55 55
@@ -187,6 +187,3 @@ bool oled_task_user(void) {
187 187
188} 188}
189#endif 189#endif
190
191/* oled_render_keylock_status(host_keyboard_leds()); */
192/* oled_render_mod_status(get_mods() | get_oneshot_mods()); */
diff --git a/users/spidey3/layer_rgb.c b/users/spidey3/layer_rgb.c
index cff20898cd..be76788d21 100644
--- a/users/spidey3/layer_rgb.c
+++ b/users/spidey3/layer_rgb.c
@@ -73,9 +73,9 @@ const rgblight_segment_t *const PROGMEM _rgb_layers[] = {
73 [LAYER_OFFSET + _NUMPAD] = _layer1_layer, 73 [LAYER_OFFSET + _NUMPAD] = _layer1_layer,
74 [LAYER_OFFSET + _FN] = _layer2_layer, 74 [LAYER_OFFSET + _FN] = _layer2_layer,
75 75
76 [LOCK_OFFSET + USB_LED_NUM_LOCK] = _numlock_layer, 76 [LOCK_OFFSET + 0] = _numlock_layer,
77 [LOCK_OFFSET + USB_LED_CAPS_LOCK] = _capslock_layer, 77 [LOCK_OFFSET + 1] = _capslock_layer,
78 [LOCK_OFFSET + USB_LED_SCROLL_LOCK] = _scrolllock_layer, 78 [LOCK_OFFSET + 2] = _scrolllock_layer,
79 79
80 [MISC_OFFSET + 0] = _gflock_layer, 80 [MISC_OFFSET + 0] = _gflock_layer,
81 [MISC_OFFSET + 1] = _glyphreplace_layer, 81 [MISC_OFFSET + 1] = _glyphreplace_layer,
@@ -374,9 +374,9 @@ layer_state_t layer_state_set_user_rgb(layer_state_t state) {
374} 374}
375 375
376bool led_update_user_rgb(led_t led_state) { 376bool led_update_user_rgb(led_t led_state) {
377 rgblight_set_layer_state(LOCK_OFFSET + USB_LED_NUM_LOCK, led_state.num_lock); 377 rgblight_set_layer_state(LOCK_OFFSET + 0, led_state.num_lock);
378 rgblight_set_layer_state(LOCK_OFFSET + USB_LED_CAPS_LOCK, led_state.caps_lock); 378 rgblight_set_layer_state(LOCK_OFFSET + 1, led_state.caps_lock);
379 rgblight_set_layer_state(LOCK_OFFSET + USB_LED_SCROLL_LOCK, led_state.scroll_lock); 379 rgblight_set_layer_state(LOCK_OFFSET + 2, led_state.scroll_lock);
380 380
381 return true; 381 return true;
382} 382}
diff --git a/users/xulkal/custom_oled.c b/users/xulkal/custom_oled.c
index fd03033ad6..c6341fa3d7 100644
--- a/users/xulkal/custom_oled.c
+++ b/users/xulkal/custom_oled.c
@@ -71,15 +71,15 @@ static void render_layer(void)
71static void render_keyboard_leds(void) 71static void render_keyboard_leds(void)
72{ 72{
73 // Host Keyboard LED Status 73 // Host Keyboard LED Status
74 uint8_t led_state = host_keyboard_leds(); 74 led_t led_state = host_keyboard_led_state();
75#ifdef OLED_90ROTATION 75#ifdef OLED_90ROTATION
76 oled_write_P(IS_LED_ON(led_state, USB_LED_NUM_LOCK) ? PSTR("NUMLK") : PSTR(" "), false); 76 oled_write_P(led_state.num_lock ? PSTR("NUMLK") : PSTR(" "), false);
77 oled_write_P(IS_LED_ON(led_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLK") : PSTR(" "), false); 77 oled_write_P(led_state.caps_lock ? PSTR("CAPLK") : PSTR(" "), false);
78 oled_write_P(IS_LED_ON(led_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); 78 oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false);
79#else 79#else
80 oled_write_P(IS_LED_ON(led_state, USB_LED_NUM_LOCK) ? PSTR("NUM ") : PSTR(" "), false); 80 oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
81 oled_write_P(IS_LED_ON(led_state, USB_LED_CAPS_LOCK) ? PSTR("CAPS ") : PSTR(" "), false); 81 oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false);
82 oled_write_P(IS_LED_ON(led_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRL") : PSTR(" "), false); 82 oled_write_P(led_state.scroll_lock ? PSTR("SCRL") : PSTR(" "), false);
83#endif 83#endif
84} 84}
85 85
diff --git a/users/zer09/zer09.c b/users/zer09/zer09.c
index 78433b4c20..5e192f037a 100644
--- a/users/zer09/zer09.c
+++ b/users/zer09/zer09.c
@@ -69,8 +69,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
69 return process_record_keymap(keycode, record); 69 return process_record_keymap(keycode, record);
70} 70}
71 71
72void led_set_user(uint8_t usb_led) { 72bool led_update_user(led_t led_state) {
73 if (usb_led & (1 << USB_LED_CAPS_LOCK)) { 73 if (led_state.caps_lock) {
74 rbw_led_keys[RBW_LCAP].status = ENABLED; 74 rbw_led_keys[RBW_LCAP].status = ENABLED;
75 rbw_led_keys[RBW_RCAP].status = ENABLED; 75 rbw_led_keys[RBW_RCAP].status = ENABLED;
76 } else { 76 } else {
@@ -78,11 +78,12 @@ void led_set_user(uint8_t usb_led) {
78 rbw_led_keys[RBW_RCAP].status = DISABLED; 78 rbw_led_keys[RBW_RCAP].status = DISABLED;
79 } 79 }
80 80
81 if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { 81 if (led_state.scroll_lock) {
82 rbw_led_keys[RBW_SCRL].status = ENABLED; 82 rbw_led_keys[RBW_SCRL].status = ENABLED;
83 } else { 83 } else {
84 rbw_led_keys[RBW_SCRL].status = DISABLED; 84 rbw_led_keys[RBW_SCRL].status = DISABLED;
85 } 85 }
86 86
87 led_set_keymap(usb_led); 87 led_set_keymap(led_state.raw);
88 return false;
88} 89}