summaryrefslogtreecommitdiffstats
path: root/converter/x68k_usb/matrix.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-06-21 21:48:18 +0900
committertmk <nobody@nowhere>2013-06-22 02:33:08 +0900
commitf45f4193f221d3ede706e02fc6b67916f90adf36 (patch)
treeae0eebc099b4867637a1880a2149b62e5d045ecb /converter/x68k_usb/matrix.c
parent42c962412b92a0ab4bd26c95f25867c645064bd6 (diff)
Use serial_uart.c instead of x68k.c now
Diffstat (limited to 'converter/x68k_usb/matrix.c')
-rw-r--r--converter/x68k_usb/matrix.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/converter/x68k_usb/matrix.c b/converter/x68k_usb/matrix.c
index 954e7ef129..2d5a1e1169 100644
--- a/converter/x68k_usb/matrix.c
+++ b/converter/x68k_usb/matrix.c
@@ -21,8 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <util/delay.h>
#include "print.h"
#include "util.h"
-#include "x68k.h"
+#include "serial.h"
#include "matrix.h"
+#include "debug.h"
/*
@@ -63,7 +64,7 @@ uint8_t matrix_cols(void)
void matrix_init(void)
{
- x68k_init();
+ serial_init();
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
@@ -75,13 +76,13 @@ uint8_t matrix_scan(void)
{
is_modified = false;
- uint8_t code;
- code = x68k_recv();
- if (code == 0) {
+ uint16_t code;
+ code = serial_recv2();
+ if (code == -1) {
return 0;
}
- phex(code); print(" ");
+ dprintf("%02X\n", code);
if (code&0x80) {
// break code
if (matrix_is_on(ROW(code), COL(code))) {