Fix low level host mode demos not correctly fetching the next endpoint when an invali...
[pub/USBasp.git] / Demos / Host / ClassDriver / KeyboardHostWithParser / KeyboardHostWithParser.c
index 9d28e71..3fd23f0 100644 (file)
@@ -53,7 +53,7 @@ USB_ClassInfo_HID_Host_t Keyboard_HID_Interface =
                                .DataOUTPipeNumber      = 2,
                                .DataOUTPipeDoubleBank  = false,
                                
                                .DataOUTPipeNumber      = 2,
                                .DataOUTPipeDoubleBank  = false,
                                
-                               .HIDInterfaceProtocol   = HID_NON_BOOT_PROTOCOL,
+                               .HIDInterfaceProtocol   = HID_BOOTP_NonBootProtocol,
                                
                                .HIDParserData          = &HIDReportInfo
                        },
                                
                                .HIDParserData          = &HIDReportInfo
                        },
@@ -138,12 +138,12 @@ int main(void)
                                                if ((ReportItem->Attributes.Usage.Page      == USAGE_PAGE_KEYBOARD) &&
                                                        (ReportItem->Attributes.BitSize         == 8)                   &&
                                                        (ReportItem->Attributes.Logical.Maximum > 1)                    &&
                                                if ((ReportItem->Attributes.Usage.Page      == USAGE_PAGE_KEYBOARD) &&
                                                        (ReportItem->Attributes.BitSize         == 8)                   &&
                                                        (ReportItem->Attributes.Logical.Maximum > 1)                    &&
-                                                       (ReportItem->ItemType                   == REPORT_ITEM_TYPE_In))
+                                                       (ReportItem->ItemType                   == HID_REPORT_ITEM_In))
                                                {
                                                        /* Key code is an unsigned char in length, cast to the appropriate type */
                                                        uint8_t KeyCode = (uint8_t)ReportItem->Value;
 
                                                {
                                                        /* Key code is an unsigned char in length, cast to the appropriate type */
                                                        uint8_t KeyCode = (uint8_t)ReportItem->Value;
 
-                                                       /* If scancode is non-zero, a key is being pressed */
+                                                       /* If scan-code is non-zero, a key is being pressed */
                                                        if (KeyCode)
                                                        {
                                                                /* Toggle status LED to indicate keypress */
                                                        if (KeyCode)
                                                        {
                                                                /* Toggle status LED to indicate keypress */
@@ -151,7 +151,7 @@ int main(void)
 
                                                                char PressedKey = 0;
 
 
                                                                char PressedKey = 0;
 
-                                                               /* Convert scancode to printable character if alphanumeric */
+                                                               /* Convert scan-code to printable character if alphanumeric */
                                                                if ((KeyCode >= 0x04) && (KeyCode <= 0x1D))
                                                                  PressedKey = (KeyCode - 0x04) + 'A';
                                                                else if ((KeyCode >= 0x1E) && (KeyCode <= 0x27))
                                                                if ((KeyCode >= 0x04) && (KeyCode <= 0x1D))
                                                                  PressedKey = (KeyCode - 0x04) + 'A';
                                                                else if ((KeyCode >= 0x1E) && (KeyCode <= 0x27))
@@ -166,7 +166,7 @@ int main(void)
                                                                  putchar(PressedKey);
                                                        }
                                                        
                                                                  putchar(PressedKey);
                                                        }
                                                        
-                                                       /* Once a scancode is found, stop scanning through the report items */
+                                                       /* Once a scan-code is found, stop scanning through the report items */
                                                        break;
                                                }
                                        }
                                                        break;
                                                }
                                        }