Commit 6bbd2a99 authored by Dean Camera's avatar Dean Camera
Browse files

Fix building of KeyboardHostWithParser and MouseHostWithParser demos broken by...

Fix building of KeyboardHostWithParser and MouseHostWithParser demos broken by HIDParser API changes.
parent 0029cb45
......@@ -188,12 +188,16 @@ void Keyboard_HID_Task(void)
{
HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[i];
uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_In];
uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Out];
uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Feature];
/* 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)));
CurrReportIDInfo->ReportID,
((ReportSizeInBits >> 3) + ((ReportSizeInBits & 0x07) != 0)),
((ReportSizeOutBits >> 3) + ((ReportSizeOutBits & 0x07) != 0)),
((ReportSizeFeatureBits >> 3) + ((ReportSizeFeatureBits & 0x07) != 0)));
}
puts_P(PSTR("Keyboard Enumerated.\r\n"));
......
......@@ -187,13 +187,17 @@ void Mouse_HID_Task(void)
for (uint8_t i = 0; i < HIDReportInfo.TotalDeviceReports; i++)
{
HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[i];
uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_In];
uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Out];
uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Feature];
/* 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)));
CurrReportIDInfo->ReportID,
((ReportSizeInBits >> 3) + ((ReportSizeInBits & 0x07) != 0)),
((ReportSizeOutBits >> 3) + ((ReportSizeOutBits & 0x07) != 0)),
((ReportSizeFeatureBits >> 3) + ((ReportSizeFeatureBits & 0x07) != 0)));
}
puts_P(PSTR("Mouse Enumerated.\r\n"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment