summaryrefslogtreecommitdiff
path: root/keyboards/yosino58
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/yosino58')
-rw-r--r--keyboards/yosino58/keymaps/default/keymap.c5
-rw-r--r--keyboards/yosino58/keymaps/sakura/keymap.c5
-rw-r--r--keyboards/yosino58/lib/host_led_state_reader.c8
-rw-r--r--keyboards/yosino58/rev1/config.h38
-rw-r--r--keyboards/yosino58/rev1/info.json3
5 files changed, 13 insertions, 46 deletions
diff --git a/keyboards/yosino58/keymaps/default/keymap.c b/keyboards/yosino58/keymaps/default/keymap.c
index 45ee46f7ce..512c0ec4b1 100644
--- a/keyboards/yosino58/keymaps/default/keymap.c
+++ b/keyboards/yosino58/keymaps/default/keymap.c
@@ -200,8 +200,9 @@ bool oled_task_user(void) {
int rowa = 0;
//Set Indicator icon
- if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) { rown = 1; } else { rown = 0; }
- if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { rowc = 1; } else { rowc = 0; }
+ led_t led_state = host_keyboard_led_state();
+ if (led_state.num_lock) { rown = 1; } else { rown = 0; }
+ if (led_state.caps_lock) { rowc = 1; } else { rowc = 0; }
if (layer_state == L_LOWER) { rowl = 1; }
if (layer_state == L_RAISE) { rowr = 1; }
if (layer_state == L_ADJUST) { rowa = 1; }
diff --git a/keyboards/yosino58/keymaps/sakura/keymap.c b/keyboards/yosino58/keymaps/sakura/keymap.c
index 53d4f9b077..e3c8c52d7d 100644
--- a/keyboards/yosino58/keymaps/sakura/keymap.c
+++ b/keyboards/yosino58/keymaps/sakura/keymap.c
@@ -200,8 +200,9 @@ bool oled_task_user(void) {
int rowa = 0;
//Set Indicator icon
- if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) { rown = 1; } else { rown = 0; }
- if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { rowc = 1; } else { rowc = 0; }
+ led_t led_state = host_keyboard_led_state();
+ if (led_state.num_lock) { rown = 1; } else { rown = 0; }
+ if (led_state.caps_lock) { rowc = 1; } else { rowc = 0; }
if (layer_state == L_LOWER) { rowl = 1; }
if (layer_state == L_RAISE) { rowr = 1; }
if (layer_state == L_ADJUST) { rowa = 1; }
diff --git a/keyboards/yosino58/lib/host_led_state_reader.c b/keyboards/yosino58/lib/host_led_state_reader.c
index abcfefffb4..87249d8d4f 100644
--- a/keyboards/yosino58/lib/host_led_state_reader.c
+++ b/keyboards/yosino58/lib/host_led_state_reader.c
@@ -4,11 +4,11 @@ char host_led_state_str[24];
const char *read_host_led_state(void)
{
- uint8_t leds = host_keyboard_leds();
+ led_t led_state = host_keyboard_led_state();
snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
- (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ",
- (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ",
- (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- ");
+ led_state.num_lock ? "on" : "- ",
+ led_state.caps_lock ? "on" : "- ",
+ led_state.scroll_lock ? "on" : "- ");
return host_led_state_str;
}
diff --git a/keyboards/yosino58/rev1/config.h b/keyboards/yosino58/rev1/config.h
deleted file mode 100644
index 4930c35c60..0000000000
--- a/keyboards/yosino58/rev1/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Copyright 2012 Jun Wako <wakojun@gmail.com>
-Copyright 2015 Jack Humbert
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/* ws2812 RGB LED */
-#define RGBLED_NUM 12 // Number of LEDs
-
-/*
- * Feature disable options
- * These options are also useful to firmware size reduction.
- */
-
-/* disable debug print */
-// #define NO_DEBUG
-
-/* disable print */
-// #define NO_PRINT
-
-/* disable action features */
-//#define NO_ACTION_LAYER
-//#define NO_ACTION_TAPPING
-//#define NO_ACTION_ONESHOT
diff --git a/keyboards/yosino58/rev1/info.json b/keyboards/yosino58/rev1/info.json
index 730c82faa4..c0dc03831f 100644
--- a/keyboards/yosino58/rev1/info.json
+++ b/keyboards/yosino58/rev1/info.json
@@ -16,6 +16,9 @@
"split": {
"soft_serial_pin": "D2"
},
+ "rgblight": {
+ "led_count": 12
+ },
"ws2812": {
"pin": "D3"
},