]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
[Keyboard] correct indicator light states (#5434)
authorholtenc <holtenc@gmail.com>
Mon, 18 Mar 2019 17:42:26 +0000 (12:42 -0500)
committerDrashna Jaelre <drashna@live.com>
Mon, 18 Mar 2019 17:42:26 +0000 (10:42 -0700)
function of indicator lights was inverted. these changes correct that.

keyboards/handwired/prime_exl/keymaps/default/keymap.c
keyboards/handwired/prime_exl/keymaps/via/keymap.c
keyboards/primekb/prime_e/keymaps/default/keymap.c
keyboards/primekb/prime_e/keymaps/via/keymap.c

index 815090bd1939ffd54a8496988efdca6b22bc858f..1dac7825e4be970089cb0157f365969198906969 100644 (file)
@@ -113,20 +113,20 @@ void matrix_scan_user(void) {
 
 void led_set_user(uint8_t usb_led) {
   if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
-    writePinLow(B6);
-  } else {
     writePinHigh(B6);
+  } else {
+    writePinLow(B6);
   }
   if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
-    writePinLow(B5);
-  } else {
     writePinHigh(B5);
+  } else {
+    writePinLow(B5);
   }
   /*
   if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
-    writePinLow(C6);
-  } else {
     writePinHigh(C6);
+  } else {
+    writePinLow(C6);
   }
   */
 }
@@ -135,9 +135,9 @@ void led_set_user(uint8_t usb_led) {
 uint32_t layer_state_set_user(uint32_t state)
 {
     if (biton32(state) == 2) {
-    writePinLow(C6);
+    writePinHigh(C6);
        } else {
-               writePinHigh(C6);
+               writePinLow(C6);
     }
     return state;
 }
index 4a2631c369b9e3e9e56e6eaf274fdd3861fdc096..c01c247c8967115c476d7d0ecd649dcb3559f026 100644 (file)
@@ -71,20 +71,20 @@ void matrix_scan_user(void) {
 
 void led_set_user(uint8_t usb_led) {
   if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
-    writePinLow(B6);
-  } else {
     writePinHigh(B6);
+  } else {
+    writePinLow(B6);
   }
   if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
-    writePinLow(B5);
-  } else {
     writePinHigh(B5);
+  } else {
+    writePinLow(B5);
   }
   /*
   if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
-    writePinLow(C6);
-  } else {
     writePinHigh(C6);
+  } else {
+    writePinLow(C6);
   }
   */
 }
@@ -93,9 +93,9 @@ void led_set_user(uint8_t usb_led) {
 uint32_t layer_state_set_user(uint32_t state)
 {
     if (biton32(state) == 2) {
-    writePinLow(C6);
+    writePinHigh(C6);
        } else {
-               writePinHigh(C6);
+               writePinLow(C6);
     }
     return state;
 }
index 47692c5413f6699b96a32816b4a6417c95f3f7c2..0aab745cd58327dd321f9f3678ef5ca950df1e79 100644 (file)
@@ -44,20 +44,20 @@ void matrix_scan_user(void) {
 
 void led_set_user(uint8_t usb_led) {
   if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
-    writePinLow(B2);
-  } else {
     writePinHigh(B2);
+  } else {
+    writePinLow(B2);
   }
   if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
-    writePinLow(B1);
-  } else {
     writePinHigh(B1);
+  } else {
+    writePinLow(B1);
   }
 /*
   if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
-    writePinLow(B3);
-  } else {
     writePinHigh(B3);
+  } else {
+    writePinLow(B3);
   }*/
 
 }
@@ -66,9 +66,9 @@ void led_set_user(uint8_t usb_led) {
 uint32_t layer_state_set_user(uint32_t state)
 {
     if (biton32(state) == 1) {
-    writePinLow(B3);
+    writePinHigh(B3);
        } else {
-               writePinHigh(B3);
+               writePinLow(B3);
     }
     return state;
 }
index 9cc3e2f3d7706ae4b9c063a9849cd93f623ba934..8b5b13866a6d16fe175dd42b93151c60b99076ae 100644 (file)
@@ -43,20 +43,20 @@ void matrix_scan_user(void) {
 
 void led_set_user(uint8_t usb_led) {
   if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
-    writePinLow(B2);
-  } else {
     writePinHigh(B2);
+  } else {
+    writePinLow(B2);
   }
   if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
-    writePinLow(B1);
-  } else {
     writePinHigh(B1);
+  } else {
+    writePinLow(B1);
   }
 /*
   if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
-    writePinLow(B3);
-  } else {
     writePinHigh(B3);
+  } else {
+    writePinLow(B3);
   }*/
 
 }
@@ -65,9 +65,9 @@ void led_set_user(uint8_t usb_led) {
 uint32_t layer_state_set_user(uint32_t state)
 {
     if (biton32(state) == 1) {
-    writePinLow(B3);
+    writePinHigh(B3);
        } else {
-               writePinHigh(B3);
+               writePinLow(B3);
     }
     return state;
 }