aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Core
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/Core
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/Core')
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h16
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c1
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c12
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h2
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c2
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c14
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h4
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c1
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c1
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c1
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c3
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c8
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.h12
-rw-r--r--LUFA/Drivers/USB/Core/ConfigDescriptor.h4
-rw-r--r--LUFA/Drivers/USB/Core/Device.h4
-rw-r--r--LUFA/Drivers/USB/Core/DeviceStandardReq.c10
-rw-r--r--LUFA/Drivers/USB/Core/DeviceStandardReq.h2
-rw-r--r--LUFA/Drivers/USB/Core/Endpoint.h2
-rw-r--r--LUFA/Drivers/USB/Core/EndpointStream.h20
-rw-r--r--LUFA/Drivers/USB/Core/Events.h2
-rw-r--r--LUFA/Drivers/USB/Core/Host.h8
-rw-r--r--LUFA/Drivers/USB/Core/HostStandardReq.c6
-rw-r--r--LUFA/Drivers/USB/Core/HostStandardReq.h8
-rw-r--r--LUFA/Drivers/USB/Core/OTG.h4
-rw-r--r--LUFA/Drivers/USB/Core/PipeStream.h26
-rw-r--r--LUFA/Drivers/USB/Core/StdDescriptors.h6
-rw-r--r--LUFA/Drivers/USB/Core/StdRequestType.h4
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Device_UC3.h16
-rw-r--r--LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c1
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c10
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h10
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Host_UC3.c2
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c12
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h12
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c1
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c1
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c1
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c3
-rw-r--r--LUFA/Drivers/USB/Core/UC3/USBController_UC3.c8
-rw-r--r--LUFA/Drivers/USB/Core/UC3/USBController_UC3.h4
-rw-r--r--LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.h20
-rw-r--r--LUFA/Drivers/USB/Core/USBController.h4
-rw-r--r--LUFA/Drivers/USB/Core/USBInterrupt.h4
-rw-r--r--LUFA/Drivers/USB/Core/USBMode.h9
-rw-r--r--LUFA/Drivers/USB/Core/USBTask.h4
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h16
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c1
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c6
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h30
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c12
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c1
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c1
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c1
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c17
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h8
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c4
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.h22
57 files changed, 220 insertions, 204 deletions
diff --git a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
index 7da3bb2f3..97de0555b 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
@@ -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
diff --git a/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
index 09907596b..ff85e0444 100644
--- a/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
+++ b/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
@@ -268,3 +268,4 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
#endif
#endif
+
diff --git a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c
index 9f7cec15e..218dcf96e 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c
+++ b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c
@@ -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)
diff --git a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
index 6aff5cc2c..25a07755d 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
@@ -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
diff --git a/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c
index 55cd8f991..dde5b1b0f 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c
+++ b/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c
@@ -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);
diff --git a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c
index 9484abed3..a484df13b 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c
+++ b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c
@@ -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
}
diff --git a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
index 277e28290..308bd34e1 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
@@ -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.
diff --git a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c
index 68f645b89..55d137ba3 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c
+++ b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c
@@ -81,3 +81,4 @@ uint8_t TEMPLATE_FUNC_NAME (void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
diff --git a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c
index 5d4fc42f2..36685f0c4 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c
+++ b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c
@@ -90,3 +90,4 @@ uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
diff --git a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c
index 46b006364..7ed192df7 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c
+++ b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c
@@ -86,3 +86,4 @@ uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
#undef TEMPLATE_BUFFER_MOVE
#endif
+
diff --git a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c
index bc8570d01..daba216ac 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c
+++ b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c
@@ -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
+
diff --git a/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c
index 9f688db06..c660fb3ba 100644
--- a/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c
+++ b/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c
@@ -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
diff --git a/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.h
index 6115ec6e3..dad55f101 100644
--- a/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.h
@@ -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)
{
diff --git a/LUFA/Drivers/USB/Core/ConfigDescriptor.h b/LUFA/Drivers/USB/Core/ConfigDescriptor.h
index b34937a96..361ffa0df 100644
--- a/LUFA/Drivers/USB/Core/ConfigDescriptor.h
+++ b/LUFA/Drivers/USB/Core/ConfigDescriptor.h
@@ -52,7 +52,7 @@
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
#include "HostStandardReq.h"
#include "StdDescriptors.h"
@@ -266,7 +266,7 @@
void** CurrConfigLoc)
{
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
-
+
if (*BytesRem < CurrDescriptorSize)
CurrDescriptorSize = *BytesRem;
diff --git a/LUFA/Drivers/USB/Core/Device.h b/LUFA/Drivers/USB/Core/Device.h
index ad837e148..fcc1b1cc3 100644
--- a/LUFA/Drivers/USB/Core/Device.h
+++ b/LUFA/Drivers/USB/Core/Device.h
@@ -51,7 +51,7 @@
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
#include "StdDescriptors.h"
#include "USBInterrupt.h"
#include "Endpoint.h"
@@ -145,7 +145,7 @@
#elif (ARCH == ARCH_UC3)
#include "UC3/Device_UC3.h"
#elif (ARCH == ARCH_XMEGA)
- #include "XMEGA/Device_XMEGA.h"
+ #include "XMEGA/Device_XMEGA.h"
#endif
/* Disable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/USB/Core/DeviceStandardReq.c b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
index 59d3f2896..5e89659d0 100644
--- a/LUFA/Drivers/USB/Core/DeviceStandardReq.c
+++ b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
@@ -124,7 +124,7 @@ static void USB_Device_SetAddress(void)
uint8_t DeviceAddress = (USB_ControlRequest.wValue & 0x7F);
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
-
+
Endpoint_ClearSETUP();
Endpoint_ClearStatusStage();
@@ -133,7 +133,7 @@ static void USB_Device_SetAddress(void)
USB_Device_SetDeviceAddress(DeviceAddress);
USB_DeviceState = (DeviceAddress) ? DEVICE_STATE_Addressed : DEVICE_STATE_Default;
-
+
SetGlobalInterruptMask(CurrentGlobalInt);
}
@@ -156,7 +156,7 @@ static void USB_Device_SetConfiguration(void)
uint8_t MemoryAddressSpace;
#endif
#endif
-
+
if (CALLBACK_USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DevDescriptorPtr
#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \
!(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
@@ -185,7 +185,7 @@ static void USB_Device_SetConfiguration(void)
}
#else
if ((uint8_t)USB_ControlRequest.wValue > DevDescriptorPtr->NumberOfConfigurations)
- return;
+ return;
#endif
#endif
@@ -224,7 +224,7 @@ static void USB_Device_GetInternalSerialDescriptor(void)
SignatureDescriptor.Header.Type = DTYPE_String;
SignatureDescriptor.Header.Size = USB_STRING_LEN(INTERNAL_SERIAL_LENGTH_BITS / 4);
-
+
USB_Device_GetSerialString(SignatureDescriptor.UnicodeString);
Endpoint_ClearSETUP();
diff --git a/LUFA/Drivers/USB/Core/DeviceStandardReq.h b/LUFA/Drivers/USB/Core/DeviceStandardReq.h
index f47d8f644..2369f4853 100644
--- a/LUFA/Drivers/USB/Core/DeviceStandardReq.h
+++ b/LUFA/Drivers/USB/Core/DeviceStandardReq.h
@@ -43,7 +43,7 @@
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
#include "StdDescriptors.h"
#include "Events.h"
#include "StdRequestType.h"
diff --git a/LUFA/Drivers/USB/Core/Endpoint.h b/LUFA/Drivers/USB/Core/Endpoint.h
index 1ce7b50e7..8c895fd33 100644
--- a/LUFA/Drivers/USB/Core/Endpoint.h
+++ b/LUFA/Drivers/USB/Core/Endpoint.h
@@ -74,7 +74,7 @@
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/Core/EndpointStream.h b/LUFA/Drivers/USB/Core/EndpointStream.h
index 9afb4d203..4236253dd 100644
--- a/LUFA/Drivers/USB/Core/EndpointStream.h
+++ b/LUFA/Drivers/USB/Core/EndpointStream.h
@@ -1,7 +1,7 @@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
@@ -9,13 +9,13 @@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@ -36,7 +36,7 @@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-/** \ingroup Group_EndpointRW
+/** \ingroup Group_EndpointRW
* \defgroup Group_EndpointStreamRW Read/Write of Multi-Byte Streams
* \brief Endpoint data stream transmission and reception management.
*
@@ -44,7 +44,7 @@
* and to endpoints.
*
* @{
- */
+ */
#ifndef __ENDPOINT_STREAM_H__
#define __ENDPOINT_STREAM_H__
@@ -89,7 +89,7 @@
* again to process the next chunk of data in the transfer.
*/
};
-
+
/** Enum for the possible error return codes of the \c Endpoint_*_Control_Stream_* functions. */
enum Endpoint_ControlStream_RW_ErrorCodes_t
{
@@ -110,7 +110,7 @@
#elif (ARCH == ARCH_UC3)
#include "UC3/EndpointStream_UC3.h"
#elif (ARCH == ARCH_XMEGA)
- #include "XMEGA/EndpointStream_XMEGA.h"
+ #include "XMEGA/EndpointStream_XMEGA.h"
#endif
/* Disable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/USB/Core/Events.h b/LUFA/Drivers/USB/Core/Events.h
index 8afd3b53c..f40766103 100644
--- a/LUFA/Drivers/USB/Core/Events.h
+++ b/LUFA/Drivers/USB/Core/Events.h
@@ -217,7 +217,7 @@
void EVENT_USB_Device_Disconnect(void);
/** Event for control requests. This event fires when a the USB host issues a control request
- * to the mandatory device control endpoint (of address 0). This may either be a standard
+ * to the mandatory device control endpoint (of address 0). This may either be a standard
* request that the library may have a handler code for internally, or a class specific request
* issued to the device which must be handled appropriately. If a request is not processed in the
* user application via this event, it will be passed to the library for processing internally
diff --git a/LUFA/Drivers/USB/Core/Host.h b/LUFA/Drivers/USB/Core/Host.h
index a7e647dc1..adfdc253a 100644
--- a/LUFA/Drivers/USB/Core/Host.h
+++ b/LUFA/Drivers/USB/Core/Host.h
@@ -51,7 +51,7 @@
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@ -108,16 +108,16 @@
* bus address is being set.
*/
HOST_STATE_Default_PostAddressSet = 9, /**< This state indicates that the device's address has now been set, and the
- * stack is has now completed the device enumeration process. This state causes
+ * stack is has now completed the device enumeration process. This state causes
* the stack to change the current USB device address to that set for the
* connected device, before progressing to the \ref HOST_STATE_Addressed state
* ready for use in the user application.
*/
HOST_STATE_Addressed = 10, /**< Indicates that the device has been enumerated and addressed, and is now waiting
- * for the user application to configure the device ready for use.
+ * for the user application to configure the device ready for use.
*/
HOST_STATE_Configured = 11, /**< Indicates that the device has been configured into a valid device configuration,
- * ready for general use by the user application.
+ * ready for general use by the user application.
*/
};
diff --git a/LUFA/Drivers/USB/Core/HostStandardReq.c b/LUFA/Drivers/USB/Core/HostStandardReq.c
index bb8ade3a1..cb0bc7624 100644
--- a/LUFA/Drivers/USB/Core/HostStandardReq.c
+++ b/LUFA/Drivers/USB/Core/HostStandardReq.c
@@ -65,9 +65,9 @@ uint8_t USB_Host_SendControlRequest(void* const BufferPtr)
uint8_t* HeaderStream = (uint8_t*)&USB_ControlRequest;
for (uint8_t HeaderByte = 0; HeaderByte < sizeof(USB_Request_Header_t); HeaderByte++)
- Pipe_Write_8(*(HeaderStream++));
+ Pipe_Write_8(*(HeaderStream++));
#endif
-
+
Pipe_ClearSETUP();
if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_SetupSent)) != HOST_SENDCONTROL_Successful)
@@ -201,7 +201,7 @@ uint8_t USB_Host_SetDeviceConfiguration(const uint8_t ConfigNumber)
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
-
+
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) == HOST_SENDCONTROL_Successful)
{
USB_Host_ConfigurationNumber = ConfigNumber;
diff --git a/LUFA/Drivers/USB/Core/HostStandardReq.h b/LUFA/Drivers/USB/Core/HostStandardReq.h
index 7b456c701..d076a8a66 100644
--- a/LUFA/Drivers/USB/Core/HostStandardReq.h
+++ b/LUFA/Drivers/USB/Core/HostStandardReq.h
@@ -69,7 +69,7 @@
*/
#define USB_HOST_TIMEOUT_MS 1000
#endif
-
+
/* Enums: */
/** Enum for the \ref USB_Host_SendControlRequest() return code, indicating the reason for the error
* if the transfer of the request is unsuccessful.
@@ -101,7 +101,7 @@
* \ingroup Group_Host
*/
extern uint8_t USB_Host_ConfigurationNumber;
-
+
/* Function Prototypes: */
/** Sends the request stored in the \ref USB_ControlRequest global structure to the attached device,
* and transfers the data stored in the buffer to the device, or from the device to the buffer
@@ -130,7 +130,7 @@
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
*/
uint8_t USB_Host_SetDeviceConfiguration(const uint8_t ConfigNumber);
-
+
/** Sends a GET CONFIGURATION standard request to the attached device, to retrieve the currently selected
* device configuration index.
*
@@ -239,7 +239,7 @@
{
return USB_Host_GetDescriptor(DTYPE_Device, 0, DeviceDescriptorPtr, sizeof(USB_Descriptor_Device_t));
}
-
+
/** Sends a GET DESCRIPTOR standard request to the attached device, requesting the string descriptor
* of the specified index. This can be used to easily retrieve string descriptors from the device by
* index, after the index is obtained from the Device or Configuration descriptors. This is a convenience
diff --git a/LUFA/Drivers/USB/Core/OTG.h b/LUFA/Drivers/USB/Core/OTG.h
index 59cb36833..01cc059ac 100644
--- a/LUFA/Drivers/USB/Core/OTG.h
+++ b/LUFA/Drivers/USB/Core/OTG.h
@@ -52,8 +52,8 @@
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
-
+ #include "USBMode.h"
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
diff --git a/LUFA/Drivers/USB/Core/PipeStream.h b/LUFA/Drivers/USB/Core/PipeStream.h
index 5d821f50a..0712f6597 100644
--- a/LUFA/Drivers/USB/Core/PipeStream.h
+++ b/LUFA/Drivers/USB/Core/PipeStream.h
@@ -1,7 +1,7 @@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
@@ -9,13 +9,13 @@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@ -27,7 +27,7 @@
arising out of or in connection with the use or performance of
this software.
*/
-
+
/** \file
* \brief Pipe data stream transmission and reception management.
* \copydetails Group_PipeStreamRW
@@ -36,7 +36,7 @@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-/** \ingroup Group_PipeRW
+/** \ingroup Group_PipeRW
* \defgroup Group_PipeStreamRW Read/Write of Multi-Byte Streams
* \brief Pipe data stream transmission and reception management.
*
@@ -52,7 +52,7 @@
/* Includes: */
#include "../../../Common/Common.h"
#include "USBMode.h"
-
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
@@ -62,17 +62,17 @@
#if !defined(__INCLUDE_FROM_USB_DRIVER)
#error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
#endif
-
+
/* Public Interface - May be used in end-application: */
/* Enums: */
/** Enum for the possible error return codes of the Pipe_*_Stream_* functions. */
enum Pipe_Stream_RW_ErrorCodes_t
{
PIPE_RWSTREAM_NoError = 0, /**< Command completed successfully, no error. */
- PIPE_RWSTREAM_PipeStalled = 1, /**< The device stalled the pipe during the transfer. */
+ PIPE_RWSTREAM_PipeStalled = 1, /**< The device stalled the pipe during the transfer. */
PIPE_RWSTREAM_DeviceDisconnected = 2, /**< Device was disconnected from the host during
* the transfer.
- */
+ */
PIPE_RWSTREAM_Timeout = 3, /**< The device failed to accept or send the next packet
* within the software timeout period set by the
* \ref USB_STREAM_TIMEOUT_MS macro.
@@ -93,7 +93,7 @@
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
diff --git a/LUFA/Drivers/USB/Core/StdDescriptors.h b/LUFA/Drivers/USB/Core/StdDescriptors.h
index f5bacf804..6bece18a1 100644
--- a/LUFA/Drivers/USB/Core/StdDescriptors.h
+++ b/LUFA/Drivers/USB/Core/StdDescriptors.h
@@ -123,7 +123,7 @@
*/
#define USB_CONFIG_ATTR_REMOTEWAKEUP 0x20
//@}
-
+
/** \name Endpoint Descriptor Attribute Masks */
//@{
/** Can be masked with other endpoint descriptor attributes for a \ref USB_Descriptor_Endpoint_t descriptor's
@@ -154,7 +154,7 @@
*/
#define ENDPOINT_ATTR_SYNC (3 << 2)
//@}
-
+
/** \name Endpoint Descriptor Usage Masks */
//@{
/** Can be masked with other endpoint descriptor attributes for a \ref USB_Descriptor_Endpoint_t descriptor's
@@ -178,7 +178,7 @@
*/
#define ENDPOINT_USAGE_IMPLICIT_FEEDBACK (2 << 4)
//@}
-
+
/* Enums: */
/** Enum for the possible standard descriptor types, as given in each descriptor's header. */
enum USB_DescriptorTypes_t
diff --git a/LUFA/Drivers/USB/Core/StdRequestType.h b/LUFA/Drivers/USB/Core/StdRequestType.h
index e5cadfe6e..47d6ae1d7 100644
--- a/LUFA/Drivers/USB/Core/StdRequestType.h
+++ b/LUFA/Drivers/USB/Core/StdRequestType.h
@@ -51,7 +51,7 @@
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@ -219,7 +219,7 @@
* via the \ref EVENT_USB_Device_ControlRequest() event when received in
* device mode. */
};
-
+
/** Feature Selector values for Set Feature and Clear Feature standard control requests directed to the device, interface
* and endpoint recipients.
*/
diff --git a/LUFA/Drivers/USB/Core/UC3/Device_UC3.h b/LUFA/Drivers/USB/Core/UC3/Device_UC3.h
index a26d7c2da..e79c3b093 100644
--- a/LUFA/Drivers/USB/Core/UC3/Device_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/Device_UC3.h
@@ -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
diff --git a/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c b/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
index 143708772..2bf143d37 100644
--- a/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
+++ b/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
@@ -228,3 +228,4 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
#include "Template/Template_Endpoint_Control_R.c"
#endif
+
diff --git a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
index c8e3af72a..0509494f3 100644
--- a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
+++ b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
@@ -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)
diff --git a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
index 0e316c880..85f04afb1 100644
--- a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
@@ -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
diff --git a/LUFA/Drivers/USB/Core/UC3/Host_UC3.c b/LUFA/Drivers/USB/Core/UC3/Host_UC3.c
index 55cd8f991..dde5b1b0f 100644
--- a/LUFA/Drivers/USB/Core/UC3/Host_UC3.c
+++ b/LUFA/Drivers/USB/Core/UC3/Host_UC3.c
@@ -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);
diff --git a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
index eca6cb8aa..f447a1730 100644
--- a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
+++ b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
@@ -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
}
diff --git a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
index d99cfed96..a047198ce 100644
--- a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
@@ -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)
diff --git a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c
index 68f645b89..55d137ba3 100644
--- a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c
+++ b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c
@@ -81,3 +81,4 @@ uint8_t TEMPLATE_FUNC_NAME (void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
diff --git a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c
index 5d4fc42f2..36685f0c4 100644
--- a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c
+++ b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c
@@ -90,3 +90,4 @@ uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
diff --git a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c
index 46b006364..7ed192df7 100644
--- a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c
+++ b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c
@@ -86,3 +86,4 @@ uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
#undef TEMPLATE_BUFFER_MOVE
#endif
+
diff --git a/LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c b/LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c
index bc8570d01..daba216ac 100644
--- a/LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c
+++ b/LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c
@@ -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
+
diff --git a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
index 93ed03ecf..965971fc6 100644
--- a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
+++ b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
@@ -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);
diff --git a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.h b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.h
index 8ec5626d5..3f7ec5fbe 100644
--- a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.h
@@ -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)
diff --git a/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.h b/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.h
index c4276d9c1..bf6d172a2 100644
--- a/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.h
@@ -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)
}
diff --git a/LUFA/Drivers/USB/Core/USBController.h b/LUFA/Drivers/USB/Core/USBController.h
index 1c44c1676..1e4f326d0 100644
--- a/LUFA/Drivers/USB/Core/USBController.h
+++ b/LUFA/Drivers/USB/Core/USBController.h
@@ -50,7 +50,7 @@
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@ -119,7 +119,7 @@
#elif (ARCH == ARCH_UC3)
#include "UC3/USBController_UC3.h"
#elif (ARCH == ARCH_XMEGA)
- #include "XMEGA/USBController_XMEGA.h"
+ #include "XMEGA/USBController_XMEGA.h"
#endif
/* Disable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/USB/Core/USBInterrupt.h b/LUFA/Drivers/USB/Core/USBInterrupt.h
index f0b3181c7..3f88071a1 100644
--- a/LUFA/Drivers/USB/Core/USBInterrupt.h
+++ b/LUFA/Drivers/USB/Core/USBInterrupt.h
@@ -43,7 +43,7 @@
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@ -61,7 +61,7 @@
#elif (ARCH == ARCH_UC3)
#include "UC3/USBInterrupt_UC3.h"
#elif (ARCH == ARCH_XMEGA)
- #include "XMEGA/USBInterrupt_XMEGA.h"
+ #include "XMEGA/USBInterrupt_XMEGA.h"
#endif
/* Disable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/USB/Core/USBMode.h b/LUFA/Drivers/USB/Core/USBMode.h
index debdc2d88..00130778e 100644
--- a/LUFA/Drivers/USB/Core/USBMode.h
+++ b/LUFA/Drivers/USB/Core/USBMode.h
@@ -91,7 +91,7 @@
* (i.e. AT32UC3A0*) when defined.
*/
#define USB_SERIES_UC3A0_AVR
-
+
/** Indicates that the target AVR microcontroller belongs to the AVR32 UC3A1 Series USB controller
* (i.e. AT32UC3A1*) when defined.
*/
@@ -111,7 +111,7 @@
* (i.e. AT32UC3B1*) when defined.
*/
#define USB_SERIES_UC3B1_AVR
-
+
/** Indicates that the target AVR microcontroller belongs to the XMEGA A1U Series USB controller
* (i.e. ATXMEGA*A1U) when defined.
*/
@@ -219,7 +219,7 @@
#define USB_SERIES_B3_XMEGA
#define USB_CAN_BE_DEVICE
#endif
-
+
#if (defined(USB_CAN_BE_DEVICE) && defined(USB_CAN_BE_HOST))
#define USB_CAN_BE_BOTH
#endif
@@ -241,7 +241,7 @@
#undef USB_CAN_BE_BOTH
#endif
#endif
-
+
#if (defined(USB_HOST_ONLY) && defined(USB_DEVICE_ONLY))
#error USB_HOST_ONLY and USB_DEVICE_ONLY are mutually exclusive.
#endif
@@ -259,3 +259,4 @@
#endif
/** @} */
+
diff --git a/LUFA/Drivers/USB/Core/USBTask.h b/LUFA/Drivers/USB/Core/USBTask.h
index 6084268de..53eb719f7 100644
--- a/LUFA/Drivers/USB/Core/USBTask.h
+++ b/LUFA/Drivers/USB/Core/USBTask.h
@@ -43,7 +43,7 @@
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
#include "USBController.h"
#include "Events.h"
#include "StdRequestType.h"
@@ -81,7 +81,7 @@
extern volatile bool USB_IsInitialized;
/** Structure containing the last received Control request when in Device mode (for use in user-applications
- * inside of the \ref EVENT_USB_Device_ControlRequest() event, or for filling up with a control request to
+ * inside of the \ref EVENT_USB_Device_ControlRequest() event, or for filling up with a control request to
* issue when in Host mode before calling \ref USB_Host_SendControlRequest().
*
* \note The contents of this structure is automatically endian-corrected for the current CPU architecture.
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
index 91cc59517..8fefbcb65 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
+++ b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
@@ -54,7 +54,7 @@
#include "../StdDescriptors.h"
#include "../USBInterrupt.h"
#include "../Endpoint.h"
-
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
@@ -97,7 +97,7 @@
*/
#define USB_DEVICE_OPT_FULLSPEED (0 << 0)
//@}
-
+
#if (!defined(NO_INTERNAL_SERIAL) || defined(__DOXYGEN__))
/** String descriptor index for the device's unique serial number string descriptor within the device.
* This unique serial number is used by the host to associate resources to the device (such as drivers or COM port
@@ -114,7 +114,7 @@
* model.
*/
#define INTERNAL_SERIAL_LENGTH_BITS (8 * (1 + (offsetof(NVM_PROD_SIGNATURES_t, COORDY1) - offsetof(NVM_PROD_SIGNATURES_t, LOTNUM0))))
-
+
/** Start address of the internal serial number, in the appropriate address space, if present on the selected microcontroller
* model.
*/
@@ -125,7 +125,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.
@@ -211,17 +211,17 @@
{
return ((USB.ADDR != 0) ? true : false);
}
-
+
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++)
- {
+ {
uint8_t SerialByte;
NVM.CMD = NVM_CMD_READ_CALIB_ROW_gc;
@@ -239,7 +239,7 @@
UnicodeString[SerialCharNum] = cpu_to_le16((SerialByte >= 10) ?
(('A' - 10) + SerialByte) : ('0' + SerialByte));
}
-
+
SetGlobalInterruptMask(CurrentGlobalInt);
}
diff --git a/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
index 15ee479cb..feaffd630 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
+++ b/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
@@ -268,3 +268,4 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
#endif
#endif
+
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
index c301cc385..e73781466 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
+++ b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
@@ -51,13 +51,13 @@ bool Endpoint_ConfigureEndpoint_PRV(const uint8_t Number,
const uint8_t Size)
{
Endpoint_SelectEndpoint(Number | Direction);
-
+
USB_Endpoint_SelectedHandle->CTRL = 0;
USB_Endpoint_SelectedHandle->STATUS = (Direction == ENDPOINT_DIR_IN) ? USB_EP_BUSNACK0_bm : 0;
USB_Endpoint_SelectedHandle->CTRL = Config;
USB_Endpoint_SelectedHandle->CNT = 0;
USB_Endpoint_SelectedHandle->DATAPTR = (intptr_t)USB_Endpoint_SelectedFIFO->Data;
-
+
USB_Endpoint_SelectedFIFO->Length = (Direction == ENDPOINT_DIR_IN) ? Size : 0;
USB_Endpoint_SelectedFIFO->Position = 0;
@@ -117,7 +117,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)
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
index 2d4d7be93..495aa9707 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
+++ b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
@@ -104,7 +104,7 @@
uint8_t Length;
uint8_t Position;
} Endpoint_FIFO_t;
-
+
typedef struct
{
Endpoint_FIFO_t OUT;
@@ -143,7 +143,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
@@ -234,7 +234,7 @@
static inline void Endpoint_SelectEndpoint(const uint8_t EndpointNumber)
{
USB_Endpoint_SelectedEndpoint = EndpointNumber;
-
+
if (EndpointNumber & ENDPOINT_DIR_IN)
{
USB_Endpoint_SelectedFIFO = &USB_Endpoint_FIFOs[EndpointNumber & ENDPOINT_EPNUM_MASK].IN;
@@ -290,7 +290,7 @@
const uint8_t Banks)
{
uint8_t EPConfigMask = (USB_EP_INTDSBL_bm | Banks | Endpoint_BytesToEPSizeMask(Size));
-
+
// TODO - Fix once limitations are lifted
if ((Banks != ENDPOINT_BANK_SINGLE) || (Size > 64))
return false;
@@ -307,10 +307,10 @@
EPConfigMask |= USB_EP_TYPE_BULK_gc;
break;
}
-
+
if (Type == EP_TYPE_CONTROL)
Endpoint_ConfigureEndpoint_PRV(Number, (Direction ^ ENDPOINT_DIR_IN), EPConfigMask, Size);
-
+
return Endpoint_ConfigureEndpoint_PRV(Number, Direction, EPConfigMask, Size);
}
@@ -439,7 +439,7 @@
static inline bool Endpoint_IsINReady(void)
{
Endpoint_SelectEndpoint(USB_Endpoint_SelectedEndpoint | ENDPOINT_DIR_IN);
-
+
return ((USB_Endpoint_SelectedHandle->STATUS & USB_EP_BUSNACK0_bm) ? true : false);
}
@@ -459,7 +459,7 @@
USB_Endpoint_SelectedFIFO->Length = USB_Endpoint_SelectedHandle->CNT;
return true;
}
-
+
return false;
}
@@ -479,7 +479,7 @@
USB_Endpoint_SelectedFIFO->Length = USB_Endpoint_SelectedHandle->CNT;
return true;
}
-
+
return false;
}
@@ -523,7 +523,7 @@
*/
static inline void Endpoint_ClearOUT(void) ATTR_ALWAYS_INLINE;
static inline void Endpoint_ClearOUT(void)
- {
+ {
USB_Endpoint_SelectedHandle->STATUS &= ~(USB_EP_TRNCOMPL0_bm | USB_EP_BUSNACK0_bm | USB_EP_OVF_bm);
USB_Endpoint_SelectedFIFO->Position = 0;
}
@@ -543,7 +543,7 @@
static inline void Endpoint_StallTransaction(void)
{
USB_Endpoint_SelectedHandle->CTRL |= USB_EP_STALL_bm;
-
+
if ((USB_Endpoint_SelectedHandle->CTRL & USB_EP_TYPE_gm) == USB_EP_TYPE_CONTROL_gc)
{
Endpoint_SelectEndpoint(USB_Endpoint_SelectedEndpoint ^ ENDPOINT_DIR_IN);
@@ -636,7 +636,7 @@
{
uint16_t Byte0 = Endpoint_Read_8();
uint16_t Byte1 = Endpoint_Read_8();
-
+
return ((Byte1 << 8) | Byte0);
}
@@ -652,7 +652,7 @@
{
uint16_t Byte0 = Endpoint_Read_8();
uint16_t Byte1 = Endpoint_Read_8();
-
+
return ((Byte0 << 8) | Byte1);
}
@@ -709,7 +709,7 @@
uint32_t Byte1 = Endpoint_Read_8();
uint32_t Byte2 = Endpoint_Read_8();
uint32_t Byte3 = Endpoint_Read_8();
-
+
return ((Byte3 << 24) | (Byte2 << 16) | (Byte1 << 8) | Byte0);
}
@@ -727,7 +727,7 @@
uint32_t Byte1 = Endpoint_Read_8();
uint32_t Byte2 = Endpoint_Read_8();
uint32_t Byte3 = Endpoint_Read_8();
-
+
return ((Byte0 << 24) | (Byte1 << 16) | (Byte2 << 8) | Byte3);
}
diff --git a/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c
index 4144a06c5..b9d9d7699 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c
+++ b/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c
@@ -1,7 +1,7 @@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
@@ -9,13 +9,13 @@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c
index 68f645b89..55d137ba3 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c
+++ b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c
@@ -81,3 +81,4 @@ uint8_t TEMPLATE_FUNC_NAME (void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c
index 5d4fc42f2..36685f0c4 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c
+++ b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c
@@ -90,3 +90,4 @@ uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c
index 46b006364..7ed192df7 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c
+++ b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c
@@ -86,3 +86,4 @@ uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
#undef TEMPLATE_BUFFER_MOVE
#endif
+
diff --git a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
index 3b7793020..1d678fb20 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
+++ b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
@@ -61,9 +61,9 @@ void USB_Init(
#if !defined(USE_STATIC_OPTIONS)
USB_Options = Options;
#endif
-
+
USB_IsInitialized = true;
-
+
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
@@ -71,7 +71,7 @@ void USB_Init(
USB.CAL0 = pgm_read_byte(offsetof(NVM_PROD_SIGNATURES_t, USBCAL0));
USB.CAL1 = pgm_read_byte(offsetof(NVM_PROD_SIGNATURES_t, USBCAL1));
NVM.CMD = 0;
-
+
USB.EPPTR = (intptr_t)&USB_EndpointTable;
USB.CTRLA = (USB_STFRNUM_bm | USB_MAXEP_gm);
@@ -95,7 +95,7 @@ void USB_Disable(void)
USB_Detach();
USB_Controller_Disable();
- USB_IsInitialized = false;
+ USB_IsInitialized = false;
}
void USB_ResetInterface(void)
@@ -104,14 +104,14 @@ void USB_ResetInterface(void)
CLK.USBCTRL = (((F_USB / 6000000) - 1) << CLK_USBPSDIV_gp);
else
CLK.USBCTRL = (((F_USB / 48000000) - 1) << CLK_USBPSDIV_gp);
-
+
if (USB_Options & USB_OPT_PLLCLKSRC)
CLK.USBCTRL |= (CLK_USBSRC_PLL_gc | CLK_USBSEN_bm);
else
CLK.USBCTRL |= (CLK_USBSRC_RC32M_gc | CLK_USBSEN_bm);
USB_Device_SetDeviceAddress(0);
-
+
USB_INT_DisableAllInterrupts();
USB_INT_ClearAllInterrupts();
@@ -135,7 +135,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;
@@ -159,7 +159,7 @@ static void USB_Init_Device(void)
#else
USB_Device_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
#endif
- }
+ }
#endif
#endif
@@ -177,3 +177,4 @@ static void USB_Init_Device(void)
USB_Attach();
}
#endif
+
diff --git a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
index 2c3169758..77d422a8b 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
+++ b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
@@ -67,12 +67,12 @@
} Endpoints[16];
uint16_t FrameNum;
} ATTR_PACKED USB_EndpointTable_t;
-
+
/* External Variables: */
extern USB_EndpointTable_t USB_EndpointTable;
-
+
#endif
-
+
/* Includes: */
#if defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__)
#include "../Device.h"
@@ -94,7 +94,7 @@
#if !defined(F_USB)
#error F_USB is not defined. You must define F_USB to the frequency of the unprescaled USB controller clock in your project makefile.
#endif
-
+
#if (F_USB % 6000000)
#error Invalid F_USB specified. F_USB must be a multiple of 6MHz for USB Low Speed operation, and a multiple of 48MHz for Full Speed operation.
#endif
diff --git a/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c
index 62fbf2d91..2dce0e64c 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c
+++ b/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c
@@ -70,7 +70,7 @@ ISR(USB_BUSEVENT_vect)
if (USB_INT_HasOccurred(USB_INT_BUSEVENTI_Resume))
{
USB_INT_Clear(USB_INT_BUSEVENTI_Resume);
-
+
if (USB_Device_ConfigurationNumber)
USB_DeviceState = DEVICE_STATE_Configured;
else
@@ -86,7 +86,7 @@ ISR(USB_BUSEVENT_vect)
if (USB_INT_HasOccurred(USB_INT_BUSEVENTI_Reset))
{
USB_INT_Clear(USB_INT_BUSEVENTI_Reset);
-
+
USB_DeviceState = DEVICE_STATE_Default;
USB_Device_ConfigurationNumber = 0;
diff --git a/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.h
index f27ea6022..c2436cae6 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.h
+++ b/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.h
@@ -76,8 +76,8 @@
USB.INTCTRLA |= USB_BUSEVIE_bm;
return;
case USB_INT_SOFI:
- USB.INTCTRLA |= USB_SOFIE_bm;
- return;
+ USB.INTCTRLA |= USB_SOFIE_bm;
+ return;
}
}
@@ -90,11 +90,11 @@
USB.INTCTRLA &= ~USB_BUSEVIE_bm;
return;
case USB_INT_SOFI:
- USB.INTCTRLA &= ~USB_SOFIE_bm;
- return;
+ USB.INTCTRLA &= ~USB_SOFIE_bm;
+ return;
}
}
-
+
static inline void USB_INT_Clear(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Clear(const uint8_t Interrupt)
{
@@ -110,11 +110,11 @@
USB.INTFLAGSACLR = USB_RSTIF_bm;
return;
case USB_INT_SOFI:
- USB.INTFLAGSACLR = USB_SOFIF_bm;
- return;
+ USB.INTFLAGSACLR = USB_SOFIF_bm;
+ return;
}
}
-
+
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)
{
@@ -125,10 +125,10 @@
case USB_INT_SOFI:
return ((USB.INTCTRLA & USB_SOFIE_bm) ? true : false);
}
-
+
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)
{
@@ -143,7 +143,7 @@
case USB_INT_SOFI:
return ((USB.INTFLAGSACLR & USB_SOFIF_bm) ? true : false);
}
-
+
return false;
}