Run wspurify script on /trunk/ and /branches/ C source files, to remove any trailing whitespace at the end of each line.

This commit is contained in:
Dean Camera 2011-12-23 01:51:39 +00:00
parent 77f354609f
commit f201f6697b
278 changed files with 1000 additions and 910 deletions

View file

@ -73,3 +73,4 @@
/** @} */

View file

@ -125,3 +125,4 @@
/** @} */

View file

@ -218,7 +218,7 @@
* allows for pitch adjustments to be made via control requests directed at the endpoint.
*/
#define AUDIO_EP_PITCH_CONTROL (1 << 1)
/* Enums: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Audio
* device class.
@ -244,7 +244,7 @@
* interface belongs to the Streaming Audio protocol.
*/
};
/** Audio class specific interface description subtypes, for the Audio Control interface. */
enum Audio_CSInterface_AC_SubTypes_t
{
@ -287,7 +287,7 @@
AUDIO_REQ_GetMemory = 0x85, /**< Audio class-specific request to get the memory value of a parameter within the device. */
AUDIO_REQ_GetStatus = 0xFF, /**< Audio class-specific request to get the device status. */
};
/** Enum for Audio class specific Endpoint control modifiers which can be set and retrieved by a USB host, if the corresponding
* endpoint control is indicated to be supported in the Endpoint's Audio-class specific endpoint descriptor.
*/

View file

@ -111,7 +111,7 @@
*/
#define CDC_CONTROL_LINE_IN_OVERRUNERROR (1 << 6)
//@}
/** Macro to define a CDC class-specific functional descriptor. CDC functional descriptors have a
* uniform structure but variable sized data payloads, thus cannot be represented accurately by
* a single typedef struct. A macro is used instead so that functional descriptors can be created
@ -161,7 +161,7 @@
* belongs to no specific protocol of the CDC data class.
*/
};
/** Enum for the CDC class specific control requests that can be issued by the USB bus host. */
enum CDC_ClassRequests_t
{
@ -355,7 +355,7 @@
uint8_t bMasterInterface; /**< Interface number of the CDC Control interface. */
uint8_t bSlaveInterface0; /**< Interface number of the CDC Data interface. */
} ATTR_PACKED USB_CDC_StdDescriptor_FunctionalUnion_t;
/** \brief CDC Virtual Serial Port Line Encoding Settings Structure.
*
* Type define for a CDC Line Encoding structure, used to hold the various encoding parameters for a virtual

View file

@ -91,7 +91,7 @@
/** Constant for a keyboard report modifier byte, indicating that the keyboard's right GUI key is currently pressed. */
#define HID_KEYBOARD_MODIFIER_RIGHTGUI (1 << 7)
//@}
/** \name Keyboard Standard Report LED Masks */
//@{
/** Constant for a keyboard output report LED byte, indicating that the host's NUM LOCK mode is currently set. */
@ -108,7 +108,7 @@
//@}
/** \name Keyboard Standard Report Key Scan-codes */
//@{
//@{
#define HID_KEYBOARD_SC_ERROR_ROLLOVER 0x01
#define HID_KEYBOARD_SC_POST_FAIL 0x02
#define HID_KEYBOARD_SC_ERROR_UNDEFINED 0x03
@ -208,7 +208,7 @@
#define HID_KEYBOARD_SC_KEYPAD_9_AND_PAGE_UP 0x61
#define HID_KEYBOARD_SC_KEYPAD_0_AND_INSERT 0x62
#define HID_KEYBOARD_SC_KEYPAD_DOT_AND_DELETE 0x63
#define HID_KEYBOARD_SC_NON_US_BACKSLASH_AND_PIPE 0x64
#define HID_KEYBOARD_SC_NON_US_BACKSLASH_AND_PIPE 0x64
#define HID_KEYBOARD_SC_POWER 0x66
#define HID_KEYBOARD_SC_EQUAL_SIGN 0x67
#define HID_KEYBOARD_SC_F13 0x68
@ -496,7 +496,7 @@
* \param[in] VendorPageNum Vendor Defined HID Usage Page index, ranging from 0x00 to 0xFF.
* \param[in] CollectionUsage Vendor Usage for the encompassing report IN and OUT collection, ranging from 0x00 to 0xFF.
* \param[in] DataINUsage Vendor Usage for the IN report data, ranging from 0x00 to 0xFF.
* \param[in] DataOUTUsage Vendor Usage for the OUT report data, ranging from 0x00 to 0xFF.
* \param[in] DataOUTUsage Vendor Usage for the OUT report data, ranging from 0x00 to 0xFF.
* \param[in] NumBytes Length of the data IN and OUT reports.
*/
#define HID_DESCRIPTOR_VENDOR(VendorPageNum, CollectionUsage, DataINUsage, DataOUTUsage, NumBytes) \
@ -517,7 +517,7 @@
HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), \
HID_RI_END_COLLECTION(0)
//@}
/* Type Defines: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the HID
* device class.
@ -543,7 +543,7 @@
* belongs to the Mouse HID boot protocol.
*/
};
/** Enum for the HID class specific control requests that can be issued by the USB bus host. */
enum HID_ClassRequests_t
{

View file

@ -98,7 +98,7 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
case HID_RI_USAGE_PAGE(0):
if ((HIDReportItem & HID_RI_DATA_SIZE_MASK) == HID_RI_DATA_BITS_32)
CurrStateTable->Attributes.Usage.Page = (ReportItemData >> 16);
CurrStateTable->Attributes.Usage.Page = ReportItemData;
break;
case HID_RI_LOGICAL_MINIMUM(0):
@ -359,3 +359,4 @@ uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData,
return 0;
}

