Rename PDIProtocol.c/.h to XPROGProtocol.c/.h as it will now handle both TPI and...
[pub/USBasp.git] / Demos / Host / LowLevel / KeyboardHost / KeyboardHost.c
index 3860584..1d8a06e 100644 (file)
@@ -37,7 +37,7 @@
 #include "KeyboardHost.h"\r
 \r
 /** Main program entry point. This routine configures the hardware required by the application, then\r
- *  starts the scheduler to run the application tasks.\r
+ *  enters a loop to run the application tasks in sequence.\r
  */\r
 int main(void)\r
 {\r
@@ -161,13 +161,13 @@ void ReadNextReport(void)
                        char PressedKey = 0;\r
 \r
                        /* Retrieve pressed key character if alphanumeric */\r
-                       if ((KeyboardReport.KeyCode >= 0x04) && (KeyboardReport.KeyCode <= 0x1D))\r
-                         PressedKey = (KeyboardReport.KeyCode - 0x04) + 'A';\r
-                       else if ((KeyboardReport.KeyCode >= 0x1E) && (KeyboardReport.KeyCode <= 0x27))\r
-                         PressedKey = (KeyboardReport.KeyCode - 0x1E) + '0';\r
-                       else if (KeyboardReport.KeyCode == 0x2C)\r
+                       if ((KeyboardReport.KeyCode[0] >= 0x04) && (KeyboardReport.KeyCode[0] <= 0x1D))\r
+                         PressedKey = (KeyboardReport.KeyCode[0] - 0x04) + 'A';\r
+                       else if ((KeyboardReport.KeyCode[0] >= 0x1E) && (KeyboardReport.KeyCode[0] <= 0x27))\r
+                         PressedKey = (KeyboardReport.KeyCode[0] - 0x1E) + '0';\r
+                       else if (KeyboardReport.KeyCode[0] == 0x2C)\r
                          PressedKey = ' ';                                             \r
-                       else if (KeyboardReport.KeyCode == 0x28)\r
+                       else if (KeyboardReport.KeyCode[0] == 0x28)\r
                          PressedKey = '\n';\r
                                 \r
                        /* Print the pressed key character out through the serial port if valid */\r