X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=sidebyside;f=converter%2Fibm4704_usb%2Fmatrix.c;h=c02d9e50bba988a58b416f27bfca4b4470dedcaa;hb=1ad31539a6e27d55af374cc8ad55194227db35dd;hp=155df9c38f26f5fa2d9a610e4773436c75dd1fdc;hpb=32abfacbc730be45ae5696688d9d8db3fb25dc01;p=max%2Ftmk_keyboard.git
diff --git a/converter/ibm4704_usb/matrix.c b/converter/ibm4704_usb/matrix.c
index 155df9c3..c02d9e50 100644
--- a/converter/ibm4704_usb/matrix.c
+++ b/converter/ibm4704_usb/matrix.c
@@ -29,7 +29,6 @@ along with this program. If not, see .
static void matrix_make(uint8_t code);
static void matrix_break(uint8_t code);
-static void matrix_clear(void);
/*
@@ -53,23 +52,12 @@ static uint8_t matrix[MATRIX_ROWS];
#define COL(code) (code&0x07)
-inline
-uint8_t matrix_rows(void)
-{
- return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
- return MATRIX_COLS;
-}
-
static void enable_break(void)
{
print("Enable break: ");
+ while (ibm4704_send(0xFC)) { _delay_ms(10); }
// valid scancode: 00-79h
- for (uint8_t code = 0; code < 0x7A; code++) {
+ for (uint8_t code = 0; code < 0x7F; code++) {
while (ibm4704_send(0x80|code)) _delay_ms(10);
_delay_ms(5); // wait for response
// No response(FF) when ok, FD when out of bound
@@ -105,8 +93,8 @@ uint8_t matrix_scan(void)
if (code==0xFF) {
// Not receivd
return 0;
- } else if ((code&0x7F) >= 0x7A) {
- // 0xFF-FA and 0x7F-7A is not scancode
+ } else if ((code&0x7F) >= 0x7C) {
+ // 0xFF-FC and 0x7F-7C is not scancode
xprintf("Error: %02X\n", code);
matrix_clear();
return 0;
@@ -120,28 +108,12 @@ uint8_t matrix_scan(void)
return 1;
}
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
- return (matrix[row] & (1<