View file

@ -71,7 +71,7 @@
#include "HIDReportData.h"
#include "HIDClassCommon.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {

View file

@ -63,15 +63,15 @@
#define HID_RI_DATA_BITS_32 0x03
#define HID_RI_DATA_BITS(DataBits) HID_RI_DATA_BITS_ ## DataBits
#define _HID_RI_ENCODE_0(Data)
#define _HID_RI_ENCODE_0(Data)
#define _HID_RI_ENCODE_8(Data) , (Data & 0xFF)
#define _HID_RI_ENCODE_16(Data) _HID_RI_ENCODE_8(Data) _HID_RI_ENCODE_8(Data >> 8)
#define _HID_RI_ENCODE_32(Data) _HID_RI_ENCODE_16(Data) _HID_RI_ENCODE_16(Data >> 16)
#define _HID_RI_ENCODE(DataBits, ...) _HID_RI_ENCODE_ ## DataBits(__VA_ARGS__)
#define _HID_RI_ENTRY(Type, Tag, DataBits, ...) (Type | Tag | HID_RI_DATA_BITS(DataBits)) _HID_RI_ENCODE(DataBits, (__VA_ARGS__))
#endif
/* Public Interface - May be used in end-application: */
/* Macros: */
/** \name HID Input, Output and Feature Report Descriptor Item Flags */
@ -95,7 +95,7 @@
#define HID_IOF_BUFFERED_BYTES (1 << 8)
#define HID_IOF_BITFIELD (0 << 8)
//@}
/** \name HID Report Descriptor Item Macros */
//@{
#define HID_RI_INPUT(DataBits, ...) _HID_RI_ENTRY(HID_RI_TYPE_MAIN , 0x80, DataBits, __VA_ARGS__)

View file

@ -117,7 +117,7 @@
/** SCSI Command Code for a MODE SENSE (10) command. */
#define SCSI_CMD_MODE_SENSE_10 0x5A
//@}
/** \name SCSI Sense Key Values */
//@{
/** SCSI Sense Code to indicate no error has occurred. */
@ -164,7 +164,7 @@
/** SCSI Sense Code to indicate that the source data did not match the data read from the medium. */
#define SCSI_SENSE_KEY_MISCOMPARE 0x0E
//@}
/** \name SCSI Additional Sense Codes */
//@{
/** SCSI Additional Sense Code to indicate no additional sense information is available. */
@ -196,7 +196,7 @@
/** SCSI Additional Sense Code to indicate that no removable medium is inserted into the device. */
#define SCSI_ASENSE_MEDIUM_NOT_PRESENT 0x3A
//@}
/** \name SCSI Additional Sense Key Code Qualifiers */
//@{
/** SCSI Additional Sense Qualifier Code to indicate no additional sense qualifier information is available. */
@ -213,7 +213,7 @@
/** SCSI Additional Sense Qualifier Code to indicate that an operation is currently in progress. */
#define SCSI_ASENSEQ_OPERATION_IN_PROGRESS 0x07
//@}
/* Enums: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Mass
* Storage device class.
@ -231,7 +231,7 @@
* belongs to the Bulk Only Transport protocol of the Mass Storage class.
*/
};
/** Enum for the Mass Storage class specific control requests that can be issued by the USB bus host. */
enum MS_ClassRequests_t
{

View file

@ -92,7 +92,7 @@
* belongs to the Bidirectional protocol of the Printer class.
*/
};
/** Enum for the Printer class specific control requests that can be issued by the USB bus host. */
enum PRNT_ClassRequests_t
{
@ -106,7 +106,7 @@
PRNT_REQ_SoftReset = 0x02, /**< Printer class-specific request to reset the device, ready for new
* printer commands.
*/
};
};
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)

