Whitespace corrections.
authorDean Camera <dean@fourwalledcubicle.com>
Fri, 1 Oct 2010 00:11:32 +0000 (00:11 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Fri, 1 Oct 2010 00:11:32 +0000 (00:11 +0000)
Make Printer Host mode Class driver interface descriptor search routine pre-cast the current interface descriptor to simplify the value checks.

LUFA/Drivers/USB/Class/Host/CDC.c
LUFA/Drivers/USB/Class/Host/HID.c
LUFA/Drivers/USB/Class/Host/HIDParser.c
LUFA/Drivers/USB/Class/Host/MIDI.c
LUFA/Drivers/USB/Class/Host/MassStorage.c
LUFA/Drivers/USB/Class/Host/Printer.c
LUFA/Drivers/USB/Class/Host/RNDIS.c
LUFA/Drivers/USB/Class/Host/StillImage.c

index 93a5895..0f81d0e 100644 (file)
@@ -59,7 +59,7 @@ uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo
                        if (NotificationEndpoint)
                        {
                                if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
-                                                                                         DCOMP_CDC_Host_NextCDCDataInterface) != DESCRIPTOR_SEARCH_COMP_Found)
+                                                             DCOMP_CDC_Host_NextCDCDataInterface) != DESCRIPTOR_SEARCH_COMP_Found)
                                {
                                        return CDC_ENUMERROR_NoCompatibleInterfaceFound;
                                }                       
@@ -70,7 +70,7 @@ uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo
                        else
                        {
                                if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
-                                                                                         DCOMP_CDC_Host_NextCDCControlInterface) != DESCRIPTOR_SEARCH_COMP_Found)
+                                                             DCOMP_CDC_Host_NextCDCControlInterface) != DESCRIPTOR_SEARCH_COMP_Found)
                                {
                                        return CDC_ENUMERROR_NoCompatibleInterfaceFound;
                                }
@@ -103,7 +103,7 @@ uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo
                if (PipeNum == CDCInterfaceInfo->Config.DataINPipeNumber)
                {
                        Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
-                                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
+                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
                                           CDCInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
 
                        CDCInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
@@ -144,7 +144,7 @@ static uint8_t DCOMP_CDC_Host_NextCDCControlInterface(void* const CurrentDescrip
        
                if ((CurrentInterface->Class    == CDC_CONTROL_CLASS)    &&
                    (CurrentInterface->SubClass == CDC_CONTROL_SUBCLASS) &&
-                       (CurrentInterface->Protocol == CDC_CONTROL_PROTOCOL))
+                   (CurrentInterface->Protocol == CDC_CONTROL_PROTOCOL))
                {
                        return DESCRIPTOR_SEARCH_Found;
                }
@@ -162,7 +162,7 @@ static uint8_t DCOMP_CDC_Host_NextCDCDataInterface(void* const CurrentDescriptor
        
                if ((CurrentInterface->Class    == CDC_DATA_CLASS)    &&
                    (CurrentInterface->SubClass == CDC_DATA_SUBCLASS) &&
-                       (CurrentInterface->Protocol == CDC_DATA_PROTOCOL))
+                   (CurrentInterface->Protocol == CDC_DATA_PROTOCOL))
                {
                        return DESCRIPTOR_SEARCH_Found;
                }
index 9dfc00a..ce1ceb1 100644 (file)
@@ -62,7 +62,7 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
                        do
                        {
                                if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
-                                                                                         DCOMP_HID_Host_NextHIDInterface) != DESCRIPTOR_SEARCH_COMP_Found)
+                                                             DCOMP_HID_Host_NextHIDInterface) != DESCRIPTOR_SEARCH_COMP_Found)
                                {
                                        return HID_ENUMERROR_NoCompatibleInterfaceFound;
                                }
@@ -90,7 +90,7 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
                if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
                  DataINEndpoint = EndpointData;
                else
-                 DataOUTEndpoint = EndpointData;                 
+                 DataOUTEndpoint = EndpointData;  
        }
        
        for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
@@ -98,17 +98,17 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
                if (PipeNum == HIDInterfaceInfo->Config.DataINPipeNumber)
                {
                        Pipe_ConfigurePipe(PipeNum, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
-                                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
-                                                          HIDInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
+                                          HIDInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
                        Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
                        
-                       HIDInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;                  
+                       HIDInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
                }
                else if (PipeNum == HIDInterfaceInfo->Config.DataOUTPipeNumber)
                {
                        Pipe_ConfigurePipe(PipeNum, EP_TYPE_INTERRUPT, PIPE_TOKEN_OUT,
-                                                          DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
-                                                          HIDInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+                                          DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
+                                          HIDInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
                        Pipe_SetInterruptPeriod(DataOUTEndpoint->PollingIntervalMS);
 
                        HIDInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
@@ -146,7 +146,7 @@ static uint8_t DCOMP_HID_Host_NextHID(void* const CurrentDescriptor)
        else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
          return DESCRIPTOR_SEARCH_Fail;
        else
-         return DESCRIPTOR_SEARCH_NotFound;      
+         return DESCRIPTOR_SEARCH_NotFound;
 }
 
 static uint8_t DCOMP_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescriptor)
@@ -184,9 +184,9 @@ uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceI
        Pipe_SelectPipe(PIPE_CONTROLPIPE);
        
        return USB_Host_SendControlRequest(Buffer);
-}                                                                                         
+}
 #endif
-                                                                                  
 uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
                                void* Buffer)
 {
@@ -223,7 +223,7 @@ uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
        if ((ErrorCode = Pipe_Read_Stream_LE(BufferPos, ReportSize, NO_STREAM_CALLBACK)) != PIPE_RWSTREAM_NoError)
          return ErrorCode;
         
-       Pipe_ClearIN();         
+       Pipe_ClearIN();
        Pipe_Freeze();
        
        return PIPE_RWSTREAM_NoError;
index 58ee000..c5d5f94 100644 (file)
@@ -149,9 +149,9 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
                                                memset(CurrReportIDInfo, 0x00, sizeof(HID_ReportSizeInfo_t));
                                        }
                                }
-
-                               ParserData->UsingReportIDs = true;                              
-
+                               
+                               ParserData->UsingReportIDs = true;
+                               
                                CurrReportIDInfo->ReportID = CurrStateTable->ReportID;
                                break;
                        case (TYPE_LOCAL | TAG_LOCAL_USAGE):
@@ -176,7 +176,7 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
                                        HID_CollectionPath_t* ParentCollectionPath = CurrCollectionPath;
                        
                                        CurrCollectionPath = &ParserData->CollectionPaths[1];
-
+                                       
                                        while (CurrCollectionPath->Parent != NULL)
                                        {
                                                if (CurrCollectionPath == &ParserData->CollectionPaths[HID_MAX_COLLECTIONS - 1])
@@ -184,7 +184,7 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
                                        
                                                CurrCollectionPath++;
                                        }
-
+                                       
                                        CurrCollectionPath->Parent = ParentCollectionPath;
                                }
                                
@@ -222,15 +222,15 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
                                        memcpy(&NewReportItem.Attributes,
                                               &CurrStateTable->Attributes,
                                               sizeof(HID_ReportItem_Attributes_t));
-
+                                                  
                                        NewReportItem.ItemFlags      = ReportItemData;
                                        NewReportItem.CollectionPath = CurrCollectionPath;
                                        NewReportItem.ReportID       = CurrStateTable->ReportID;
-
+                                       
                                        if (UsageListSize)
                                        {
                                                NewReportItem.Attributes.Usage.Usage = UsageList[0];
-
+                                               
                                                for (uint8_t i = 0; i < UsageListSize; i++)
                                                  UsageList[i] = UsageList[i + 1];
                                                  
@@ -242,7 +242,7 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
                                        }
                                        
                                        uint8_t ItemTag = (HIDReportItem & TAG_MASK);
-
+                                       
                                        if (ItemTag == TAG_MAIN_INPUT)
                                          NewReportItem.ItemType = HID_REPORT_ITEM_In;
                                        else if (ItemTag == TAG_MAIN_OUTPUT)
@@ -251,14 +251,14 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
                                          NewReportItem.ItemType = HID_REPORT_ITEM_Feature;
                                        
                                        NewReportItem.BitOffset = CurrReportIDInfo->ReportSizeBits[NewReportItem.ItemType];
-
+                                       
                                        CurrReportIDInfo->ReportSizeBits[NewReportItem.ItemType] += CurrStateTable->Attributes.BitSize;
-
+                                       
                                        if (ParserData->LargestReportSizeBits < NewReportItem.BitOffset)
                                          ParserData->LargestReportSizeBits = NewReportItem.BitOffset;
                                        
                                        if (!(ReportItemData & IOF_CONSTANT) && CALLBACK_HIDParser_FilterHIDReportItem(&NewReportItem))
-                                       {                                       
+                                       {
                                                if (ParserData->TotalReportItems == HID_MAX_REPORTITEMS)
                                                  return HID_PARSE_InsufficientReportItems;
                                        
@@ -297,13 +297,13 @@ bool USB_GetHIDReportItemInfo(const uint8_t* ReportData,
        {
                if (ReportItem->ReportID != ReportData[0])
                  return false;
-
+                 
                ReportData++;
        }
-
+       
        ReportItem->PreviousValue = ReportItem->Value;
        ReportItem->Value = 0;
-
+       
        while (DataBitsRem--)
        {
                if (ReportData[CurrentBit / 8] & (1 << (CurrentBit % 8)))
@@ -322,20 +322,20 @@ void USB_SetHIDReportItemInfo(uint8_t* ReportData,
        uint16_t DataBitsRem  = ReportItem->Attributes.BitSize;
        uint16_t CurrentBit   = ReportItem->BitOffset;
        uint32_t BitMask      = (1 << 0);
-
+       
        if (ReportItem->ReportID)
        {
                ReportData[0] = ReportItem->ReportID;
                ReportData++;
        }
-
+       
        ReportItem->PreviousValue = ReportItem->Value;
-
+       
        while (DataBitsRem--)
        {
                if (ReportItem->Value & (1 << (CurrentBit % 8)))
                  ReportData[CurrentBit / 8] |= BitMask;
-
+                 
                CurrentBit++;
                BitMask <<= 1;
        }
index ed958c1..904e1fe 100644 (file)
@@ -56,7 +56,7 @@ uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceI
                                              DCOMP_MIDI_Host_NextMIDIStreamingDataEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
                {
                        if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
-                                                                                 DCOMP_MIDI_Host_NextMIDIStreamingInterface) != DESCRIPTOR_SEARCH_COMP_Found)
+                                                     DCOMP_MIDI_Host_NextMIDIStreamingInterface) != DESCRIPTOR_SEARCH_COMP_Found)
                        {
                                return MIDI_ENUMERROR_NoCompatibleInterfaceFound;
                        }
@@ -82,16 +82,16 @@ uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceI
                if (PipeNum == MIDIInterfaceInfo->Config.DataINPipeNumber)
                {
                        Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
-                                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
-                                                          MIDIInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
+                                          MIDIInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
                        
                        MIDIInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;                 
                }
                else if (PipeNum == MIDIInterfaceInfo->Config.DataOUTPipeNumber)
                {
                        Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_OUT,
-                                                          DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
-                                                          MIDIInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+                                          DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
+                                          MIDIInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
                        
                        MIDIInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;                       
                }
index 6a82479..0a966cf 100644 (file)
@@ -56,7 +56,7 @@ uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
                                              DCOMP_MS_Host_NextMSInterfaceEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
                {
                        if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
-                                                                                 DCOMP_MS_Host_NextMSInterface) != DESCRIPTOR_SEARCH_COMP_Found)
+                                                     DCOMP_MS_Host_NextMSInterface) != DESCRIPTOR_SEARCH_COMP_Found)
                        {
                                return MS_ENUMERROR_NoCompatibleInterfaceFound;
                        }
@@ -82,16 +82,16 @@ uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
                if (PipeNum == MSInterfaceInfo->Config.DataINPipeNumber)
                {
                        Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
-                                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
-                                                          MSInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
+                                          MSInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
                        
                        MSInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;                   
                }
                else if (PipeNum == MSInterfaceInfo->Config.DataOUTPipeNumber)
                {
                        Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_OUT,
-                                                          DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
-                                                          MSInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+                                          DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
+                                          MSInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
                        
                        MSInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;                 
                }
@@ -388,7 +388,7 @@ uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
 
-       uint8_t ErrorCode;      
+       uint8_t ErrorCode;
 
        MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)
                {
index 773b9b4..2c9a4eb 100644 (file)
@@ -56,7 +56,7 @@ uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceI
                                              DCOMP_PRNT_Host_NextPRNTInterfaceEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
                {
                        if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &DeviceConfigDescriptor,
-                                                                                 DCOMP_PRNT_Host_NextPRNTInterface) != DESCRIPTOR_SEARCH_COMP_Found)
+                                                     DCOMP_PRNT_Host_NextPRNTInterface) != DESCRIPTOR_SEARCH_COMP_Found)
                        {
                                return PRNT_ENUMERROR_NoCompatibleInterfaceFound;
                        }
@@ -82,16 +82,16 @@ uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceI
                if (PipeNum == PRNTInterfaceInfo->Config.DataINPipeNumber)
                {
                        Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
-                                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
-                                                          PRNTInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
+                                          PRNTInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
                        
                        PRNTInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;                 
                }
                else if (PipeNum == PRNTInterfaceInfo->Config.DataOUTPipeNumber)
                {
                        Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_OUT,
-                                                          DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
-                                                          PRNTInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+                                          DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
+                                          PRNTInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
                        
                        PRNTInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;                       
                }
@@ -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;
                }
