diff options
Diffstat (limited to 'Demos/Host/LowLevel/KeyboardHostWithParser')
-rw-r--r-- | Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c index 3b97ad7ed..0cba5fccd 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -172,7 +172,11 @@ void Keyboard_HID_Task(void) if ((ErrorCode = GetHIDReportData()) != ParseSuccessful)
{
puts_P(PSTR(ESC_FG_RED "Report Parse Error.\r\n"));
- printf_P(PSTR(" -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);
+
+ if (!(HIDReportInfo->TotalReportItems))
+ puts_P(PSTR("Not a valid Keyboard." ESC_FG_WHITE));
+ else
+ printf_P(PSTR(" -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);
/* Indicate error via status LEDs */
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
@@ -200,7 +204,7 @@ void Keyboard_HID_Task(void) ((ReportSizeFeatureBits >> 3) + ((ReportSizeFeatureBits & 0x07) != 0)));
}
- puts_P(PSTR("HID Device Enumerated.\r\n"));
+ puts_P(PSTR("Keyboard Enumerated.\r\n"));
USB_HostState = HOST_STATE_Configured;
break;
|