]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboard/phantom/matrix.c
Correct order of rows for Phantom
[qmk_firmware.git] / keyboard / phantom / matrix.c
index 49d6b738e6d17b4c58842ce9a5b8449c09df442a..c91c0d99ab708e6368fce5036bd58b30a9f9170c 100644 (file)
@@ -158,7 +158,7 @@ uint8_t matrix_key_count(void)
 
 /* Row pin configuration
  * row: 0   1   2   3   4   5
- * pin: B0  B1  B2  B3  B4  B5
+ * pin: B5  B4  B3  B2  B1  B0
  */
 static void init_rows(void)
 {
@@ -169,12 +169,12 @@ static void init_rows(void)
 
 static uint8_t read_rows(void)
 {
-    return (PINB&(1<<0) ? 0 : (1<<0)) |
-           (PINB&(1<<1) ? 0 : (1<<1)) |
-           (PINB&(1<<2) ? 0 : (1<<2)) |
-           (PINB&(1<<3) ? 0 : (1<<3)) |
-           (PINB&(1<<4) ? 0 : (1<<4)) |
-           (PINB&(1<<5) ? 0 : (1<<5));
+    return (PINB&(1<<5) ? 0 : (1<<0)) |
+           (PINB&(1<<4) ? 0 : (1<<1)) |
+           (PINB&(1<<3) ? 0 : (1<<2)) |
+           (PINB&(1<<2) ? 0 : (1<<3)) |
+           (PINB&(1<<1) ? 0 : (1<<4)) |
+           (PINB&(1<<0) ? 0 : (1<<5));
 }
 
 /* Column pin configuration