diff --git a/LUFA.pnproj b/LUFA.pnproj
index fa1f70d010..8a44db869d 100644
--- a/LUFA.pnproj
+++ b/LUFA.pnproj
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h
index 76144f94b5..e52aae8e09 100644
--- a/LUFA/Common/Common.h
+++ b/LUFA/Common/Common.h
@@ -57,7 +57,8 @@
#define __COMMON_H__
/* Includes: */
- #include
+ #include
+ #include
#include "Attributes.h"
#include "BoardTypes.h"
diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
index 76b734bd7c..9d4a2b3b19 100644
--- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
+++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
@@ -51,12 +51,12 @@
#define __CONFIGDESCRIPTOR_H__
/* Includes: */
- #include
+ #include
#include "../../../Common/Common.h"
- #include "../HighLevel/USBMode.h"
- #include "../LowLevel/HostChapter9.h"
- #include "../HighLevel/StdDescriptors.h"
+ #include "HostStandardReq.h"
+ #include "USBMode.h"
+ #include "StdDescriptors.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.c b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
similarity index 98%
rename from LUFA/Drivers/USB/LowLevel/DevChapter9.c
rename to LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
index 544531b8da..64af1406ba 100644
--- a/LUFA/Drivers/USB/LowLevel/DevChapter9.c
+++ b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
@@ -29,12 +29,12 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../HighLevel/USBMode.h"
+#include "USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
-#define __INCLUDE_FROM_DEVCHAPTER9_C
-#include "DevChapter9.h"
+#define __INCLUDE_FROM_DEVICESTDREQ_C
+#include "DeviceStandardReq.h"
uint8_t USB_ConfigurationNumber;
@@ -138,7 +138,7 @@ static void USB_Device_SetAddress(void)
USB_DeviceState = (DeviceAddress) ? DEVICE_STATE_Addressed : DEVICE_STATE_Default;
- UDADDR = ((1 << ADDEN) | DeviceAddress);
+ USB_Device_SetDeviceAddress(DeviceAddress);
return;
}
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.h b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.h
similarity index 95%
rename from LUFA/Drivers/USB/LowLevel/DevChapter9.h
rename to LUFA/Drivers/USB/HighLevel/DeviceStandardReq.h
index ab62c535aa..a65b93b62c 100644
--- a/LUFA/Drivers/USB/LowLevel/DevChapter9.h
+++ b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.h
@@ -38,21 +38,22 @@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-#ifndef __DEVCHAPTER9_H__
-#define __DEVCHAPTER9_H__
+#ifndef __DEVICESTDREQ_H__
+#define __DEVICESTDREQ_H__
/* Includes: */
- #include
#include
#include
#include
#include
+ #include
+ #include
- #include "../HighLevel/StdDescriptors.h"
- #include "../HighLevel/Events.h"
- #include "../HighLevel/StdRequestType.h"
- #include "../HighLevel/USBTask.h"
- #include "LowLevel.h"
+ #include "StdDescriptors.h"
+ #include "Events.h"
+ #include "StdRequestType.h"
+ #include "USBTask.h"
+ #include "../LowLevel/USBController.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@ -141,7 +142,7 @@
/* Function Prototypes: */
void USB_Device_ProcessControlRequest(void);
- #if defined(__INCLUDE_FROM_DEVCHAPTER9_C)
+ #if defined(__INCLUDE_FROM_DEVICESTDREQ_C)
static void USB_Device_SetAddress(void);
static void USB_Device_SetConfiguration(void);
static void USB_Device_GetConfiguration(void);
diff --git a/LUFA/Drivers/USB/HighLevel/Events.h b/LUFA/Drivers/USB/HighLevel/Events.h
index d88c47123d..ab63c7bfeb 100644
--- a/LUFA/Drivers/USB/HighLevel/Events.h
+++ b/LUFA/Drivers/USB/HighLevel/Events.h
@@ -69,7 +69,7 @@
#define __USBEVENTS_H__
/* Includes: */
- #include
+ #include
#include "../../../Common/Common.h"
#include "USBMode.h"
diff --git a/LUFA/Drivers/USB/LowLevel/HostChapter9.c b/LUFA/Drivers/USB/HighLevel/HostStandardReq.c
similarity index 97%
rename from LUFA/Drivers/USB/LowLevel/HostChapter9.c
rename to LUFA/Drivers/USB/HighLevel/HostStandardReq.c
index 69575f18b5..cc6dc41e67 100644
--- a/LUFA/Drivers/USB/LowLevel/HostChapter9.c
+++ b/LUFA/Drivers/USB/HighLevel/HostStandardReq.c
@@ -29,12 +29,12 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../HighLevel/USBMode.h"
+#include "USBMode.h"
#if defined(USB_CAN_BE_HOST)
-#define __INCLUDE_FROM_HOSTCHAPTER9_C
-#include "HostChapter9.h"
+#define __INCLUDE_FROM_HOSTSTDREQ_C
+#include "HostStandardReq.h"
uint8_t USB_Host_SendControlRequest(void* BufferPtr)
{
diff --git a/LUFA/Drivers/USB/LowLevel/HostChapter9.h b/LUFA/Drivers/USB/HighLevel/HostStandardReq.h
similarity index 94%
rename from LUFA/Drivers/USB/LowLevel/HostChapter9.h
rename to LUFA/Drivers/USB/HighLevel/HostStandardReq.h
index 0518855adf..4a527faee8 100644
--- a/LUFA/Drivers/USB/LowLevel/HostChapter9.h
+++ b/LUFA/Drivers/USB/HighLevel/HostStandardReq.h
@@ -38,17 +38,17 @@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-#ifndef __HOSTCHAPTER9_H__
-#define __HOSTCHAPTER9_H__
+#ifndef __HOSTSTDREQ_H__
+#define __HOSTSTDREQ_H__
/* Includes: */
- #include
+ #include
#include
- #include "LowLevel.h"
- #include "../HighLevel/USBMode.h"
- #include "../HighLevel/StdRequestType.h"
-
+ #include "USBMode.h"
+ #include "StdRequestType.h"
+ #include "../LowLevel/USBController.h"
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
@@ -104,7 +104,7 @@
};
/* Function Prototypes: */
- #if defined(__INCLUDE_FROM_HOSTCHAPTER9_C)
+ #if defined(__INCLUDE_FROM_HOSTSTDREQ_C)
static uint8_t USB_Host_WaitForIOS(const uint8_t WaitType);
#endif
#endif
diff --git a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
index 1798365c5b..6768b59f01 100644
--- a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
+++ b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
@@ -52,6 +52,7 @@
/* Includes: */
#include
#include
+ #include
#include
#include "../../../Common/Common.h"
diff --git a/LUFA/Drivers/USB/HighLevel/StdRequestType.h b/LUFA/Drivers/USB/HighLevel/StdRequestType.h
index 505ccd3c2b..f8e4f45f44 100644
--- a/LUFA/Drivers/USB/HighLevel/StdRequestType.h
+++ b/LUFA/Drivers/USB/HighLevel/StdRequestType.h
@@ -49,6 +49,9 @@
#ifndef __STDREQTYPE_H__
#define __STDREQTYPE_H__
+ /* Includes: */
+ #include
+
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_USB_DRIVER)
#error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
diff --git a/LUFA/Drivers/USB/HighLevel/StreamCallbacks.h b/LUFA/Drivers/USB/HighLevel/StreamCallbacks.h
index d3334e72f2..dc34952856 100644
--- a/LUFA/Drivers/USB/HighLevel/StreamCallbacks.h
+++ b/LUFA/Drivers/USB/HighLevel/StreamCallbacks.h
@@ -51,6 +51,9 @@
#ifndef __STREAMCALLBACK_H__
#define __STREAMCALLBACK_H__
+ /* Includes: */
+ #include
+
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_USB_DRIVER)
#error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.h b/LUFA/Drivers/USB/HighLevel/USBTask.h
index cce7bb29ef..faff2a3bba 100644
--- a/LUFA/Drivers/USB/HighLevel/USBTask.h
+++ b/LUFA/Drivers/USB/HighLevel/USBTask.h
@@ -42,22 +42,22 @@
#define __USBTASK_H__
/* Includes: */
- #include
#include
+ #include
#include
- #include "../LowLevel/LowLevel.h"
+ #include "../LowLevel/USBController.h"
#include "Events.h"
#include "StdRequestType.h"
#include "StdDescriptors.h"
#include "USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
- #include "../LowLevel/DevChapter9.h"
+ #include "DeviceStandardReq.h"
#endif
#if defined(USB_CAN_BE_HOST)
- #include "../LowLevel/HostChapter9.h"
+ #include "HostStandardReq.h"
#endif
/* Enable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/LowLevel/Device.h
index 27bc42828d..02dd8cf0d4 100644
--- a/LUFA/Drivers/USB/LowLevel/Device.h
+++ b/LUFA/Drivers/USB/LowLevel/Device.h
@@ -191,8 +191,11 @@
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
- #define USB_Device_SetLowSpeed() MACROS{ UDCON |= (1 << LSM); }MACROE
- #define USB_Device_SetFullSpeed() MACROS{ UDCON &= ~(1 << LSM); }MACROE
+ #define USB_Device_SetLowSpeed() MACROS{ UDCON |= (1 << LSM); }MACROE
+ #define USB_Device_SetFullSpeed() MACROS{ UDCON &= ~(1 << LSM); }MACROE
+
+ #define USB_Device_SetDeviceAddress(addr) MACROS{ UDADDR = ((1 << ADDEN) | (addr & 0x7F)); }MACROE
+
#endif
#endif
diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.c b/LUFA/Drivers/USB/LowLevel/USBController.c
similarity index 99%
rename from LUFA/Drivers/USB/LowLevel/LowLevel.c
rename to LUFA/Drivers/USB/LowLevel/USBController.c
index 4c742102bf..907e2bab0a 100644
--- a/LUFA/Drivers/USB/LowLevel/LowLevel.c
+++ b/LUFA/Drivers/USB/LowLevel/USBController.c
@@ -29,7 +29,7 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "LowLevel.h"
+#include "USBController.h"
#if (!defined(USB_HOST_ONLY) && !defined(USB_DEVICE_ONLY))
volatile uint8_t USB_CurrentMode = USB_MODE_NONE;
diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.h b/LUFA/Drivers/USB/LowLevel/USBController.h
similarity index 99%
rename from LUFA/Drivers/USB/LowLevel/LowLevel.h
rename to LUFA/Drivers/USB/LowLevel/USBController.h
index 4f27216b19..ef670a4561 100644
--- a/LUFA/Drivers/USB/LowLevel/LowLevel.h
+++ b/LUFA/Drivers/USB/LowLevel/USBController.h
@@ -46,8 +46,8 @@
* @{
*/
-#ifndef __USBLOWLEVEL_H__
-#define __USBLOWLEVEL_H__
+#ifndef __USBCONTROLLER_H__
+#define __USBCONTROLLER_H__
/* Includes: */
#include
@@ -66,12 +66,13 @@
#include "Host.h"
#include "Pipe.h"
#include "OTG.h"
+ #include "../HighLevel/HostStandardReq.h"
#endif
#if defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__)
#include "Device.h"
#include "Endpoint.h"
- #include "DevChapter9.h"
+ #include "../HighLevel/DeviceStandardReq.h"
#endif
/* Enable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/USB/LowLevel/USBInterrupt.h b/LUFA/Drivers/USB/LowLevel/USBInterrupt.h
index 6f8bf7cea6..f954468be9 100644
--- a/LUFA/Drivers/USB/LowLevel/USBInterrupt.h
+++ b/LUFA/Drivers/USB/LowLevel/USBInterrupt.h
@@ -50,7 +50,7 @@
#include "../../../Common/Common.h"
#include "../HighLevel/USBMode.h"
#include "../HighLevel/Events.h"
- #include "LowLevel.h"
+ #include "USBController.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/USB.h b/LUFA/Drivers/USB/USB.h
index 3cc1593fc6..c63582bad9 100644
--- a/LUFA/Drivers/USB/USB.h
+++ b/LUFA/Drivers/USB/USB.h
@@ -41,16 +41,16 @@
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
- * - LUFA/Drivers/USB/LowLevel/DevChapter9.c (Makefile source module name: LUFA_SRC_USB)
* - LUFA/Drivers/USB/LowLevel/Device.c (Makefile source module name: LUFA_SRC_USB)
* - LUFA/Drivers/USB/LowLevel/Endpoint.c (Makefile source module name: LUFA_SRC_USB)
* - LUFA/Drivers/USB/LowLevel/Host.c (Makefile source module name: LUFA_SRC_USB)
- * - LUFA/Drivers/USB/LowLevel/HostChapter9.c (Makefile source module name: LUFA_SRC_USB)
- * - LUFA/Drivers/USB/LowLevel/LowLevel.c (Makefile source module name: LUFA_SRC_USB)
* - LUFA/Drivers/USB/LowLevel/Pipe.c (Makefile source module name: LUFA_SRC_USB)
+ * - LUFA/Drivers/USB/LowLevel/USBController.c (Makefile source module name: LUFA_SRC_USB)
* - LUFA/Drivers/USB/LowLevel/USBInterrupt.c (Makefile source module name: LUFA_SRC_USB)
* - LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c (Makefile source module name: LUFA_SRC_USB)
+ * - LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c (Makefile source module name: LUFA_SRC_USB)
* - LUFA/Drivers/USB/HighLevel/Events.c (Makefile source module name: LUFA_SRC_USB)
+ * - LUFA/Drivers/USB/HighLevel/HostStandardReq.c (Makefile source module name: LUFA_SRC_USB)
* - LUFA/Drivers/USB/HighLevel/USBTask.c (Makefile source module name: LUFA_SRC_USB)
*
* \section Module Description
@@ -372,19 +372,19 @@
#include "HighLevel/StdDescriptors.h"
#include "HighLevel/ConfigDescriptor.h"
- #include "LowLevel/LowLevel.h"
+ #include "LowLevel/USBController.h"
#include "LowLevel/USBInterrupt.h"
#if defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__)
#include "LowLevel/Host.h"
- #include "LowLevel/HostChapter9.h"
#include "LowLevel/Pipe.h"
+ #include "HighLevel/HostStandardReq.h"
#endif
#if defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__)
#include "LowLevel/Device.h"
- #include "LowLevel/DevChapter9.h"
#include "LowLevel/Endpoint.h"
+ #include "HighLevel/DeviceStandardReq.h"
#endif
#if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
diff --git a/LUFA/ManPages/MigrationInformation.txt b/LUFA/ManPages/MigrationInformation.txt
index b0739ee8cf..ae05c8bdb8 100644
--- a/LUFA/ManPages/MigrationInformation.txt
+++ b/LUFA/ManPages/MigrationInformation.txt
@@ -15,6 +15,12 @@
* USB Core
* - A new USB driver source file, Drivers/USB/LowLevel/Device.c now exists. This source file should be added to all project
* makefiles using the USB driver of LUFA, or the makefile should be updated to use the new module source variables.
+ * - The Drivers/USB/LowLevel/DevChapter9.c source file has moved to Drivers/USB/HighLevel/DeviceStandardReq.c - this should
+ * be updated in all project makefiles, or the makefile should be updated to use the new module source variables.
+ * - The Drivers/USB/LowLevel/HostChapter9.h source file has moved to Drivers/USB/HighLevel/HostStandardReq.c - this should
+ * be updated in all project makefiles, or the makefile should be updated to use the new module source variables.
+ * - The Drivers/USB/LowLevel/LowLevel.c source file has moved to Drivers/LowLevel/USBController.c - this should be updated
+ * in all project makefiles, or the makefile should be updated to use the new module source variables.
*
* Device Mode
* - The USB_Device_IsRemoteWakeupSent() macro has been removed, as the remote wakeup request is now fully handled by the
diff --git a/LUFA/Scheduler/Scheduler.h b/LUFA/Scheduler/Scheduler.h
index ce2cbb191b..4b6ffa9afa 100644
--- a/LUFA/Scheduler/Scheduler.h
+++ b/LUFA/Scheduler/Scheduler.h
@@ -87,7 +87,7 @@
#define __SCHEDULER_H__
/* Includes: */
- #include
+ #include
#include
#include
diff --git a/LUFA/makefile b/LUFA/makefile
index 845de4e49c..2ecfde1771 100644
--- a/LUFA/makefile
+++ b/LUFA/makefile
@@ -17,16 +17,16 @@ else
endif
# Define module source file lists
-LUFA_SRC_USB = $(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/DevChapter9.c \
- $(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/Device.c \
+LUFA_SRC_USB = $(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/Device.c \
$(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/Host.c \
- $(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/HostChapter9.c \
- $(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/LowLevel.c \
$(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/Pipe.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/USBController.c \
$(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/USBInterrupt.c \
$(LUFA_ROOT_PATH)/Drivers/USB/HighLevel/ConfigDescriptor.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/HighLevel/DeviceStandardReq.c \
$(LUFA_ROOT_PATH)/Drivers/USB/HighLevel/Events.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/HighLevel/HostStandardReq.c \
$(LUFA_ROOT_PATH)/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/HIDParser.c
LUFA_SRC_USBCLASS = $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/Audio.c \