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:
parent
77f354609f
commit
f201f6697b
278 changed files with 1000 additions and 910 deletions
|
@ -54,7 +54,7 @@
|
|||
#include "../StdDescriptors.h"
|
||||
#include "../USBInterrupt.h"
|
||||
#include "../Endpoint.h"
|
||||
|
||||
|
||||
/* Enable C linkage for C++ Compilers: */
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -99,7 +99,7 @@
|
|||
*/
|
||||
#define USB_DEVICE_OPT_FULLSPEED (0 << 0)
|
||||
//@}
|
||||
|
||||
|
||||
#if (!defined(NO_INTERNAL_SERIAL) && \
|
||||
(defined(USB_SERIES_7_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_4_AVR) || \
|
||||
(defined(USB_SERIES_2_AVR) && (!defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__))) || \
|
||||
|
@ -119,7 +119,7 @@
|
|||
* model.
|
||||
*/
|
||||
#define INTERNAL_SERIAL_LENGTH_BITS 80
|
||||
|
||||
|
||||
/** Start address of the internal serial number, in the appropriate address space, if present on the selected microcontroller
|
||||
* model.
|
||||
*/
|
||||
|
@ -129,8 +129,8 @@
|
|||
|
||||
#define INTERNAL_SERIAL_LENGTH_BITS 0
|
||||
#define INTERNAL_SERIAL_START_ADDRESS 0
|
||||
#endif
|
||||
|
||||
#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.
|
||||
|
@ -221,14 +221,14 @@
|
|||
{
|
||||
return (UDADDR & (1 << ADDEN));
|
||||
}
|
||||
|
||||
|
||||
#if (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)
|
||||
static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString) ATTR_NON_NULL_PTR_ARG(1);
|
||||
static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString)
|
||||
{
|
||||
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
|
||||
GlobalInterruptDisable();
|
||||
|
||||
|
||||
uint8_t SigReadAddress = INTERNAL_SERIAL_START_ADDRESS;
|
||||
|
||||
for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++)
|
||||
|
@ -246,7 +246,7 @@
|
|||
UnicodeString[SerialCharNum] = cpu_to_le16((SerialByte >= 10) ?
|
||||
(('A' - 10) + SerialByte) : ('0' + SerialByte));
|
||||
}
|
||||
|
||||
|
||||
SetGlobalInterruptMask(CurrentGlobalInt);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -268,3 +268,4 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
|
|||
UECFG1X = UECFG1XData;
|
||||
|
||||
return Endpoint_IsConfigured();
|
||||
#else
|
||||
#else
|
||||
for (uint8_t EPNum = Number; EPNum < ENDPOINT_TOTAL_ENDPOINTS; EPNum++)
|
||||
{
|
||||
uint8_t UECFG0XTemp;
|
||||
|
@ -60,7 +60,7 @@ bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
|
|||
uint8_t UEIENXTemp;
|
||||
|
||||
Endpoint_SelectEndpoint(EPNum);
|
||||
|
||||
|
||||
if (EPNum == Number)
|
||||
{
|
||||
UECFG0XTemp = UECFG0XData;
|
||||
|
@ -84,11 +84,11 @@ bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
|
|||
UECFG0X = UECFG0XTemp;
|
||||
UECFG1X = UECFG1XTemp;
|
||||
UEIENX = UEIENXTemp;
|
||||
|
||||
|
||||
if (!(Endpoint_IsConfigured()))
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Endpoint_SelectEndpoint(Number);
|
||||
return true;
|
||||
#endif
|
||||
|
@ -155,7 +155,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)
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
#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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -56,7 +56,7 @@ bool Pipe_ConfigurePipe(const uint8_t Number,
|
|||
Pipe_SetInfiniteINRequests();
|
||||
|
||||
return Pipe_IsConfigured();
|
||||
#else
|
||||
#else
|
||||
for (uint8_t PNum = Number; PNum < PIPE_TOTAL_PIPES; PNum++)
|
||||
{
|
||||
uint8_t UPCFG0XTemp;
|
||||
|
@ -65,7 +65,7 @@ bool Pipe_ConfigurePipe(const uint8_t Number,
|
|||
uint8_t UPIENXTemp;
|
||||
|
||||
Pipe_SelectPipe(PNum);
|
||||
|
||||
|
||||
if (PNum == Number)
|
||||
{
|
||||
UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
|
||||
|
@ -83,7 +83,7 @@ bool Pipe_ConfigurePipe(const uint8_t Number,
|
|||
|
||||
if (!(UPCFG1XTemp & (1 << ALLOC)))
|
||||
continue;
|
||||
|
||||
|
||||
Pipe_DisablePipe();
|
||||
UPCFG1X &= ~(1 << ALLOC);
|
||||
|
||||
|
@ -94,12 +94,12 @@ bool Pipe_ConfigurePipe(const uint8_t Number,
|
|||
UPIENX = UPIENXTemp;
|
||||
|
||||
Pipe_SetInfiniteINRequests();
|
||||
|
||||
|
||||
if (!(Pipe_IsConfigured()))
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
Pipe_SelectPipe(Number);
|
||||
|
||||
Pipe_SelectPipe(Number);
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
*/
|
||||
#define PIPE_TOKEN_OUT (2 << PTOKEN0)
|
||||
//@}
|
||||
|
||||
|
||||
/** \name Pipe Bank Mode Masks */
|
||||
//@{
|
||||
/** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
|
||||
|
@ -425,7 +425,7 @@
|
|||
PIPE_ERRORFLAG_DATATGL)) |
|
||||
(UPSTAX & (PIPE_ERRORFLAG_OVERFLOW | PIPE_ERRORFLAG_UNDERFLOW)));
|
||||
}
|
||||
|
||||
|
||||
/** 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.
|
||||
|
|
|
@ -81,3 +81,4 @@ uint8_t TEMPLATE_FUNC_NAME (void* const Buffer,
|
|||
#undef TEMPLATE_TRANSFER_BYTE
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -90,3 +90,4 @@ uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
|
|||
#undef TEMPLATE_TRANSFER_BYTE
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -86,3 +86,4 @@ uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
|
|||
#undef TEMPLATE_BUFFER_MOVE
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ void USB_ResetInterface(void)
|
|||
{
|
||||
#if defined(USB_CAN_BE_HOST)
|
||||
USB_PLL_On();
|
||||
while (!(USB_PLL_IsReady()));
|
||||
while (!(USB_PLL_IsReady()));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ static void USB_Init_Device(void)
|
|||
|
||||
#if !defined(FIXED_CONTROL_ENDPOINT_SIZE)
|
||||
USB_Descriptor_Device_t* DeviceDescriptorPtr;
|
||||
|
||||
|
||||
#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \
|
||||
!(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
|
||||
uint8_t DescriptorAddressSpace;
|
||||
|
@ -215,7 +215,7 @@ static void USB_Init_Device(void)
|
|||
#else
|
||||
USB_Device_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -255,7 +255,7 @@ static void USB_Init_Host(void)
|
|||
|
||||
USB_INT_Enable(USB_INT_SRPI);
|
||||
USB_INT_Enable(USB_INT_BCERRI);
|
||||
|
||||
|
||||
USB_Attach();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
OTGIEN |= (1 << VBERRE);
|
||||
break;
|
||||
case USB_INT_SRPI:
|
||||
OTGIEN |= (1 << SRPE);
|
||||
OTGIEN |= (1 << SRPE);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
@ -194,12 +194,12 @@
|
|||
OTGIEN &= ~(1 << VBERRE);
|
||||
break;
|
||||
case USB_INT_SRPI:
|
||||
OTGIEN &= ~(1 << SRPE);
|
||||
OTGIEN &= ~(1 << SRPE);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static inline void USB_INT_Clear(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
|
||||
static inline void USB_INT_Clear(const uint8_t Interrupt)
|
||||
{
|
||||
|
@ -257,7 +257,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)
|
||||
{
|
||||
|
@ -300,10 +300,10 @@
|
|||
return (OTGIEN & (1 << SRPE));
|
||||
#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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue