aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/KeyboardHostWithParser
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-04-19 11:43:21 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-04-19 11:43:21 +0000
commit663f449c10b9a77a429aaa81066ce2b43ca6dc39 (patch)
tree3a6f06560fa24589836aaf9d2aa8747383913aae /Demos/Host/KeyboardHostWithParser
parent32e735b2b2eefb74e0415a5826692f7ba8c0a984 (diff)
downloadlufa-663f449c10b9a77a429aaa81066ce2b43ca6dc39.tar.gz
lufa-663f449c10b9a77a429aaa81066ce2b43ca6dc39.tar.bz2
lufa-663f449c10b9a77a429aaa81066ce2b43ca6dc39.zip
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.
Diffstat (limited to 'Demos/Host/KeyboardHostWithParser')
-rw-r--r--Demos/Host/KeyboardHostWithParser/ConfigDescriptor.c14
-rw-r--r--Demos/Host/KeyboardHostWithParser/HIDReport.c2
-rw-r--r--Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/Demos/Host/KeyboardHostWithParser/ConfigDescriptor.c b/Demos/Host/KeyboardHostWithParser/ConfigDescriptor.c
index 73f0ce216..9b56823ef 100644
--- a/Demos/Host/KeyboardHostWithParser/ConfigDescriptor.c
+++ b/Demos/Host/KeyboardHostWithParser/ConfigDescriptor.c
@@ -123,11 +123,11 @@ DESCRIPTOR_COMPARATOR(NextKeyboardInterface)
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == KEYBOARD_CLASS) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == KEYBOARD_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(NextInterfaceKeyboardDataEndpoint)
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(NextInterfaceKeyboardDataEndpoint)
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/KeyboardHostWithParser/HIDReport.c b/Demos/Host/KeyboardHostWithParser/HIDReport.c
index d177a8877..b985a45fe 100644
--- a/Demos/Host/KeyboardHostWithParser/HIDReport.c
+++ b/Demos/Host/KeyboardHostWithParser/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/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c
index d7d5f9414..ff4ae75c8 100644
--- a/Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c
@@ -310,7 +310,7 @@ void ProcessKeyboardReport(uint8_t* KeyboardReport)
(ReportItem->ItemType == REPORT_ITEM_TYPE_In))
{
/* Retrieve the keyboard scancode from the report data retrieved from the device */
- bool FoundData = GetReportItemInfo(KeyboardReport, ReportItem);
+ bool FoundData = USB_GetHIDReportItemInfo(KeyboardReport, ReportItem);
/* For multi-report devices - if the requested data was not in the issued report, continue */
if (!(FoundData))