aboutsummaryrefslogtreecommitdiffstats
path: root/keyboard/phantom/matrix.c
diff options
context:
space:
mode:
authorGravatar Mathias Andersson <wraul@dbox.se>2013-05-19 19:14:57 +0200
committerGravatar Mathias Andersson <wraul@dbox.se>2013-05-27 20:53:11 +0200
commit9e84c89535c4091522f8053a0d96b6c2ab7cc51c (patch)
tree9bb84681e0eff1f5a6cc935c34215edc0eacdd1c /keyboard/phantom/matrix.c
parent5c5312c508ad40c418c321756d933e7ebcecb90a (diff)
downloadqmk_firmware-9e84c89535c4091522f8053a0d96b6c2ab7cc51c.tar.gz
Correct order of rows for Phantom
Diffstat (limited to 'keyboard/phantom/matrix.c')
-rw-r--r--keyboard/phantom/matrix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/keyboard/phantom/matrix.c b/keyboard/phantom/matrix.c
index 49d6b738e..c91c0d99a 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