X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/f9f1bcc25c17b031029200cd9648d76d4ee39dc4..93b24a25dfd49eba38ac9523f1d7f779dfbbb026:/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c index 69ba64b13..670cab919 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c @@ -181,6 +181,20 @@ void Mouse_HID_Task(void) USB_HostState = HOST_STATE_WaitForDeviceRemoval; break; } + + printf("Total Reports: %d\r\n", HIDReportInfo.TotalDeviceReports); + + for (uint8_t i = 0; i < HIDReportInfo.TotalDeviceReports; i++) + { + HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[i]; + + /* Print out the byte sizes of each report within the device */ + printf_P(PSTR(" + Report ID %d - In: %d bytes, Out: %d bytes, Feature: %d bytes\r\n"), + CurrReportIDInfo->ReportID, + ((CurrReportIDInfo->BitsIn >> 3) + (CurrReportIDInfo->BitsIn & 0x07)), + ((CurrReportIDInfo->BitsOut >> 3) + (CurrReportIDInfo->BitsOut & 0x07)), + ((CurrReportIDInfo->BitsFeature >> 3) + (CurrReportIDInfo->BitsFeature & 0x07))); + } puts_P(PSTR("Mouse Enumerated.\r\n")); @@ -190,7 +204,7 @@ void Mouse_HID_Task(void) /* Select and unfreeze mouse data pipe */ Pipe_SelectPipe(MOUSE_DATAPIPE); Pipe_Unfreeze(); - + /* Check to see if a packet has been received */ if (Pipe_IsINReceived()) {