View file

@ -113,7 +113,7 @@
#define REMOTE_NDIS_MEDIA_STATE_CONNECTED 0x00000000UL
#define REMOTE_NDIS_MEDIA_STATE_DISCONNECTED 0x00000001UL
//@}
/** \name RNDIS Media Types */
//@{
#define REMOTE_NDIS_MEDIUM_802_3 0x00000000UL
@ -124,7 +124,7 @@
#define REMOTE_NDIS_DF_CONNECTIONLESS 0x00000001UL
#define REMOTE_NDIS_DF_CONNECTION_ORIENTED 0x00000002UL
//@}
/** \name RNDIS Packet Types */
//@{
#define REMOTE_NDIS_PACKET_DIRECTED 0x00000001UL
@ -140,7 +140,7 @@
#define REMOTE_NDIS_PACKET_FUNCTIONAL 0x00004000UL
#define REMOTE_NDIS_PACKET_MAC_FRAME 0x00008000UL
//@}
/** \name RNDIS OID Values */
//@{
#define OID_GEN_SUPPORTED_LIST 0x00010101UL

View file

@ -50,16 +50,16 @@ void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
else if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) == REQREC_ENDPOINT)
{
bool EndpointFilterMatch = false;
EndpointFilterMatch |= (AudioInterfaceInfo->Config.DataINEndpointNumber &&
((uint8_t)USB_ControlRequest.wIndex == (ENDPOINT_DIR_IN | AudioInterfaceInfo->Config.DataINEndpointNumber)));
EndpointFilterMatch |= (AudioInterfaceInfo->Config.DataOUTEndpointNumber &&
((uint8_t)USB_ControlRequest.wIndex == (ENDPOINT_DIR_OUT | AudioInterfaceInfo->Config.DataOUTEndpointNumber)));
if (!(EndpointFilterMatch))
return;
}
}
switch (USB_ControlRequest.bRequest)
{
@ -92,20 +92,20 @@ void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
uint8_t EndpointProperty = USB_ControlRequest.bRequest;
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
if (CALLBACK_Audio_Device_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress,
EndpointControl, NULL, NULL))
{
uint16_t ValueLength = USB_ControlRequest.wLength;
uint8_t Value[ValueLength];
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(Value, ValueLength);
Endpoint_ClearIN();
Endpoint_ClearIN();
CALLBACK_Audio_Device_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress,
EndpointControl, &ValueLength, Value);
}
}
}
break;
@ -126,7 +126,7 @@ void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
{
Endpoint_ClearSETUP();
Endpoint_Write_Control_Stream_LE(Value, ValueLength);
Endpoint_ClearOUT();
Endpoint_ClearOUT();
}
}
@ -180,3 +180,4 @@ void Audio_Device_Event_Stub(void)
}
#endif

View file

@ -126,7 +126,7 @@
* \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state.
*/
void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
/** Audio class driver callback for the setting and retrieval of streaming endpoint properties. This callback must be implemented
* in the user application to handle property manipulations on streaming audio endpoints.
*
@ -357,12 +357,12 @@
/* Function Prototypes: */
#if defined(__INCLUDE_FROM_AUDIO_DEVICE_C)
void Audio_Device_Event_Stub(void) ATTR_CONST;
void EVENT_Audio_Device_StreamStartStop(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(Audio_Device_Event_Stub);
#endif
#endif
#endif
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)

View file

@ -78,7 +78,7 @@ void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* const CDCInter
Endpoint_ClearOUT();
Endpoint_ClearStatusStage();
EVENT_CDC_Device_LineEncodingChanged(CDCInterfaceInfo);
}

View file

@ -334,7 +334,7 @@
#endif
void CDC_Device_Event_Stub(void) ATTR_CONST;
void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Device_Event_Stub);
void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)

View file

@ -64,7 +64,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
memcpy(HIDInterfaceInfo->Config.PrevReportINBuffer, ReportData,
HIDInterfaceInfo->Config.PrevReportINBufferSize);
}
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
Endpoint_ClearSETUP();
@ -84,7 +84,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(ReportData, ReportSize);
Endpoint_ClearIN();
CALLBACK_HID_Device_ProcessHIDReport(HIDInterfaceInfo, ReportID, ReportType,
&ReportData[ReportID ? 1 : 0], ReportSize - (ReportID ? 1 : 0));
}

View file

@ -91,7 +91,7 @@
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
struct
{
// No state information for this class

View file

@ -160,7 +160,7 @@ static bool MS_Device_ReadInCommandBlock(USB_ClassInfo_MS_Device_t* const MSInte
uint16_t BytesProcessed;
Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
BytesProcessed = 0;
while (Endpoint_Read_Stream_LE(&MSInterfaceInfo->State.CommandBlock,
(sizeof(MS_CommandBlockWrapper_t) - 16), &BytesProcessed) ==
@ -231,8 +231,9 @@ static void MS_Device_ReturnCommandStatus(USB_ClassInfo_MS_Device_t* const MSInt
if (MSInterfaceInfo->State.IsMassStoreReset)
return;
}
Endpoint_ClearIN();
}
#endif

View file

@ -238,7 +238,7 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* const
uint16_t ResponseSize;
QUERY_Response->MessageType = CPU_TO_LE32(REMOTE_NDIS_QUERY_CMPLT);
if (RNDIS_Device_ProcessNDISQuery(RNDISInterfaceInfo, Query_Oid, QueryData, le32_to_cpu(QUERY_Message->InformationBufferLength),
ResponseData, &ResponseSize))
{
@ -453,7 +453,7 @@ bool RNDIS_Device_IsPacketReceived(USB_ClassInfo_RNDIS_Device_t* const RNDISInte
{
return false;
}
Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber);
return Endpoint_IsOUTReceived();
}
@ -467,15 +467,15 @@ uint8_t RNDIS_Device_ReadPacket(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfa
{
return ENDPOINT_RWSTREAM_DeviceDisconnected;
}
Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber);
*PacketLength = 0;
if (!(Endpoint_IsOUTReceived()))
return ENDPOINT_RWSTREAM_NoError;
RNDIS_Packet_Message_t RNDISPacketHeader;
RNDIS_Packet_Message_t RNDISPacketHeader;
Endpoint_Read_Stream_LE(&RNDISPacketHeader, sizeof(RNDIS_Packet_Message_t), NULL);
if (le32_to_cpu(RNDISPacketHeader.DataLength) > ETHERNET_FRAME_SIZE_MAX)
@ -484,12 +484,12 @@ uint8_t RNDIS_Device_ReadPacket(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfa
return RNDIS_ERROR_LOGICAL_CMD_FAILED;
}
*PacketLength = (uint16_t)le32_to_cpu(RNDISPacketHeader.DataLength);
Endpoint_Read_Stream_LE(Buffer, *PacketLength, NULL);
Endpoint_ClearOUT();
return ENDPOINT_RWSTREAM_NoError;
}
@ -504,7 +504,7 @@ uint8_t RNDIS_Device_SendPacket(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfa
{
return ENDPOINT_RWSTREAM_DeviceDisconnected;
}
Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataINEndpointNumber);
if ((ErrorCode = Endpoint_WaitUntilReady()) != ENDPOINT_READYWAIT_NoError)

View file

@ -443,3 +443,4 @@ static int AOA_Host_getchar_Blocking(FILE* Stream)
#endif

View file

@ -325,3 +325,4 @@
/** @} */

View file

@ -68,7 +68,7 @@ uint8_t Audio_Host_ConfigurePipes(USB_ClassInfo_Audio_Host_t* const AudioInterfa
return AUDIO_ENUMERROR_NoCompatibleInterfaceFound;
}
AudioControlInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t);
AudioControlInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t);
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
DCOMP_Audio_Host_NextAudioStreamInterface) != DESCRIPTOR_SEARCH_COMP_Found)
@ -78,7 +78,7 @@ uint8_t Audio_Host_ConfigurePipes(USB_ClassInfo_Audio_Host_t* const AudioInterfa
}
AudioStreamingInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t);
DataINEndpoint = NULL;
DataOUTEndpoint = NULL;
@ -125,7 +125,7 @@ uint8_t Audio_Host_ConfigurePipes(USB_ClassInfo_Audio_Host_t* const AudioInterfa
{
continue;
}
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
@ -137,7 +137,7 @@ uint8_t Audio_Host_ConfigurePipes(USB_ClassInfo_Audio_Host_t* const AudioInterfa
AudioInterfaceInfo->State.StreamingInterfaceNumber = AudioStreamingInterface->InterfaceNumber;
AudioInterfaceInfo->State.EnabledStreamingAltIndex = AudioStreamingInterface->AlternateSetting;
AudioInterfaceInfo->State.IsActive = true;
return AUDIO_ENUMERROR_NoError;
}
@ -225,7 +225,7 @@ uint8_t Audio_Host_GetSetEndpointProperty(USB_ClassInfo_Audio_Host_t* const Audi
RequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT);
else
RequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_ENDPOINT);
Pipe_SelectPipe(DataPipeIndex);
EndpointAddress = Pipe_GetBoundEndpointAddress();

