aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Class/Device
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-12-23 01:51:39 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-12-23 01:51:39 +0000
commitf201f6697b7f99b63389509b42112026b8f6f76f (patch)
tree9f38b5271f3a5ff10083f4f3e27598ced92efe11 /LUFA/Drivers/USB/Class/Device
parent77f354609f0411fb6541da31a889186ad402838e (diff)
downloadlufa-f201f6697b7f99b63389509b42112026b8f6f76f.tar.gz
lufa-f201f6697b7f99b63389509b42112026b8f6f76f.tar.bz2
lufa-f201f6697b7f99b63389509b42112026b8f6f76f.zip
Run wspurify script on /trunk/ and /branches/ C source files, to remove any trailing whitespace at the end of each line.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Device')
-rw-r--r--LUFA/Drivers/USB/Class/Device/AudioClassDevice.c17
-rw-r--r--LUFA/Drivers/USB/Class/Device/AudioClassDevice.h6
-rw-r--r--LUFA/Drivers/USB/Class/Device/CDCClassDevice.c2
-rw-r--r--LUFA/Drivers/USB/Class/Device/CDCClassDevice.h2
-rw-r--r--LUFA/Drivers/USB/Class/Device/HIDClassDevice.c4
-rw-r--r--LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h2
-rw-r--r--LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.c5
-rw-r--r--LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c16
8 files changed, 28 insertions, 26 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
index d8c5d29eb..3ac47d567 100644
--- a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
+++ b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
@@ -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
+
diff --git a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
index 0f2185b8b..aba4248fc 100644
--- a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
+++ b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
@@ -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)
diff --git a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
index e3b05e037..016744087 100644
--- a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
+++ b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
@@ -78,7 +78,7 @@ void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* const CDCInter
Endpoint_ClearOUT();
Endpoint_ClearStatusStage();
-
+
EVENT_CDC_Device_LineEncodingChanged(CDCInterfaceInfo);
}
diff --git a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h
index 24942560f..a172e4ac1 100644
--- a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h
+++ b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h
@@ -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)
diff --git a/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c b/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
index 9b5a7dd35..071f55f49 100644
--- a/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
+++ b/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
@@ -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));
}
diff --git a/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h b/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h
index 350978033..603b05f61 100644
--- a/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h
+++ b/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h
@@ -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
diff --git a/LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.c b/LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.c
index 1e3fe3412..d95b95e0d 100644
--- a/LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.c
+++ b/LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.c
@@ -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
+
diff --git a/LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c b/LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c
index 12115ee5e..1db5ec42c 100644
--- a/LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c
+++ b/LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c
@@ -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)