diff options
-rw-r--r-- | TERES-HID/KeyboardMouse.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/TERES-HID/KeyboardMouse.c b/TERES-HID/KeyboardMouse.c index 1634a9d..19d6aa9 100644 --- a/TERES-HID/KeyboardMouse.c +++ b/TERES-HID/KeyboardMouse.c @@ -404,6 +404,7 @@ CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t * } } +#if 0 // x0 DDRD = (1 << 6); // d6 output (x0) PORTD = (1 << 6);// d6 =1 @@ -427,7 +428,7 @@ CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t * else add_key(KeyboardReport,HID_KEYBOARD_SC_F5); } - +#endif PORTB = rowY[colmn]; DDRB = 0xff; DDRD = 0; @@ -439,6 +440,14 @@ CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t * PORTB = rowY[colmn]; while (PINB != rowY[colmn]); + x = 0; + if ((PIND & (1 << 6)) == 0) { + // tp_guarder(); + keynow = keys[colmn * 14 + x + fn]; + KeyboardReport->Modifier |= keym[colmn * 14 + x]; + add_key(KeyboardReport,keynow); + } + x = 1; // 1 if ((PINC & (1 << 7)) == 0) { // tp_guarder(); |