X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=sidebyside;f=converter%2Fx68k_usb%2Fmatrix.c;h=2d5a1e1169d3b38ef1d7af4c91c614fd295b8920;hb=3730666b9788ce93a93185ef8ca76a5f5b770abd;hp=954e7ef12921366fb535eb0bc7817e8f18f8e9be;hpb=62d1ebb91c7b381ce3d88aad9ee0b03bea9fce26;p=max%2Ftmk_keyboard.git
diff --git a/converter/x68k_usb/matrix.c b/converter/x68k_usb/matrix.c
index 954e7ef1..2d5a1e11 100644
--- a/converter/x68k_usb/matrix.c
+++ b/converter/x68k_usb/matrix.c
@@ -21,8 +21,9 @@ along with this program. If not, see .
#include
#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))) {