diff options
Diffstat (limited to 'keyboards/yd60mq/yd60mq.c')
| -rw-r--r-- | keyboards/yd60mq/yd60mq.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/keyboards/yd60mq/yd60mq.c b/keyboards/yd60mq/yd60mq.c index 6e391046e..a39af530d 100644 --- a/keyboards/yd60mq/yd60mq.c +++ b/keyboards/yd60mq/yd60mq.c | |||
| @@ -1,12 +1,19 @@ | |||
| 1 | #include "yd60mq.h" | 1 | #include "yd60mq.h" |
| 2 | 2 | ||
| 3 | void led_set_kb(uint8_t usb_led) { | 3 | void matrix_init_kb(void){ |
| 4 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | 4 | setPinOutput(F4); |
| 5 | setPinOutput(F4); | 5 | writePinHigh(F4); |
| 6 | writePinLow(F4); | 6 | } |
| 7 | } else { | ||
| 8 | setPinInput(F4); | ||
| 9 | } | ||
| 10 | 7 | ||
| 11 | led_set_user(usb_led); | 8 | bool led_update_kb(led_t led_state) { |
| 9 | bool res = led_update_user(led_state); | ||
| 10 | if (res) { | ||
| 11 | // writePin sets the pin high for 1 and low for 0. | ||
| 12 | // In this example the pins are inverted, setting | ||
| 13 | // it low/0 turns it on, and high/1 turns the LED off. | ||
| 14 | // This behavior depends on whether the LED is between the pin | ||
| 15 | // and VCC or the pin and GND. | ||
| 16 | writePin(F4, !led_state.caps_lock); | ||
| 17 | } | ||
| 18 | return res; | ||
| 12 | } | 19 | } |
