summaryrefslogtreecommitdiffstats
path: root/keyboards/handwired
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-12-09 01:43:01 +0000
committerQMK Bot <hello@qmk.fm>2022-12-09 01:43:01 +0000
commit57bf0601986744a160cd8c8c1956fa207f9067be (patch)
treed7b0709c0e6becf02324c9ee26e110fd0752de8c /keyboards/handwired
parent701747ad4feee87fca177beb50823b522cff6e6a (diff)
parent99cd0b13e109bb14f1e5af023c5fcb5e50a78e0a (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/daishi/keymaps/default/keymap.c22
-rw-r--r--keyboards/handwired/promethium/promethium.h2
-rw-r--r--keyboards/handwired/retro_refit/retro_refit.c39
3 files changed, 14 insertions, 49 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;
}
diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h
index e40d67e9fd..0d594a7942 100644
--- a/keyboards/handwired/promethium/promethium.h
+++ b/keyboards/handwired/promethium/promethium.h
@@ -3,8 +3,6 @@
#include "quantum.h"
void battery_poll(uint8_t level);
-void led_set_kb(uint8_t usb_led);
-void led_set_user(uint8_t usb_led);
#define XXX KC_NO
diff --git a/keyboards/handwired/retro_refit/retro_refit.c b/keyboards/handwired/retro_refit/retro_refit.c
index 3d610eba34..2a5476e40c 100644
--- a/keyboards/handwired/retro_refit/retro_refit.c
+++ b/keyboards/handwired/retro_refit/retro_refit.c
@@ -12,36 +12,13 @@ void matrix_init_kb(void) {
matrix_init_user();
};
-void led_set_kb(uint8_t usb_led) {
- // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+bool led_update_kb(led_t led_state) {
+ bool res = led_update_user(led_state);
+ if(res) {
+ writePin(D0, !led_state.caps_lock);
+ writePin(D1, !led_state.num_lock);
+ writePin(C6, !led_state.scroll_lock);
- if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
- // output low
- DDRD |= (1<<0);
- PORTD &= ~(1<<0);
- } else {
- // Hi-Z
- DDRD &= ~(1<<0);
- PORTD &= ~(1<<0);
}
- if (usb_led & (1<<USB_LED_NUM_LOCK)) {
- // output low
- DDRD |= (1<<1);
- PORTD &= ~(1<<1);
- } else {
- // Hi-Z
- DDRD &= ~(1<<1);
- PORTD &= ~(1<<1);
- }
- if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
- // output low
- DDRC |= (1<<6);
- PORTC &= ~(1<<6);
- } else {
- // Hi-Z
- DDRC &= ~(1<<6);
- PORTC &= ~(1<<6);
- }
-
- led_set_user(usb_led);
-}; \ No newline at end of file
+ return res;
+} \ No newline at end of file