aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/LowLevel/MouseHostWithParser
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-09-21 06:32:16 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-09-21 06:32:16 +0000
commit6bbd2a99c216bd47aeeaa53ab3687cb045a37e5a (patch)
tree957a703be7631052c50d623e06cc0615ffaf0c49 /Demos/Host/LowLevel/MouseHostWithParser
parent0029cb454ee35c8c7bb41659bd2ed9109f26c375 (diff)
downloadlufa-6bbd2a99c216bd47aeeaa53ab3687cb045a37e5a.tar.gz
lufa-6bbd2a99c216bd47aeeaa53ab3687cb045a37e5a.tar.bz2
lufa-6bbd2a99c216bd47aeeaa53ab3687cb045a37e5a.zip
Fix building of KeyboardHostWithParser and MouseHostWithParser demos broken by HIDParser API changes.
Diffstat (limited to 'Demos/Host/LowLevel/MouseHostWithParser')
-rw-r--r--Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
index 670cab919..b9b79f19f 100644
--- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
+++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
@@ -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"));