View file

@ -98,7 +98,7 @@
*/
uint8_t ControlInterfaceNumber; /**< Interface index of the Audio Control interface within the attached device. */
uint8_t StreamingInterfaceNumber; /**< Interface index of the Audio Streaming interface within the attached device. */
uint8_t EnabledStreamingAltIndex; /**< Alternative setting index of the Audio Streaming interface when the stream is enabled. */
uint16_t DataINPipeSize; /**< Size in bytes of the Audio interface's IN data pipe. */
@ -331,7 +331,7 @@
const int8_t Sample)
{
(void)AudioInterfaceInfo;
Pipe_Write_8(Sample);
if (!(Pipe_IsReadWriteAllowed()))
@ -357,7 +357,7 @@
const int16_t Sample)
{
(void)AudioInterfaceInfo;
Pipe_Write_16_LE(Sample);
if (!(Pipe_IsReadWriteAllowed()))
@ -395,7 +395,7 @@
Pipe_Freeze();
}
}
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Function Prototypes: */

View file

@ -145,13 +145,13 @@ uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo
{
continue;
}
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
return CDC_ENUMERROR_PipeConfigurationFailed;
}
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}

View file

@ -334,7 +334,7 @@
#endif
void CDC_Host_Event_Stub(void) ATTR_CONST;
void EVENT_CDC_Host_ControLineStateChanged(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo)
ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Host_Event_Stub);

View file

@ -118,7 +118,7 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
{
if (DataOUTEndpoint == NULL)
continue;
Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
EndpointAddress = DataOUTEndpoint->EndpointAddress;
Token = PIPE_TOKEN_OUT;
@ -139,7 +139,7 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
{
return HID_ENUMERROR_PipeConfigurationFailed;
}
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}

View file

@ -171,7 +171,7 @@ void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)
#if !defined(NO_CLASS_DRIVER_AUTOFLUSH)
MIDI_Host_Flush(MIDIInterfaceInfo);
#endif
#endif
}
uint8_t MIDI_Host_Flush(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)

View file

@ -103,7 +103,7 @@ uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
Token = PIPE_TOKEN_OUT;
Type = EP_TYPE_BULK;
DoubleBanked = MSInterfaceInfo->Config.DataOUTPipeDoubleBank;
MSInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
}
else
@ -186,7 +186,7 @@ static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
{
return ErrorCode;
}
Pipe_ClearOUT();
Pipe_WaitUntilReady();
@ -195,14 +195,14 @@ static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
if (BufferPtr != NULL)
{
ErrorCode = MS_Host_SendReceiveData(MSInterfaceInfo, SCSICommandBlock, (void*)BufferPtr);
if ((ErrorCode != PIPE_RWSTREAM_NoError) && (ErrorCode != PIPE_RWSTREAM_PipeStalled))
{
Pipe_Freeze();
return ErrorCode;
}
}
MS_CommandStatusWrapper_t SCSIStatusBlock;
return MS_Host_GetReturnedStatus(MSInterfaceInfo, &SCSIStatusBlock);
}
@ -348,9 +348,9 @@ uint8_t MS_Host_ResetMSInterface(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
return ErrorCode;
Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
if ((ErrorCode = USB_Host_ClearEndpointStall(Pipe_GetBoundEndpointAddress())) != HOST_SENDCONTROL_Successful)
return ErrorCode;

View file

@ -149,7 +149,7 @@
void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
/** Sends a MASS STORAGE RESET control request to the attached device, resetting the Mass Storage Interface
* and readying it for the next Mass Storage command. This should be called after a failed SCSI request to
* and readying it for the next Mass Storage command. This should be called after a failed SCSI request to
* ensure the attached Mass Storage device is ready to receive the next command.
*
* \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state.

View file

@ -147,13 +147,13 @@ uint8_t RNDIS_Host_ConfigurePipes(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfa
{
continue;
}
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
return CDC_ENUMERROR_PipeConfigurationFailed;
}
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}
@ -241,7 +241,7 @@ static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const R
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
return USB_Host_SendControlRequest(Buffer);
}
@ -259,7 +259,7 @@ static uint8_t RNDIS_GetEncapsulatedResponse(USB_ClassInfo_RNDIS_Host_t* const R
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
return USB_Host_SendControlRequest(Buffer);
}

View file

@ -133,13 +133,13 @@ uint8_t SI_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
{
continue;
}
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
return SI_ENUMERROR_PipeConfigurationFailed;
}
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}