forked from mfulz_github/qmk_firmware
Whitespace corrections.
Make Printer Host mode Class driver interface descriptor search routine pre-cast the current interface descriptor to simplify the value checks.
This commit is contained in:
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_TYPE(CurrentDescriptor) == DTYPE_Interface)
|
||||||
{
|
{
|
||||||
if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == PRINTER_CLASS) &&
|
USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
|
||||||
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == PRINTER_SUBCLASS) &&
|
USB_Descriptor_Interface_t);
|
||||||
(DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == PRINTER_PROTOCOL))
|
|
||||||
|
if ((CurrentInterface->Class == PRINTER_CLASS) &&
|
||||||
|
(CurrentInterface->SubClass == PRINTER_SUBCLASS) &&
|
||||||
|
(CurrentInterface->Protocol == PRINTER_PROTOCOL))
|
||||||
{
|
{
|
||||||
return DESCRIPTOR_SEARCH_Found;
|
return DESCRIPTOR_SEARCH_Found;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue