From 663f449c10b9a77a429aaa81066ce2b43ca6dc39 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 19 Apr 2009 11:43:21 +0000 Subject: Fixed incorrect HID interface class and subclass values in the Mouse and KeyboardMouse demos (thanks to Brian Dickman). Capitolised the "Descriptor_Search" and "Descriptor_Search_Comp" prefixes of the values in the DSearch_Return_ErrorCodes_t and DSearch_Comp_Return_ErrorCodes_t enums. Minor documentation improvements. --- Demos/Host/MouseHostWithParser/ConfigDescriptor.c | 14 +++++++------- Demos/Host/MouseHostWithParser/HIDReport.c | 2 +- Demos/Host/MouseHostWithParser/HIDReport.h | 2 +- Demos/Host/MouseHostWithParser/MouseHostWithParser.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'Demos/Host/MouseHostWithParser') diff --git a/Demos/Host/MouseHostWithParser/ConfigDescriptor.c b/Demos/Host/MouseHostWithParser/ConfigDescriptor.c index 9f0c444e2..486a0c7fb 100644 --- a/Demos/Host/MouseHostWithParser/ConfigDescriptor.c +++ b/Demos/Host/MouseHostWithParser/ConfigDescriptor.c @@ -123,11 +123,11 @@ DESCRIPTOR_COMPARATOR(NextMouseInterface) if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == MOUSE_CLASS) && (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == MOUSE_PROTOCOL)) { - return Descriptor_Search_Found; + return DESCRIPTOR_SEARCH_Found; } } - return Descriptor_Search_NotFound; + return DESCRIPTOR_SEARCH_NotFound; } /** Descriptor comparator function. This comparator function is can be called while processing an attached USB device's @@ -144,14 +144,14 @@ DESCRIPTOR_COMPARATOR(NextInterfaceMouseDataEndpoint) if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint) { if (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Endpoint_t).EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN) - return Descriptor_Search_Found; + return DESCRIPTOR_SEARCH_Found; } else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) { - return Descriptor_Search_Fail; + return DESCRIPTOR_SEARCH_Fail; } - return Descriptor_Search_NotFound; + return DESCRIPTOR_SEARCH_NotFound; } /** Descriptor comparator function. This comparator function is can be called while processing an attached USB device's @@ -165,7 +165,7 @@ DESCRIPTOR_COMPARATOR(NextInterfaceMouseDataEndpoint) DESCRIPTOR_COMPARATOR(NextHID) { if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_HID) - return Descriptor_Search_Found; + return DESCRIPTOR_SEARCH_Found; else - return Descriptor_Search_NotFound; + return DESCRIPTOR_SEARCH_NotFound; } diff --git a/Demos/Host/MouseHostWithParser/HIDReport.c b/Demos/Host/MouseHostWithParser/HIDReport.c index 3d06bb140..176f18cf6 100644 --- a/Demos/Host/MouseHostWithParser/HIDReport.c +++ b/Demos/Host/MouseHostWithParser/HIDReport.c @@ -64,7 +64,7 @@ uint8_t GetHIDReportData(void) return ParseControlError; /* Send the HID report to the parser for processing */ - if (ProcessHIDReport(HIDReportData, HIDReportSize, &HIDReportInfo) != HID_PARSE_Successful) + if (USB_ProcessHIDReport(HIDReportData, HIDReportSize, &HIDReportInfo) != HID_PARSE_Successful) return ParseError; return ParseSuccessful; diff --git a/Demos/Host/MouseHostWithParser/HIDReport.h b/Demos/Host/MouseHostWithParser/HIDReport.h index f5ad40be3..a4fc76fa7 100644 --- a/Demos/Host/MouseHostWithParser/HIDReport.h +++ b/Demos/Host/MouseHostWithParser/HIDReport.h @@ -37,7 +37,7 @@ #define _HID_REPORT_H_ /* Includes: */ - #include // HID Class Report Parser + #include // USB Functionality #include "MouseHostWithParser.h" diff --git a/Demos/Host/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/MouseHostWithParser/MouseHostWithParser.c index 259da2a60..44c68eea7 100644 --- a/Demos/Host/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/MouseHostWithParser/MouseHostWithParser.c @@ -312,7 +312,7 @@ void ProcessMouseReport(uint8_t* MouseReport) (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) { /* Get the mouse button value */ - FoundData = GetReportItemInfo(MouseReport, ReportItem); + FoundData = USB_GetHIDReportItemInfo(MouseReport, ReportItem); /* For multi-report devices - if the requested data was not in the issued report, continue */ if (!(FoundData)) @@ -328,7 +328,7 @@ void ProcessMouseReport(uint8_t* MouseReport) (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) { /* Get the mouse relative position value */ - FoundData = GetReportItemInfo(MouseReport, ReportItem); + FoundData = USB_GetHIDReportItemInfo(MouseReport, ReportItem); /* For multi-report devices - if the requested data was not in the issued report, continue */ if (!(FoundData)) -- cgit v1.2.3