X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=converter%2Fsun_usb%2Fmatrix.c;h=0cea3700c6e185a8c413f554cc245eb2701f774b;hb=965daf9dac5b8a7f09938b8cda07b7aac6916970;hp=3126bd33ca4b2bfcd3d3becff57c764d420226ae;hpb=3fe8e1c238fc8e15dacda1b03c0c1745a7b8e8e7;p=max%2Ftmk_keyboard.git
diff --git a/converter/sun_usb/matrix.c b/converter/sun_usb/matrix.c
index 3126bd33..0cea3700 100644
--- a/converter/sun_usb/matrix.c
+++ b/converter/sun_usb/matrix.c
@@ -24,6 +24,8 @@ along with this program. If not, see .
#include "matrix.h"
#include "debug.h"
#include "protocol/serial.h"
+#include "led.h"
+#include "host.h"
/*
@@ -46,20 +48,6 @@ static uint8_t matrix[MATRIX_ROWS];
#define ROW(code) ((code>>3)&0xF)
#define COL(code) (code&0x07)
-static bool is_modified = false;
-
-
-inline
-uint8_t matrix_rows(void)
-{
- return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
- return MATRIX_COLS;
-}
void matrix_init(void)
{
@@ -87,13 +75,13 @@ void matrix_init(void)
}
}
print(" Done\n");
+
+ PORTD &= ~(1<<6);
return;
}
uint8_t matrix_scan(void)
{
- is_modified = false;
-
uint8_t code;
code = serial_recv();
if (!code) return 0;
@@ -131,56 +119,18 @@ uint8_t matrix_scan(void)
// break code
if (matrix_is_on(ROW(code), COL(code))) {
matrix[ROW(code)] &= ~(1<