aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/USB')
-rw-r--r--LUFA/Drivers/USB/Core/StdDescriptors.h26
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c2
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c2
-rw-r--r--LUFA/Drivers/USB/Core/UC3/USBController_UC3.c2
-rw-r--r--LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c8
5 files changed, 23 insertions, 17 deletions
diff --git a/LUFA/Drivers/USB/Core/StdDescriptors.h b/LUFA/Drivers/USB/Core/StdDescriptors.h
index 32777cc0f..7840bcb8e 100644
--- a/LUFA/Drivers/USB/Core/StdDescriptors.h
+++ b/LUFA/Drivers/USB/Core/StdDescriptors.h
@@ -612,17 +612,21 @@
{
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */
- wchar_t UnicodeString[]; /**< String data, as unicode characters (alternatively,
- * string language IDs). If normal ASCII characters are
- * to be used, they must be added as an array of characters
- * rather than a normal C string so that they are widened to
- * Unicode size.
- *
- * Under GCC, strings prefixed with the "L" character (before
- * the opening string quotation mark) are considered to be
- * Unicode strings, and may be used instead of an explicit
- * array of ASCII characters.
- */
+ #if (ARCH == ARCH_AVR8)
+ wchar_t UnicodeString[];
+ #else
+ uint16_t UnicodeString[]; /**< String data, as unicode characters (alternatively,
+ * string language IDs). If normal ASCII characters are
+ * to be used, they must be added as an array of characters
+ * rather than a normal C string so that they are widened to
+ * Unicode size.
+ *
+ * Under GCC, strings prefixed with the "L" character (before
+ * the opening string quotation mark) are considered to be
+ * Unicode strings, and may be used instead of an explicit
+ * array of ASCII characters.
+ */
+ #endif
} ATTR_PACKED USB_Descriptor_String_t;
/** \brief Standard USB String Descriptor (USB-IF naming conventions).
diff --git a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
index b978ec7f1..9c7d6b62d 100644
--- a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
+++ b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
@@ -61,7 +61,7 @@ void Endpoint_ClearEndpoints(void)
{
Endpoint_SelectEndpoint(EPNum);
(&AVR32_USBB.uecfg0)[EPNum] = 0;
- (&AVR32_USBB.uecon0clr)[EPNum] = 0xFFFFFFFF;
+ (&AVR32_USBB.uecon0clr)[EPNum] = -1;
USB_EndpointFIFOPos[EPNum] = &AVR32_USBB_SLAVE[EPNum * 0x10000];
Endpoint_DisableEndpoint();
}
diff --git a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
index 86bed0388..92589a870 100644
--- a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
+++ b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
@@ -69,7 +69,7 @@ void Pipe_ClearPipes(void)
{
Pipe_SelectPipe(PNum);
(&AVR32_USBB.upcfg0)[PNum] = 0;
- (&AVR32_USBB.upcon0clr)[PNum] = 0xFFFFFFFF;
+ (&AVR32_USBB.upcon0clr)[PNum] = -1;
USB_PipeFIFOPos[PNum] = &AVR32_USBB_SLAVE[PNum * 0x10000];
Pipe_DisablePipe();
}
diff --git a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
index e3d97d684..0b0d04d63 100644
--- a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
+++ b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
@@ -72,6 +72,8 @@ void USB_Init(
AVR32_USBB.USBCON.uide = false;
USB_CurrentMode = Mode;
}
+ #else
+ AVR32_USBB.USBCON.uide = false;
#endif
USB_IsInitialized = true;
diff --git a/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c b/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c
index 76f4ef022..5191ee67f 100644
--- a/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c
+++ b/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c
@@ -36,8 +36,8 @@ void USB_INT_DisableAllInterrupts(void)
AVR32_USBB.USBCON.vbuste = false;
AVR32_USBB.USBCON.idte = false;
- AVR32_USBB.uhinteclr = 0xFFFFFFFF;
- AVR32_USBB.udinteclr = 0xFFFFFFFF;
+ AVR32_USBB.uhinteclr = -1;
+ AVR32_USBB.udinteclr = -1;
}
void USB_INT_ClearAllInterrupts(void)
@@ -45,8 +45,8 @@ void USB_INT_ClearAllInterrupts(void)
AVR32_USBB.USBSTACLR.vbustic = true;
AVR32_USBB.USBSTACLR.idtic = true;
- AVR32_USBB.uhintclr = 0xFFFFFFFF;
- AVR32_USBB.udintclr = 0xFFFFFFFF;
+ AVR32_USBB.uhintclr = -1;
+ AVR32_USBB.udintclr = -1;
}
ISR(USB_GEN_vect)