diff options
author | tmk <nobody@nowhere> | 2011-02-03 13:26:44 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2011-02-22 03:08:52 +0900 |
commit | 0632618d29dfb30c76b4e7c310dc7bee36919f63 (patch) | |
tree | 8a5b0bab7a1b46b83943e3676cf868137fd91fa7 /ps2_vusb/matrix.c | |
parent | 4f5f1a53d449172263e83c5769c92976e0d3332e (diff) | |
download | qmk_firmware-0632618d29dfb30c76b4e7c310dc7bee36919f63.tar.gz |
added initial support of mousekeys to ps2_vusb
Diffstat (limited to 'ps2_vusb/matrix.c')
-rw-r--r-- | ps2_vusb/matrix.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ps2_vusb/matrix.c b/ps2_vusb/matrix.c index c46473392..bd9b92446 100644 --- a/ps2_vusb/matrix.c +++ b/ps2_vusb/matrix.c @@ -190,8 +190,10 @@ uint8_t matrix_scan(void) } uint8_t code; - while ((code = ps2_host_recv())) { -//debug_hex(code); debug(" "); + code = ps2_host_recv(); + if (code == 0x00) return 0; + //while ((code = ps2_host_recv())) { +//phex(code); print(" "); switch (state) { case INIT: switch (code) { @@ -348,7 +350,8 @@ uint8_t matrix_scan(void) default: state = INIT; } - } + //} +//print("|"); // handle LED indicators /* @@ -463,6 +466,7 @@ static void matrix_make(uint8_t code) if (!matrix_is_on(ROW(code), COL(code))) { matrix[ROW(code)] |= 1<<COL(code); is_modified = true; + //print("matrix_make: "); phex(code); print("\n"); } } @@ -472,6 +476,7 @@ static void matrix_break(uint8_t code) if (matrix_is_on(ROW(code), COL(code))) { matrix[ROW(code)] &= ~(1<<COL(code)); is_modified = true; + //print("matrix_break: "); phex(code); print("\n"); } } |