From 3f60bacffa5d0a13f815708e6dfe22d14a64e5ec Mon Sep 17 00:00:00 2001 From: Diego Roversi Date: Sat, 18 Nov 2017 18:03:32 +0100 Subject: Moved code for column 0 (first step of many others) --- TERES-HID/KeyboardMouse.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3