diff options
-rw-r--r-- | keyboard/phantom/keymap.c | 10 | ||||
-rw-r--r-- | keyboard/phantom/matrix.c | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/keyboard/phantom/keymap.c b/keyboard/phantom/keymap.c index 1d23f2b02d..a55d890bb3 100644 --- a/keyboard/phantom/keymap.c +++ b/keyboard/phantom/keymap.c @@ -41,12 +41,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. K0A, K0B, K0C, K0D, K0F, K0G, K0H, K0K, K0L, K0M, K0N, K0P, K0Q, K0R \ ) { \ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ \ -/* 0 */ { KC_##K0A, KC_##K0B, KC_##K0C, KC_##K5B, KC_##K0D, KC_##K0F, KC_##K5G, KC_##K0G, KC_##K0H, KC_NO, KC_##K0K, KC_##K0L, KC_##K0M, KC_##K0N, KC_##K0P, KC_##K0Q, KC_##K0R}, \ -/* 1 */ { KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F, KC_##K1G, KC_##K1H, KC_##K1I, KC_##K1J, KC_##K1K, KC_##K1L, KC_##K1M, KC_##K1N, KC_##K1P, KC_##K1Q, KC_##K1R}, \ -/* 2 */ { KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F, KC_##K2G, KC_##K2H, KC_##K2I, KC_##K2J, KC_##K2K, KC_##K2L, KC_##K2M, KC_##K2N, KC_##K2P, KC_##K2Q, KC_##K2R}, \ -/* 3 */ { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F, KC_##K3G, KC_##K3H, KC_##K3I, KC_##K3J, KC_##K3K, KC_##K3L, KC_##K3M, KC_##K3N, KC_##K3P, KC_##K3Q, KC_##K3R}, \ +/* 5 */ { KC_##K5A, KC_##K4A, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F, KC_##K5H, KC_##K5I, KC_##K5J, KC_##K5K, KC_##K5L, KC_##K5M, KC_##K5N, KC_##K5O, KC_##K5P, KC_##K5Q, KC_##K5R}, \ /* 4 */ { KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F, KC_##K4G, KC_##K4H, KC_##K4I, KC_##K4J, KC_##K4K, KC_##K4L, KC_##K4M, KC_##K4N, KC_##K4O, KC_##K4P, KC_##K4Q, KC_##K4R}, \ -/* 5 */ { KC_##K5A, KC_##K4A, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F, KC_##K5H, KC_##K5I, KC_##K5J, KC_##K5K, KC_##K5L, KC_##K5M, KC_##K5N, KC_##K5O, KC_##K5P, KC_##K5Q, KC_##K5R} \ +/* 3 */ { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F, KC_##K3G, KC_##K3H, KC_##K3I, KC_##K3J, KC_##K3K, KC_##K3L, KC_##K3M, KC_##K3N, KC_##K3P, KC_##K3Q, KC_##K3R}, \ +/* 2 */ { KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F, KC_##K2G, KC_##K2H, KC_##K2I, KC_##K2J, KC_##K2K, KC_##K2L, KC_##K2M, KC_##K2N, KC_##K2P, KC_##K2Q, KC_##K2R}, \ +/* 1 */ { KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F, KC_##K1G, KC_##K1H, KC_##K1I, KC_##K1J, KC_##K1K, KC_##K1L, KC_##K1M, KC_##K1N, KC_##K1P, KC_##K1Q, KC_##K1R}, \ +/* 0 */ { KC_##K0A, KC_##K0B, KC_##K0C, KC_##K5B, KC_##K0D, KC_##K0F, KC_##K5G, KC_##K0G, KC_##K0H, KC_NO, KC_##K0K, KC_##K0L, KC_##K0M, KC_##K0N, KC_##K0P, KC_##K0Q, KC_##K0R} \ } #define KEYMAP_ANSI( \ diff --git a/keyboard/phantom/matrix.c b/keyboard/phantom/matrix.c index 49d6b738e6..c91c0d99ab 100644 --- a/keyboard/phantom/matrix.c +++ b/keyboard/phantom/matrix.c @@ -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 |