Pipe_BoundEndpointNumber() has been renamed to Pipe_GetBoundEndpointAddress(), and...
[pub/USBasp.git] / Demos / Host / LowLevel / KeyboardHostWithParser / KeyboardHostWithParser.c
index bac6bdc..6ef7a96 100644 (file)
@@ -103,7 +103,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
 /** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
 void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
 {
-       USB_ShutDown();
+       USB_Disable();
 
        printf_P(PSTR(ESC_FG_RED "Host Mode Error\r\n"
                                 " -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);
@@ -287,9 +287,13 @@ void ProcessKeyboardReport(uint8_t* KeyboardReport)
                                        PressedKey = (KeyCode - HID_KEYBOARD_SC_A) + 'A';
                                }
                                else if ((KeyCode >= HID_KEYBOARD_SC_1_AND_EXCLAMATION) &
-                                                (KeyCode <= HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS))
+                                                (KeyCode  < HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS))
                                {
-                                       PressedKey = (KeyCode - HID_KEYBOARD_SC_1_AND_EXCLAMATION) + '0';
+                                       PressedKey = (KeyCode - HID_KEYBOARD_SC_1_AND_EXCLAMATION) + '1';
+                               }
+                               else if (KeyCode == HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS)
+                               {
+                                       PressedKey = '0';                                               
                                }
                                else if (KeyCode == HID_KEYBOARD_SC_SPACE)
                                {