uint8_t ErrorCode;\r
\r
/* Get Configuration Descriptor size from the device */\r
- if (USB_Host_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)\r
+ if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)\r
return ControlError;\r
\r
/* Ensure that the Configuration Descriptor isn't too large */\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */\r
- USB_Host_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);\r
+ USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)\r
return InvalidConfigDataReturned;\r
\r
/* Get the keyboard interface from the configuration descriptor */\r
- if ((ErrorCode = USB_Host_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextKeyboardInterface)))\r
+ if ((ErrorCode = USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextKeyboardInterface)))\r
{\r
/* Descriptor not found, error out */\r
return NoHIDInterfaceFound;\r
}\r
\r
/* Get the keyboard interface's HID descriptor */\r
- if ((ErrorCode = USB_Host_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextHID)))\r
+ if ((ErrorCode = USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextHID)))\r
{\r
/* Descriptor not found, error out */\r
return NoHIDDescriptorFound;\r
HIDReportSize = DESCRIPTOR_CAST(ConfigDescriptorData, USB_Descriptor_HID_t).HIDReportLength;\r
\r
/* Get the keyboard interface's data endpoint descriptor */\r
- if ((ErrorCode = USB_Host_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
+ if ((ErrorCode = USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
NextInterfaceKeyboardDataEndpoint)))\r
{\r
/* Descriptor not found, error out */\r
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == KEYBOARD_CLASS) &&\r
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == KEYBOARD_PROTOCOL))\r
{\r
- return Descriptor_Search_Found;\r
+ return DESCRIPTOR_SEARCH_Found;\r
}\r
}\r
\r
- return Descriptor_Search_NotFound;\r
+ return DESCRIPTOR_SEARCH_NotFound;\r
}\r
\r
/** Descriptor comparator function. This comparator function is can be called while processing an attached USB device's\r
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)\r
{\r
if (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Endpoint_t).EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)\r
- return Descriptor_Search_Found;\r
+ return DESCRIPTOR_SEARCH_Found;\r
}\r
else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)\r
{\r
- return Descriptor_Search_Fail;\r
+ return DESCRIPTOR_SEARCH_Fail;\r
}\r
\r
- return Descriptor_Search_NotFound;\r
+ return DESCRIPTOR_SEARCH_NotFound;\r
}\r
\r
/** Descriptor comparator function. This comparator function is can be called while processing an attached USB device's\r
DESCRIPTOR_COMPARATOR(NextHID)\r
{\r
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_HID)\r
- return Descriptor_Search_Found;\r
+ return DESCRIPTOR_SEARCH_Found;\r
else\r
- return Descriptor_Search_NotFound; \r
+ return DESCRIPTOR_SEARCH_NotFound; \r
}\r