Whitespace corrections.

Make Printer Host mode Class driver interface descriptor search routine pre-cast the current interface descriptor to simplify the value checks.
pull/1469/head
Dean Camera 14 years ago
parent a1e453e900
commit 383d167125

@ -108,9 +108,12 @@ static uint8_t DCOMP_PRNT_Host_NextPRNTInterface(void* CurrentDescriptor)
{
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == PRINTER_CLASS) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == PRINTER_SUBCLASS) &&
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == PRINTER_PROTOCOL))
USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
USB_Descriptor_Interface_t);
if ((CurrentInterface->Class == PRINTER_CLASS) &&
(CurrentInterface->SubClass == PRINTER_SUBCLASS) &&
(CurrentInterface->Protocol == PRINTER_PROTOCOL))
{
return DESCRIPTOR_SEARCH_Found;
}

Loading…
Cancel
Save