summaryrefslogtreecommitdiff
path: root/keyboards/handwired/daishi/keymaps
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-12-09 01:42:22 +0000
committerGitHub <noreply@github.com>2022-12-09 01:42:22 +0000
commit99cd0b13e109bb14f1e5af023c5fcb5e50a78e0a (patch)
treef6b3198bca1321fb9f4b8c0903d87869a8816630 /keyboards/handwired/daishi/keymaps
parentba6ee2904066aa64fa83417dc865f24dc76d991b (diff)
Refactor some led_set_kb instances (#19179)
* Refactor some led_set_kb instances * Apply suggestions from code review Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/handwired/daishi/keymaps')
-rw-r--r--keyboards/handwired/daishi/keymaps/default/keymap.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/keyboards/handwired/daishi/keymaps/default/keymap.c b/keyboards/handwired/daishi/keymaps/default/keymap.c
index 0607f75a30..696dda3a05 100644
--- a/keyboards/handwired/daishi/keymaps/default/keymap.c
+++ b/keyboards/handwired/daishi/keymaps/default/keymap.c
@@ -100,20 +100,10 @@ void matrix_init_user(void) {
setPinOutput(C6);
}
-void led_set_kb(uint8_t usb_led) {
- if (IS_LED_OFF(usb_led, USB_LED_NUM_LOCK)) {
- writePinLow(C4);
- } else {
- writePinHigh(C4);
- }
- if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK)) {
- writePinLow(C5);
- } else {
- writePinHigh(C5);
- }
- if (IS_LED_OFF(usb_led, USB_LED_SCROLL_LOCK)) {
- writePinLow(C6);
- } else {
- writePinHigh(C6);
- }
+bool led_update_user(led_t led_state) {
+ writePin(C4, led_state.num_lock);
+ writePin(C5, led_state.caps_lock);
+ writePin(C6, led_state.scroll_lock);
+
+ return false;
}