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

@ -54,7 +54,7 @@
#include "../StdDescriptors.h"
#include "../USBInterrupt.h"
#include "../Endpoint.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
@ -81,15 +81,15 @@
* USB interface should be initialized in full speed (12Mb/s) mode.
*/
#define USB_DEVICE_OPT_FULLSPEED (0 << 0)
#if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32) || defined(__DOXYGEN__)
/** Mask for the Options parameter of the \ref USB_Init() function. This indicates that the
* USB interface should be initialized in high speed (480Mb/s) mode.
*/
#define USB_DEVICE_OPT_HIGHSPEED (1 << 1)
#define USB_DEVICE_OPT_HIGHSPEED (1 << 1)
#endif
//@}
#if (!defined(NO_INTERNAL_SERIAL) && \
(defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32) || \
defined(__DOXYGEN__)))
@ -103,7 +103,7 @@
* number for the device.
*/
#define USE_INTERNAL_SERIAL 0xDC
/** Length of the device's unique internal serial number, in bits, if present on the selected microcontroller
* model.
*/
@ -119,7 +119,7 @@
#define INTERNAL_SERIAL_LENGTH_BITS 0
#define INTERNAL_SERIAL_START_ADDRESS 0
#endif
/* Function Prototypes: */
/** Sends a Remote Wakeup request to the host. This signals to the host that the device should
* be taken out of suspended mode, and communications should resume.
@ -225,7 +225,7 @@
{
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
uint8_t* SigReadAddress = (uint8_t*)INTERNAL_SERIAL_START_ADDRESS;
for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++)
@ -243,7 +243,7 @@
UnicodeString[SerialCharNum] = cpu_to_le16((SerialByte >= 10) ?
(('A' - 10) + SerialByte) : ('0' + SerialByte));
}
SetGlobalInterruptMask(CurrentGlobalInt);
}
#endif

View file

@ -228,3 +228,4 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
#include "Template/Template_Endpoint_Control_R.c"
#endif

View file

@ -61,7 +61,7 @@ bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
uint32_t UECFG0Temp;
Endpoint_SelectEndpoint(EPNum);
if (EPNum == Number)
{
UECFG0Temp = UECFG0Data;
@ -79,11 +79,11 @@ bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
Endpoint_EnableEndpoint();
(&AVR32_USBB.uecfg0)[EPNum] = UECFG0Temp;
if (!(Endpoint_IsConfigured()))
return false;
return false;
}
Endpoint_SelectEndpoint(Number);
return true;
#endif
@ -148,7 +148,7 @@ uint8_t Endpoint_WaitUntilReady(void)
if (Endpoint_IsOUTReceived())
return ENDPOINT_READYWAIT_NoError;
}
uint8_t USB_DeviceState_LCL = USB_DeviceState;
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)

View file

@ -119,7 +119,7 @@
#define ENDPOINT_DETAILS_EP5 512, 3
#define ENDPOINT_DETAILS_EP6 512, 3
#define ENDPOINT_DETAILS_EP7 512, 3
#elif defined(USB_SERIES_UC3B0_AVR32) || defined(USB_SERIES_UC3B1_AVR32)
#elif defined(USB_SERIES_UC3B0_AVR32) || defined(USB_SERIES_UC3B1_AVR32)
#define ENDPOINT_DETAILS_MAXEP 7
#define ENDPOINT_DETAILS_EP0 64, 1
@ -154,14 +154,14 @@
void Endpoint_ClearEndpoints(void);
bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
const uint32_t UECFGXData);
/* External Variables: */
extern volatile uint32_t USB_Endpoint_SelectedEndpoint;
extern volatile uint8_t* USB_Endpoint_FIFOPos[];
#endif
/* Public Interface - May be used in end-application: */
/* Macros: */
/* Macros: */
/** \name Endpoint Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
@ -302,7 +302,7 @@
const uint8_t Banks)
{
return Endpoint_ConfigureEndpoint_Prv(Number, (AVR32_USBB_ALLOC_MASK |
((uint32_t)Type << AVR32_USBB_EPTYPE_OFFSET) |
((uint32_t)Type << AVR32_USBB_EPTYPE_OFFSET) |
((uint32_t)(Direction ? AVR32_USBB_UECFG0_EPDIR_MASK : 0) |
((uint32_t)Banks << AVR32_USBB_EPBK_OFFSET) |
Endpoint_BytesToEPSizeMask(Size))));
@ -422,7 +422,7 @@
while ((&AVR32_USBB.UECON0)[USB_Endpoint_SelectedEndpoint].killbk);
}
}
/** Determines if the currently selected endpoint may be read from (if data is waiting in the endpoint
* bank and the endpoint is an OUT direction, or if the bank is not yet full if the endpoint is an IN
* direction). This function will return false if an error has occurred in the endpoint, if the endpoint

View file

@ -254,7 +254,7 @@ static void USB_Host_ResetDevice(void)
USB_Host_ResetBus();
while (!(USB_Host_IsBusResetComplete()));
USB_Host_ResumeBus();
USB_Host_ConfigurationNumber = 0;
bool HSOFIEnabled = USB_INT_IsEnabled(USB_INT_HSOFI);

View file

@ -69,7 +69,7 @@ bool Pipe_ConfigurePipe(const uint8_t Number,
uint32_t UPCFG0Temp;
Pipe_SelectPipe(PNum);
if (PNum == Number)
{
UPCFG0Temp = (AVR32_USBB_ALLOC_MASK |
@ -85,7 +85,7 @@ bool Pipe_ConfigurePipe(const uint8_t Number,
if (!(UPCFG0Temp & AVR32_USBB_ALLOC_MASK))
continue;
Pipe_DisablePipe();
(&AVR32_USBB.upcfg0)[PNum] &= ~AVR32_USBB_ALLOC_MASK;
@ -93,12 +93,12 @@ bool Pipe_ConfigurePipe(const uint8_t Number,
(&AVR32_USBB.upcfg0)[PNum] = UPCFG0Temp;
Pipe_SetInfiniteINRequests();
if (!(Pipe_IsConfigured()))
return false;
return false;
}
Pipe_SelectPipe(Number);
Pipe_SelectPipe(Number);
return true;
#endif
}

View file

@ -100,7 +100,7 @@
#if !defined(__DOXYGEN__)
/* Macros: */
#define PIPE_HSB_ADDRESS_SPACE_SIZE (64 * 1024UL)
/* External Variables: */
extern volatile uint32_t USB_Pipe_SelectedPipe;
extern volatile uint8_t* USB_Pipe_FIFOPos[];
@ -146,7 +146,7 @@
*/
#define PIPE_TOKEN_OUT AVR32_USBB_UPCFG0_PTOKEN_OUT
//@}
/** \name Pipe Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
@ -185,7 +185,7 @@
*/
#define PIPE_TOTAL_PIPES 8
#else
#define PIPE_TOTAL_PIPES 7
#define PIPE_TOTAL_PIPES 7
#endif
/** Size in bytes of the largest pipe bank size possible in the device. Not all banks on each AVR
@ -446,7 +446,7 @@
static inline uint8_t Pipe_GetErrorFlags(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_GetErrorFlags(void)
{
return (((&AVR32_USBB.uperr0)[USB_Pipe_SelectedPipe] &
(PIPE_ERRORFLAG_CRC16 | PIPE_ERRORFLAG_TIMEOUT |
PIPE_ERRORFLAG_PID | PIPE_ERRORFLAG_DATAPID |
@ -454,7 +454,7 @@
(((&AVR32_USBB.upsta0)[USB_Pipe_SelectedPipe] << 8) &
PIPE_ERRORFLAG_OVERFLOW));
}
/** Retrieves the number of busy banks in the currently selected pipe, which have been queued for
* transmission via the \ref Pipe_ClearOUT() command, or are awaiting acknowledgement via the
* \ref Pipe_ClearIN() command.
@ -902,7 +902,7 @@
#if !defined(ENDPOINT_CONTROLEP)
#define ENDPOINT_CONTROLEP 0
#endif
/* Inline Functions: */
static inline uint8_t Pipe_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_BytesToEPSizeMask(const uint16_t Bytes)

View file

@ -81,3 +81,4 @@ uint8_t TEMPLATE_FUNC_NAME (void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif

View file

@ -90,3 +90,4 @@ uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif

View file

@ -86,3 +86,4 @@ uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
#undef TEMPLATE_BUFFER_MOVE
#endif

View file

@ -48,7 +48,7 @@ uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
Length -= *BytesProcessed;
TEMPLATE_BUFFER_MOVE(DataStream, *BytesProcessed);
}
while (Length)
{
if (!(Pipe_IsReadWriteAllowed()))
@ -85,3 +85,4 @@ uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
#undef TEMPLATE_BUFFER_MOVE
#endif

View file

@ -59,7 +59,7 @@ void USB_Init(
#if !defined(USE_STATIC_OPTIONS)
USB_Options = Options;
#endif
#if defined(USB_CAN_BE_BOTH)
if (Mode == USB_MODE_UID)
{
@ -73,7 +73,7 @@ void USB_Init(
USB_CurrentMode = Mode;
}
#else
AVR32_USBB.USBCON.uide = false;
AVR32_USBB.USBCON.uide = false;
#endif
USB_IsInitialized = true;
@ -172,13 +172,13 @@ static void USB_Init_Device(void)
else
{
#if defined(USB_DEVICE_OPT_HIGHSPEED)
if (USB_Options & USB_DEVICE_OPT_HIGHSPEED)
if (USB_Options & USB_DEVICE_OPT_HIGHSPEED)
USB_Device_SetHighSpeed();
else
USB_Device_SetFullSpeed();
#else
USB_Device_SetFullSpeed();
#endif
#endif
}
USB_INT_Enable(USB_INT_VBUSTI);

View file

@ -270,13 +270,13 @@
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
/* Macros: */
#if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32)
#define USB_CLOCK_REQUIRED_FREQ 12000000UL
#else
#define USB_CLOCK_REQUIRED_FREQ 48000000UL
#endif
/* Function Prototypes: */
#if defined(__INCLUDE_FROM_USB_CONTROLLER_C)
#if defined(USB_CAN_BE_DEVICE)

View file

@ -58,7 +58,7 @@
#if !defined(__DOXYGEN__)
/* External Variables: */
extern volatile uint32_t USB_Endpoint_SelectedEndpoint;
/* Enums: */
enum USB_Interrupts_t
{
@ -73,7 +73,7 @@
USB_INT_SOFI = 5,
USB_INT_RXSTPI = 6,
#endif
#if (defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__))
#if (defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__))
USB_INT_HSOFI = 7,
USB_INT_DCONNI = 8,
USB_INT_DDISCI = 9,
@ -82,11 +82,11 @@
USB_INT_VBERRI = 12,
#endif
};
/* Inline Functions: */
static inline void USB_INT_Enable(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Enable(const uint8_t Interrupt)
{
{
switch (Interrupt)
{
case USB_INT_VBUSTI:
@ -189,7 +189,7 @@
#endif
}
}
static inline void USB_INT_Clear(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Clear(const uint8_t Interrupt)
{
@ -254,7 +254,7 @@
#endif
}
}
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt)
{
@ -278,7 +278,7 @@
case USB_INT_RXSTPI:
return (&AVR32_USBB.UECON0)[USB_Endpoint_SelectedEndpoint].rxstpe;
#endif
#if defined(USB_CAN_BE_HOST)
#if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI:
return AVR32_USBB.UHINTE.hsofie;
case USB_INT_DCONNI:
@ -293,10 +293,10 @@
return AVR32_USBB.USBCON.vberre;
#endif
}
return false;
}
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt)
{
@ -360,7 +360,7 @@
#else
ISR(USB_GEN_vect);
#endif
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}