summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Huang <yj7272098@hotmail.com>2018-05-25 06:28:54 +0800
committerDrashna Jaelre <drashna@live.com>2018-05-24 15:28:54 -0700
commit1b81c4dd2bfd85eb4d17ee4484c98c1ec411b6ba (patch)
tree2999084f9404548a244d70c4e9972c37cb7d5d39
parent9ae6f4f927bc27012929785e0f7479501406331f (diff)
pk60.c fix for capslock indicator (#3032)
* Capslock indicator add * edit * name correction * led_set_user(usb_led); delete * config edit for caps indicator * keymap.c fix * led.h include * pk60.c fix for capslock indicator
-rw-r--r--keyboards/pk60/pk60.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/keyboards/pk60/pk60.c b/keyboards/pk60/pk60.c
index f1d9dd6412..a9da0ff229 100644
--- a/keyboards/pk60/pk60.c
+++ b/keyboards/pk60/pk60.c
@@ -15,7 +15,7 @@ void matrix_scan_kb(void) {
};
void led_init_ports(void) {
-
+ // Set capslock LED pin as pinout
DDRF |= (1 << 4);
PORTF |= (1 << 4);
@@ -24,9 +24,11 @@ void led_init_ports(void) {
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
- PORTF |= (1 << 4);
- } else {
+ // Turn capslock on
PORTF &= ~(1 << 4);
+ } else {
+ // Turn capslock off
+ PORTF |= (1 << 4);
}
led_set_user(usb_led);