index 09fac7a..7663b63 100644 (file)
@@ -105,7 +105,7 @@ uint8_t RNDIS_Host_ConfigurePipes(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfa
                if (PipeNum == RNDISInterfaceInfo->Config.DataINPipeNumber)
                {
                        Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
-                                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
+                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
                                           RNDISInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
 
                        RNDISInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
@@ -144,7 +144,7 @@ static uint8_t DCOMP_RNDIS_Host_NextRNDISControlInterface(void* const CurrentDes
        
                if ((CurrentInterface->Class    == RNDIS_CONTROL_CLASS)    &&
                    (CurrentInterface->SubClass == RNDIS_CONTROL_SUBCLASS) &&
-                       (CurrentInterface->Protocol == RNDIS_CONTROL_PROTOCOL))
+                   (CurrentInterface->Protocol == RNDIS_CONTROL_PROTOCOL))
                {
                        return DESCRIPTOR_SEARCH_Found;
                }
@@ -162,7 +162,7 @@ static uint8_t DCOMP_RNDIS_Host_NextRNDISDataInterface(void* const CurrentDescri
        
                if ((CurrentInterface->Class    == RNDIS_DATA_CLASS)    &&
                    (CurrentInterface->SubClass == RNDIS_DATA_SUBCLASS) &&
-                       (CurrentInterface->Protocol == RNDIS_DATA_PROTOCOL))
+                   (CurrentInterface->Protocol == RNDIS_DATA_PROTOCOL))
                {
                        return DESCRIPTOR_SEARCH_Found;
                }
@@ -307,7 +307,7 @@ uint8_t RNDIS_Host_SetRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInter
        SetMessageData.SetMessage.MessageType    = REMOTE_NDIS_SET_MSG;
        SetMessageData.SetMessage.MessageLength  = sizeof(RNDIS_Set_Message_t) + Length;
        SetMessageData.SetMessage.RequestId      = RNDISInterfaceInfo->State.RequestID++;
-                       
+       
        SetMessageData.SetMessage.Oid            = Oid;
        SetMessageData.SetMessage.InformationBufferLength = Length;
        SetMessageData.SetMessage.InformationBufferOffset = (sizeof(RNDIS_Set_Message_t) - sizeof(RNDIS_Message_Header_t));
@@ -351,7 +351,7 @@ uint8_t RNDIS_Host_QueryRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInt
        QueryMessage.MessageType    = REMOTE_NDIS_QUERY_MSG;
        QueryMessage.MessageLength  = sizeof(RNDIS_Query_Message_t);
        QueryMessage.RequestId      = RNDISInterfaceInfo->State.RequestID++;
-                       
+       
        QueryMessage.Oid            = Oid;
        QueryMessage.InformationBufferLength = 0;
        QueryMessage.InformationBufferOffset = 0;
@@ -427,7 +427,7 @@ uint8_t RNDIS_Host_ReadPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceIn
        
        Pipe_Discard_Stream(DeviceMessage.DataOffset - (sizeof(RNDIS_Packet_Message_t) - sizeof(RNDIS_Message_Header_t)),
                            NO_STREAM_CALLBACK);
-                                               
+       
        Pipe_Read_Stream_LE(Buffer, *PacketLength, NO_STREAM_CALLBACK);
        
        if (!(Pipe_BytesInPipe()))
index 0f4cac0..c3ade3b 100644 (file)
@@ -57,7 +57,7 @@ uint8_t SI_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
                                              DCOMP_SI_Host_NextSIInterfaceEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
                {
                        if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
-                                                                                 DCOMP_SI_Host_NextSIInterface) != DESCRIPTOR_SEARCH_COMP_Found)
+                                                     DCOMP_SI_Host_NextSIInterface) != DESCRIPTOR_SEARCH_COMP_Found)
                        {
                                return SI_ENUMERROR_NoCompatibleInterfaceFound;
                        }
@@ -91,7 +91,7 @@ uint8_t SI_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
                if (PipeNum == SIInterfaceInfo->Config.DataINPipeNumber)
                {
                        Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
-                                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
+                                          DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
                                           SIInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
 
                        SIInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
@@ -187,7 +187,7 @@ uint8_t SI_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
                  return ErrorCode;
        }
        
-       Pipe_ClearOUT();        
+       Pipe_ClearOUT();
        Pipe_Freeze();
        
        return PIPE_RWSTREAM_NoError;
@@ -411,9 +411,9 @@ uint8_t SI_Host_SendCommand(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
                        .Type          = SI_PIMA_CONTAINER_CommandBlock,
                        .Code          = Operation,
                };
-                                                       
+       
        memcpy(&PIMABlock.Params, Params, sizeof(uint32_t) * TotalParams);
-                                                       
+       
        if ((ErrorCode = SI_Host_SendBlockHeader(SIInterfaceInfo, &PIMABlock)) != PIPE_RWSTREAM_NoError)
          return ErrorCode;