]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Fix CAPS_LED logic in Satan (#461)
authorTerryMathews <terry@terrymathews.net>
Thu, 30 Jun 2016 02:33:09 +0000 (22:33 -0400)
committerJack Humbert <jack.humb@gmail.com>
Thu, 30 Jun 2016 02:33:09 +0000 (22:33 -0400)
Needed to invert for proper operation. Previous code had LED on when off
and vice versa.

keyboards/satan/satan.c

index 1c515f55f9f15b37c2dc3079f71b8b8dec95c0f1..d2c5d5c2054af68b060c1d0de80a77dbe7576582 100644 (file)
@@ -22,9 +22,9 @@ void led_init_ports(void) {
 void led_set_kb(uint8_t usb_led) {
     if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
         // Turn capslock on
-        PORTB |= (1<<2);
+        PORTB &= ~(1<<2);
     } else {
         // Turn capslock off
-        PORTB &= ~(1<<2);
+        PORTB |= (1<<2);
     }
 }