aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Class/Host
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/USB/Class/Host')
-rw-r--r--LUFA/Drivers/USB/Class/Host/HID.c18
-rw-r--r--LUFA/Drivers/USB/Class/Host/HID.h2
-rw-r--r--LUFA/Drivers/USB/Class/Host/Printer.c10
-rw-r--r--LUFA/Drivers/USB/Class/Host/Printer.h4
4 files changed, 20 insertions, 14 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/HID.c b/LUFA/Drivers/USB/Class/Host/HID.c
index cd22e65fc..b0593f0f4 100644
--- a/LUFA/Drivers/USB/Class/Host/HID.c
+++ b/LUFA/Drivers/USB/Class/Host/HID.c
@@ -65,9 +65,12 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
HIDInterfaceInfo->State.InterfaceNumber = CurrentHIDInterface->InterfaceNumber;
HIDInterfaceInfo->State.SupportsBootProtocol = (CurrentHIDInterface->SubClass != HID_BOOTP_NonBootProtocol);
- if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, DCOMP_HID_NextHID) != DESCRIPTOR_SEARCH_COMP_Found)
- return HID_ENUMERROR_NoCompatibleInterfaceFound;
-
+ if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
+ DCOMP_HID_Host_NextHID) != DESCRIPTOR_SEARCH_COMP_Found)
+ {
+ return HID_ENUMERROR_NoCompatibleInterfaceFound;
+ }
+
HIDInterfaceInfo->State.HIDReportSize = DESCRIPTOR_PCAST(ConfigDescriptorData,
USB_HID_Descriptor_HID_t)->HIDReportLength;
@@ -94,8 +97,11 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
HIDInterfaceInfo->State.InterfaceNumber = CurrentHIDInterface->InterfaceNumber;
HIDInterfaceInfo->State.SupportsBootProtocol = (CurrentHIDInterface->SubClass != HID_BOOTP_NonBootProtocol);
- if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, DCOMP_HID_NextHID) != DESCRIPTOR_SEARCH_COMP_Found)
- return HID_ENUMERROR_NoCompatibleInterfaceFound;
+ if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
+ DCOMP_HID_Host_NextHID) != DESCRIPTOR_SEARCH_COMP_Found)
+ {
+ return HID_ENUMERROR_NoCompatibleInterfaceFound;
+ }
HIDInterfaceInfo->State.HIDReportSize = DESCRIPTOR_PCAST(ConfigDescriptorData,
USB_HID_Descriptor_HID_t)->HIDReportLength;
@@ -157,7 +163,7 @@ static uint8_t DCOMP_HID_Host_NextHIDInterface(void* const CurrentDescriptor)
return DESCRIPTOR_SEARCH_NotFound;
}
-static uint8_t DCOMP_HID_NextHID(void* const CurrentDescriptor)
+static uint8_t DCOMP_HID_Host_NextHID(void* const CurrentDescriptor)
{
if (DESCRIPTOR_TYPE(CurrentDescriptor) == HID_DTYPE_HID)
return DESCRIPTOR_SEARCH_Found;
diff --git a/LUFA/Drivers/USB/Class/Host/HID.h b/LUFA/Drivers/USB/Class/Host/HID.h
index fc9249c21..8a16a4f6b 100644
--- a/LUFA/Drivers/USB/Class/Host/HID.h
+++ b/LUFA/Drivers/USB/Class/Host/HID.h
@@ -298,7 +298,7 @@
/* Function Prototypes: */
#if defined(__INCLUDE_FROM_HID_CLASS_HOST_C)
static uint8_t DCOMP_HID_Host_NextHIDInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
- static uint8_t DCOMP_HID_NextHID(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
+ static uint8_t DCOMP_HID_Host_NextHID(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
static uint8_t DCOMP_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
#endif
#endif
diff --git a/LUFA/Drivers/USB/Class/Host/Printer.c b/LUFA/Drivers/USB/Class/Host/Printer.c
index e1c3e1550..6b16228d5 100644
--- a/LUFA/Drivers/USB/Class/Host/Printer.c
+++ b/LUFA/Drivers/USB/Class/Host/Printer.c
@@ -49,7 +49,7 @@ uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceI
return PRNT_ENUMERROR_InvalidConfigDescriptor;
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &DeviceConfigDescriptor,
- DCOMP_PRNT_NextPRNTInterface) != DESCRIPTOR_SEARCH_COMP_Found)
+ DCOMP_PRNT_Host_NextPRNTInterface) != DESCRIPTOR_SEARCH_COMP_Found)
{
return PRNT_ENUMERROR_NoCompatibleInterfaceFound;
}
@@ -62,13 +62,13 @@ uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceI
while (!(DataINEndpoint) || !(DataOUTEndpoint))
{
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &DeviceConfigDescriptor,
- DCOMP_PRNT_NextPRNTInterfaceEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
+ DCOMP_PRNT_Host_NextPRNTInterfaceEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
{
DataINEndpoint = NULL;
DataOUTEndpoint = NULL;
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &DeviceConfigDescriptor,
- DCOMP_PRNT_NextPRNTInterface) != DESCRIPTOR_SEARCH_COMP_Found)
+ DCOMP_PRNT_Host_NextPRNTInterface) != DESCRIPTOR_SEARCH_COMP_Found)
{
return PRNT_ENUMERROR_NoCompatibleInterfaceFound;
}
@@ -114,7 +114,7 @@ uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceI
return PRNT_ENUMERROR_NoError;
}
-static uint8_t DCOMP_PRNT_NextPRNTInterface(void* CurrentDescriptor)
+static uint8_t DCOMP_PRNT_Host_NextPRNTInterface(void* CurrentDescriptor)
{
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{
@@ -129,7 +129,7 @@ static uint8_t DCOMP_PRNT_NextPRNTInterface(void* CurrentDescriptor)
return DESCRIPTOR_SEARCH_NotFound;
}
-static uint8_t DCOMP_PRNT_NextPRNTInterfaceEndpoint(void* CurrentDescriptor)
+static uint8_t DCOMP_PRNT_Host_NextPRNTInterfaceEndpoint(void* CurrentDescriptor)
{
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
{
diff --git a/LUFA/Drivers/USB/Class/Host/Printer.h b/LUFA/Drivers/USB/Class/Host/Printer.h
index 9848287f4..4cbcbff4d 100644
--- a/LUFA/Drivers/USB/Class/Host/Printer.h
+++ b/LUFA/Drivers/USB/Class/Host/Printer.h
@@ -271,8 +271,8 @@
/* Function Prototypes: */
#if defined(__INCLUDE_FROM_PRINTER_CLASS_HOST_C)
- static uint8_t DCOMP_PRNT_NextPRNTInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
- static uint8_t DCOMP_PRNT_NextPRNTInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
+ static uint8_t DCOMP_PRNT_Host_NextPRNTInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
+ static uint8_t DCOMP_PRNT_Host_NextPRNTInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
#endif
#endif