aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-02-19 22:59:27 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-02-19 22:59:27 +0000
commit1daa5e16f9a395fb2943906a715adb35b8106988 (patch)
tree016c5790c2b0e50753f9a4edda21ce54b40e914d /LUFA
parent3832182fe1de292998eef73e00511f73af0efa87 (diff)
downloadlufa-1daa5e16f9a395fb2943906a715adb35b8106988.tar.gz
lufa-1daa5e16f9a395fb2943906a715adb35b8106988.tar.bz2
lufa-1daa5e16f9a395fb2943906a715adb35b8106988.zip
Initial restructuring of the core USB driver module to support multiple architectures in the future.
Diffstat (limited to 'LUFA')
-rw-r--r--LUFA/Drivers/USB/Class/Audio.h2
-rw-r--r--LUFA/Drivers/USB/Class/CDC.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/Audio.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/CDC.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/HID.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/HIDParser.h7
-rw-r--r--LUFA/Drivers/USB/Class/Common/MIDI.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/MassStorage.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/Printer.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/RNDIS.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/StillImage.h2
-rw-r--r--LUFA/Drivers/USB/Class/Device/Audio.c3
-rw-r--r--LUFA/Drivers/USB/Class/Device/CDC.c3
-rw-r--r--LUFA/Drivers/USB/Class/Device/HID.c3
-rw-r--r--LUFA/Drivers/USB/Class/Device/MIDI.c3
-rw-r--r--LUFA/Drivers/USB/Class/Device/MassStorage.c3
-rw-r--r--LUFA/Drivers/USB/Class/Device/RNDIS.c3
-rw-r--r--LUFA/Drivers/USB/Class/HID.h2
-rw-r--r--LUFA/Drivers/USB/Class/Host/CDC.c3
-rw-r--r--LUFA/Drivers/USB/Class/Host/HID.c3
-rw-r--r--LUFA/Drivers/USB/Class/Host/MIDI.c3
-rw-r--r--LUFA/Drivers/USB/Class/Host/MassStorage.c3
-rw-r--r--LUFA/Drivers/USB/Class/Host/Printer.c3
-rw-r--r--LUFA/Drivers/USB/Class/Host/RNDIS.c3
-rw-r--r--LUFA/Drivers/USB/Class/Host/StillImage.c3
-rw-r--r--LUFA/Drivers/USB/Class/MIDI.h2
-rw-r--r--LUFA/Drivers/USB/Class/MassStorage.h2
-rw-r--r--LUFA/Drivers/USB/Class/Printer.h2
-rw-r--r--LUFA/Drivers/USB/Class/RNDIS.h2
-rw-r--r--LUFA/Drivers/USB/Class/StillImage.h2
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Device.c (renamed from LUFA/Drivers/USB/LowLevel/Device.c)2
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Device.h (renamed from LUFA/Drivers/USB/LowLevel/Device.h)74
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Endpoint.c (renamed from LUFA/Drivers/USB/LowLevel/Endpoint.c)2
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Endpoint.h (renamed from LUFA/Drivers/USB/LowLevel/Endpoint.h)85
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Host.c (renamed from LUFA/Drivers/USB/LowLevel/Host.c)2
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Host.h (renamed from LUFA/Drivers/USB/LowLevel/Host.h)22
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/OTG.h (renamed from LUFA/Drivers/USB/LowLevel/OTG.h)15
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Pipe.c (renamed from LUFA/Drivers/USB/LowLevel/Pipe.c)2
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Pipe.h (renamed from LUFA/Drivers/USB/LowLevel/Pipe.h)87
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/USBController.c (renamed from LUFA/Drivers/USB/LowLevel/USBController.c)0
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/USBController.h (renamed from LUFA/Drivers/USB/LowLevel/USBController.h)44
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/USBInterrupt.c (renamed from LUFA/Drivers/USB/LowLevel/USBInterrupt.c)0
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/USBInterrupt.h (renamed from LUFA/Drivers/USB/LowLevel/USBInterrupt.h)18
-rw-r--r--LUFA/Drivers/USB/Core/ConfigDescriptor.c (renamed from LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c)0
-rw-r--r--LUFA/Drivers/USB/Core/ConfigDescriptor.h (renamed from LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h)2
-rw-r--r--LUFA/Drivers/USB/Core/Device.h71
-rw-r--r--LUFA/Drivers/USB/Core/DeviceStandardReq.c (renamed from LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c)25
-rw-r--r--LUFA/Drivers/USB/Core/DeviceStandardReq.h (renamed from LUFA/Drivers/USB/HighLevel/DeviceStandardReq.h)10
-rw-r--r--LUFA/Drivers/USB/Core/Endpoint.h88
-rw-r--r--LUFA/Drivers/USB/Core/EndpointStream.c (renamed from LUFA/Drivers/USB/HighLevel/EndpointStream.c)0
-rw-r--r--LUFA/Drivers/USB/Core/EndpointStream.h (renamed from LUFA/Drivers/USB/HighLevel/EndpointStream.h)4
-rw-r--r--LUFA/Drivers/USB/Core/Events.c (renamed from LUFA/Drivers/USB/HighLevel/Events.c)0
-rw-r--r--LUFA/Drivers/USB/Core/Events.h (renamed from LUFA/Drivers/USB/HighLevel/Events.h)37
-rw-r--r--LUFA/Drivers/USB/Core/Host.h68
-rw-r--r--LUFA/Drivers/USB/Core/HostStandardReq.c (renamed from LUFA/Drivers/USB/HighLevel/HostStandardReq.c)0
-rw-r--r--LUFA/Drivers/USB/Core/HostStandardReq.h (renamed from LUFA/Drivers/USB/HighLevel/HostStandardReq.h)6
-rw-r--r--LUFA/Drivers/USB/Core/OTG.h69
-rw-r--r--LUFA/Drivers/USB/Core/Pipe.h97
-rw-r--r--LUFA/Drivers/USB/Core/PipeStream.c (renamed from LUFA/Drivers/USB/HighLevel/PipeStream.c)0
-rw-r--r--LUFA/Drivers/USB/Core/PipeStream.h (renamed from LUFA/Drivers/USB/HighLevel/PipeStream.h)4
-rw-r--r--LUFA/Drivers/USB/Core/StdDescriptors.h (renamed from LUFA/Drivers/USB/HighLevel/StdDescriptors.h)25
-rw-r--r--LUFA/Drivers/USB/Core/StdRequestType.h (renamed from LUFA/Drivers/USB/HighLevel/StdRequestType.h)2
-rw-r--r--LUFA/Drivers/USB/Core/Template/Template_Endpoint_Control_R.c (renamed from LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_R.c)0
-rw-r--r--LUFA/Drivers/USB/Core/Template/Template_Endpoint_Control_W.c (renamed from LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c)0
-rw-r--r--LUFA/Drivers/USB/Core/Template/Template_Endpoint_RW.c (renamed from LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c)0
-rw-r--r--LUFA/Drivers/USB/Core/Template/Template_Pipe_RW.c (renamed from LUFA/Drivers/USB/HighLevel/Template/Template_Pipe_RW.c)0
-rw-r--r--LUFA/Drivers/USB/Core/USBController.h67
-rw-r--r--LUFA/Drivers/USB/Core/USBInterrupt.h57
-rw-r--r--LUFA/Drivers/USB/Core/USBMode.h (renamed from LUFA/Drivers/USB/HighLevel/USBMode.h)0
-rw-r--r--LUFA/Drivers/USB/Core/USBTask.c (renamed from LUFA/Drivers/USB/HighLevel/USBTask.c)0
-rw-r--r--LUFA/Drivers/USB/Core/USBTask.h (renamed from LUFA/Drivers/USB/HighLevel/USBTask.h)27
-rw-r--r--LUFA/Drivers/USB/USB.h73
-rw-r--r--LUFA/ManPages/DirectorySummaries.txt204
-rw-r--r--LUFA/makefile26
74 files changed, 969 insertions, 424 deletions
diff --git a/LUFA/Drivers/USB/Class/Audio.h b/LUFA/Drivers/USB/Class/Audio.h
index 9a13eb128..e2f88d16a 100644
--- a/LUFA/Drivers/USB/Class/Audio.h
+++ b/LUFA/Drivers/USB/Class/Audio.h
@@ -63,7 +63,7 @@
#define __INCLUDE_FROM_AUDIO_DRIVER
/* Includes: */
- #include "../HighLevel/USBMode.h"
+ #include "../Core/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
#include "Device/Audio.h"
diff --git a/LUFA/Drivers/USB/Class/CDC.h b/LUFA/Drivers/USB/Class/CDC.h
index a5dc37370..935291cd2 100644
--- a/LUFA/Drivers/USB/Class/CDC.h
+++ b/LUFA/Drivers/USB/Class/CDC.h
@@ -64,7 +64,7 @@
#define __INCLUDE_FROM_CDC_DRIVER
/* Includes: */
- #include "../HighLevel/USBMode.h"
+ #include "../Core/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
#include "Device/CDC.h"
diff --git a/LUFA/Drivers/USB/Class/Common/Audio.h b/LUFA/Drivers/USB/Class/Common/Audio.h
index 8ddb52da0..be899bb2f 100644
--- a/LUFA/Drivers/USB/Class/Common/Audio.h
+++ b/LUFA/Drivers/USB/Class/Common/Audio.h
@@ -51,7 +51,7 @@
#define _AUDIO_CLASS_COMMON_H_
/* Includes: */
- #include "../../HighLevel/StdDescriptors.h"
+ #include "../../Core/StdDescriptors.h"
#include <string.h>
diff --git a/LUFA/Drivers/USB/Class/Common/CDC.h b/LUFA/Drivers/USB/Class/Common/CDC.h
index c63c0b537..5a4c2c21c 100644
--- a/LUFA/Drivers/USB/Class/Common/CDC.h
+++ b/LUFA/Drivers/USB/Class/Common/CDC.h
@@ -51,7 +51,7 @@
#define _CDC_CLASS_COMMON_H_
/* Includes: */
- #include "../../HighLevel/StdDescriptors.h"
+ #include "../../Core/StdDescriptors.h"
#include <string.h>
diff --git a/LUFA/Drivers/USB/Class/Common/HID.h b/LUFA/Drivers/USB/Class/Common/HID.h
index fd35905e6..7b0c34d9f 100644
--- a/LUFA/Drivers/USB/Class/Common/HID.h
+++ b/LUFA/Drivers/USB/Class/Common/HID.h
@@ -51,7 +51,7 @@
#define _HID_CLASS_COMMON_H_
/* Includes: */
- #include "../../HighLevel/StdDescriptors.h"
+ #include "../../Core/StdDescriptors.h"
#include "HIDParser.h"
#include <string.h>
diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.h b/LUFA/Drivers/USB/Class/Common/HIDParser.h
index cd32093ca..98544a05d 100644
--- a/LUFA/Drivers/USB/Class/Common/HIDParser.h
+++ b/LUFA/Drivers/USB/Class/Common/HIDParser.h
@@ -66,14 +66,13 @@
#define __HIDPARSER_H__
/* Includes: */
- #include <string.h>
- #include <stdbool.h>
+ #include "../../../../Common/Common.h"
#include "HIDReportData.h"
#include "../Common/HID.h"
- #include "../../../../Common/Common.h"
-
+ #include <string.h>
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
diff --git a/LUFA/Drivers/USB/Class/Common/MIDI.h b/LUFA/Drivers/USB/Class/Common/MIDI.h
index 8d56f1eba..c72ca5afe 100644
--- a/LUFA/Drivers/USB/Class/Common/MIDI.h
+++ b/LUFA/Drivers/USB/Class/Common/MIDI.h
@@ -54,7 +54,7 @@
#define __INCLUDE_FROM_AUDIO_DRIVER
/* Includes: */
- #include "../../HighLevel/StdDescriptors.h"
+ #include "../../Core/StdDescriptors.h"
#include "Audio.h"
#include <string.h>
diff --git a/LUFA/Drivers/USB/Class/Common/MassStorage.h b/LUFA/Drivers/USB/Class/Common/MassStorage.h
index f4274cab8..1acd68212 100644
--- a/LUFA/Drivers/USB/Class/Common/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/Common/MassStorage.h
@@ -51,7 +51,7 @@
#define _MS_CLASS_COMMON_H_
/* Includes: */
- #include "../../HighLevel/StdDescriptors.h"
+ #include "../../Core/StdDescriptors.h"
#include <string.h>
diff --git a/LUFA/Drivers/USB/Class/Common/Printer.h b/LUFA/Drivers/USB/Class/Common/Printer.h
index 23bc6a461..092cd8f03 100644
--- a/LUFA/Drivers/USB/Class/Common/Printer.h
+++ b/LUFA/Drivers/USB/Class/Common/Printer.h
@@ -51,7 +51,7 @@
#define _PRINTER_CLASS_COMMON_H_
/* Includes: */
- #include "../../HighLevel/StdDescriptors.h"
+ #include "../../Core/StdDescriptors.h"
#include <string.h>
diff --git a/LUFA/Drivers/USB/Class/Common/RNDIS.h b/LUFA/Drivers/USB/Class/Common/RNDIS.h
index 6b67b97d1..cb806ec56 100644
--- a/LUFA/Drivers/USB/Class/Common/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/Common/RNDIS.h
@@ -54,7 +54,7 @@
#define __INCLUDE_FROM_CDC_DRIVER
/* Includes: */
- #include "../../HighLevel/StdDescriptors.h"
+ #include "../../Core/StdDescriptors.h"
#include "CDC.h"
#include <string.h>
diff --git a/LUFA/Drivers/USB/Class/Common/StillImage.h b/LUFA/Drivers/USB/Class/Common/StillImage.h
index 06299bf77..7ef04d8cb 100644
--- a/LUFA/Drivers/USB/Class/Common/StillImage.h
+++ b/LUFA/Drivers/USB/Class/Common/StillImage.h
@@ -51,7 +51,7 @@
#define _SI_CLASS_COMMON_H_
/* Includes: */
- #include "../../HighLevel/StdDescriptors.h"
+ #include "../../Core/StdDescriptors.h"
#include <string.h>
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.c b/LUFA/Drivers/USB/Class/Device/Audio.c
index 3a0993aaa..986e73f9c 100644
--- a/LUFA/Drivers/USB/Class/Device/Audio.c
+++ b/LUFA/Drivers/USB/Class/Device/Audio.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_DEVICE)
#define __INCLUDE_FROM_AUDIO_DRIVER
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.c b/LUFA/Drivers/USB/Class/Device/CDC.c
index 838bd712d..a196f53dd 100644
--- a/LUFA/Drivers/USB/Class/Device/CDC.c
+++ b/LUFA/Drivers/USB/Class/Device/CDC.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_DEVICE)
#define __INCLUDE_FROM_CDC_DRIVER
diff --git a/LUFA/Drivers/USB/Class/Device/HID.c b/LUFA/Drivers/USB/Class/Device/HID.c
index 412673824..505b66ec4 100644
--- a/LUFA/Drivers/USB/Class/Device/HID.c
+++ b/LUFA/Drivers/USB/Class/Device/HID.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_DEVICE)
#define __INCLUDE_FROM_HID_DRIVER
diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.c b/LUFA/Drivers/USB/Class/Device/MIDI.c
index ecedea77c..5e4bd9c2d 100644
--- a/LUFA/Drivers/USB/Class/Device/MIDI.c
+++ b/LUFA/Drivers/USB/Class/Device/MIDI.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_DEVICE)
#define __INCLUDE_FROM_MIDI_DRIVER
diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.c b/LUFA/Drivers/USB/Class/Device/MassStorage.c
index 4d7cff6bf..289d4c0fa 100644
--- a/LUFA/Drivers/USB/Class/Device/MassStorage.c
+++ b/LUFA/Drivers/USB/Class/Device/MassStorage.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_DEVICE)
#define __INCLUDE_FROM_MS_DRIVER
diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.c b/LUFA/Drivers/USB/Class/Device/RNDIS.c
index 490ad5127..3ade4af70 100644
--- a/LUFA/Drivers/USB/Class/Device/RNDIS.c
+++ b/LUFA/Drivers/USB/Class/Device/RNDIS.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_DEVICE)
#define __INCLUDE_FROM_RNDIS_DRIVER
diff --git a/LUFA/Drivers/USB/Class/HID.h b/LUFA/Drivers/USB/Class/HID.h
index 4eafa752a..f72d47b8e 100644
--- a/LUFA/Drivers/USB/Class/HID.h
+++ b/LUFA/Drivers/USB/Class/HID.h
@@ -65,7 +65,7 @@
#define __INCLUDE_FROM_HID_DRIVER
/* Includes: */
- #include "../HighLevel/USBMode.h"
+ #include "../Core/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
#include "Device/HID.h"
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.c b/LUFA/Drivers/USB/Class/Host/CDC.c
index 73e634b99..d99e42e75 100644
--- a/LUFA/Drivers/USB/Class/Host/CDC.c
+++ b/LUFA/Drivers/USB/Class/Host/CDC.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_HOST)
#define __INCLUDE_FROM_CDC_DRIVER
diff --git a/LUFA/Drivers/USB/Class/Host/HID.c b/LUFA/Drivers/USB/Class/Host/HID.c
index 459d53c69..446048413 100644
--- a/LUFA/Drivers/USB/Class/Host/HID.c
+++ b/LUFA/Drivers/USB/Class/Host/HID.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_HOST)
#define __INCLUDE_FROM_HID_DRIVER
diff --git a/LUFA/Drivers/USB/Class/Host/MIDI.c b/LUFA/Drivers/USB/Class/Host/MIDI.c
index 2b19bccca..d376a3017 100644
--- a/LUFA/Drivers/USB/Class/Host/MIDI.c
+++ b/LUFA/Drivers/USB/Class/Host/MIDI.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_HOST)
#define __INCLUDE_FROM_MIDI_DRIVER
diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.c b/LUFA/Drivers/USB/Class/Host/MassStorage.c
index e632827be..537ce51ea 100644
--- a/LUFA/Drivers/USB/Class/Host/MassStorage.c
+++ b/LUFA/Drivers/USB/Class/Host/MassStorage.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_HOST)
#define __INCLUDE_FROM_MS_DRIVER
diff --git a/LUFA/Drivers/USB/Class/Host/Printer.c b/LUFA/Drivers/USB/Class/Host/Printer.c
index a086a53df..bd960e252 100644
--- a/LUFA/Drivers/USB/Class/Host/Printer.c
+++ b/LUFA/Drivers/USB/Class/Host/Printer.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_HOST)
#define __INCLUDE_FROM_PRINTER_DRIVER
diff --git a/LUFA/Drivers/USB/Class/Host/RNDIS.c b/LUFA/Drivers/USB/Class/Host/RNDIS.c
index 23bd79bf5..23497574c 100644
--- a/LUFA/Drivers/USB/Class/Host/RNDIS.c
+++ b/LUFA/Drivers/USB/Class/Host/RNDIS.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_HOST)
#define __INCLUDE_FROM_RNDIS_DRIVER
diff --git a/LUFA/Drivers/USB/Class/Host/StillImage.c b/LUFA/Drivers/USB/Class/Host/StillImage.c
index 3bfd36ca7..1fbe000ba 100644
--- a/LUFA/Drivers/USB/Class/Host/StillImage.c
+++ b/LUFA/Drivers/USB/Class/Host/StillImage.c
@@ -29,7 +29,8 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_HOST)
#define __INCLUDE_FROM_SI_DRIVER
diff --git a/LUFA/Drivers/USB/Class/MIDI.h b/LUFA/Drivers/USB/Class/MIDI.h
index 431df22f0..3f7970b6d 100644
--- a/LUFA/Drivers/USB/Class/MIDI.h
+++ b/LUFA/Drivers/USB/Class/MIDI.h
@@ -67,7 +67,7 @@
#define __INCLUDE_FROM_MIDI_DRIVER
/* Includes: */
- #include "../HighLevel/USBMode.h"
+ #include "../Core/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
#include "Device/MIDI.h"
diff --git a/LUFA/Drivers/USB/Class/MassStorage.h b/LUFA/Drivers/USB/Class/MassStorage.h
index 8267c1696..49af9dd24 100644
--- a/LUFA/Drivers/USB/Class/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/MassStorage.h
@@ -64,7 +64,7 @@
#define __INCLUDE_FROM_MS_DRIVER
/* Includes: */
- #include "../HighLevel/USBMode.h"
+ #include "../Core/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
#include "Device/MassStorage.h"
diff --git a/LUFA/Drivers/USB/Class/Printer.h b/LUFA/Drivers/USB/Class/Printer.h
index e624128b4..067ce756c 100644
--- a/LUFA/Drivers/USB/Class/Printer.h
+++ b/LUFA/Drivers/USB/Class/Printer.h
@@ -65,7 +65,7 @@
#define __INCLUDE_FROM_PRINTER_DRIVER
/* Includes: */
- #include "../HighLevel/USBMode.h"
+ #include "../Core/USBMode.h"
#if defined(USB_CAN_BE_HOST)
#include "Host/Printer.h"
diff --git a/LUFA/Drivers/USB/Class/RNDIS.h b/LUFA/Drivers/USB/Class/RNDIS.h
index 5725bea62..37a584088 100644
--- a/LUFA/Drivers/USB/Class/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/RNDIS.h
@@ -64,7 +64,7 @@
#define __INCLUDE_FROM_RNDIS_DRIVER
/* Includes: */
- #include "../HighLevel/USBMode.h"
+ #include "../Core/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
#include "Device/RNDIS.h"
diff --git a/LUFA/Drivers/USB/Class/StillImage.h b/LUFA/Drivers/USB/Class/StillImage.h
index dadb98de5..a421b1555 100644
--- a/LUFA/Drivers/USB/Class/StillImage.h
+++ b/LUFA/Drivers/USB/Class/StillImage.h
@@ -63,7 +63,7 @@
#define __INCLUDE_FROM_SI_DRIVER
/* Includes: */
- #include "../HighLevel/USBMode.h"
+ #include "../Core/USBMode.h"
#if defined(USB_CAN_BE_HOST)
#include "Host/StillImage.h"
diff --git a/LUFA/Drivers/USB/LowLevel/Device.c b/LUFA/Drivers/USB/Core/AVR8/Device.c
index 099c1c168..c1b37f453 100644
--- a/LUFA/Drivers/USB/LowLevel/Device.c
+++ b/LUFA/Drivers/USB/Core/AVR8/Device.c
@@ -29,7 +29,7 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../HighLevel/USBMode.h"
+#include "../USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/Core/AVR8/Device.h
index ae3df4111..30088f1d9 100644
--- a/LUFA/Drivers/USB/LowLevel/Device.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Device.h
@@ -29,7 +29,7 @@
*/
/** \file
- * \brief USB device mode definitions.
+ * \brief USB device mode definitions (AVR8)
*
* This file contains structures, function prototypes and macros related to USB device mode.
*
@@ -37,8 +37,8 @@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-/** \ingroup Group_USB
- * \defgroup Group_Device Device Management
+/** \ingroup Group_Device
+ * \defgroup Group_Device_AVR8 Device Management (AVR8)
*
* USB Device mode related macros and enums. This module contains macros and enums which are used when
* the USB controller is initialized in device mode.
@@ -46,18 +46,16 @@
* @{
*/
-#ifndef __USBDEVICE_H__
-#define __USBDEVICE_H__
+#ifndef __USBDEVICE_AVR8_H__
+#define __USBDEVICE_AVR8_H__
/* Includes: */
- #include <avr/io.h>
- #include <avr/pgmspace.h>
- #include <avr/eeprom.h>
-
- #include "../../../Common/Common.h"
- #include "../HighLevel/StdDescriptors.h"
- #include "USBInterrupt.h"
- #include "Endpoint.h"
+ #include "../../../../Common/Common.h"
+ #include "../StdDescriptors.h"
+ #include "../USBInterrupt.h"
+ #include "../Endpoint.h"
+
+ #include <avr/boot.h>
/* Preprocessor Checks: */
#if (defined(USE_RAM_DESCRIPTORS) && defined(USE_EEPROM_DESCRIPTORS))
@@ -91,6 +89,24 @@
#define USB_DEVICE_OPT_FULLSPEED (0 << 0)
//@}
+ #if (!defined(NO_INTERNAL_SERIAL) && \
+ (defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1287__) || \
+ defined(__AVR_ATmega32U6__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) || \
+ defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega8U2__)))
+ /** 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
+ * number allocations) to a device regardless of the port it is plugged in to on the host. Some USB AVRs contain
+ * a unique serial number internally, and setting the device descriptors serial number string index to this value
+ * will cause it to use the internal serial number.
+ *
+ * On unsupported devices, this will evaluate to NO_DESCRIPTOR and so will force the host to create a pseudo-serial
+ * number for the device.
+ */
+ #define USE_INTERNAL_SERIAL 0xDC
+ #else
+ #define USE_INTERNAL_SERIAL NO_DESCRIPTOR
+ #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.
@@ -239,6 +255,38 @@
{
return (UDADDR & (1 << ADDEN));
}
+
+ static inline uint8_t USB_Device_GetSerialString(wchar_t* UnicodeString, const uint8_t MaxLen)
+ {
+ uint8_t SerialCharNum = 0;
+
+ ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
+ {
+ uint8_t SigReadAddress = 0x0E;
+
+ for (SerialCharNum = 0; SerialCharNum < MIN(MaxLen, 20); SerialCharNum++)
+ {
+ if (SerialCharNum == MaxLen)
+ break;
+
+ uint8_t SerialByte = boot_signature_byte_get(SigReadAddress);
+
+ if (SerialCharNum & 0x01)
+ {
+ SerialByte >>= 4;
+ SigReadAddress++;
+ }
+
+ SerialByte &= 0x0F;
+
+ UnicodeString[SerialCharNum] = (SerialByte >= 10) ?
+ (('A' - 10) + SerialByte) : ('0' + SerialByte);
+ }
+ }
+
+ return SerialCharNum;
+ }
+
#endif
#endif
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.c b/LUFA/Drivers/USB/Core/AVR8/Endpoint.c
index 33f5ec924..c4e32c028 100644
--- a/LUFA/Drivers/USB/LowLevel/Endpoint.c
+++ b/LUFA/Drivers/USB/Core/AVR8/Endpoint.c
@@ -29,7 +29,7 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../HighLevel/USBMode.h"
+#include "../USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/Core/AVR8/Endpoint.h
index 455577c5a..1feadd3c8 100644
--- a/LUFA/Drivers/USB/LowLevel/Endpoint.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Endpoint.h
@@ -38,27 +38,27 @@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-/** \ingroup Group_EndpointManagement
- * \defgroup Group_EndpointRW Endpoint Data Reading and Writing
+/** \ingroup Group_EndpointRW
+ * \defgroup Group_EndpointRW_AVR8 Endpoint Data Reading and Writing (AVR8)
*
* Functions, macros, variables, enums and types related to data reading and writing from and to endpoints.
*/
-/** \ingroup Group_EndpointRW
- * \defgroup Group_EndpointPrimitiveRW Read/Write of Primitive Data Types
+/** \ingroup Group_EndpointPrimitiveRW
+ * \defgroup Group_EndpointPrimitiveRW_AVR8 Read/Write of Primitive Data Types (AVR8)
*
* Functions, macros, variables, enums and types related to data reading and writing of primitive data types
* from and to endpoints.
*/
-/** \ingroup Group_EndpointManagement
- * \defgroup Group_EndpointPacketManagement Endpoint Packet Management
+/** \ingroup Group_EndpointPacketManagement
+ * \defgroup Group_EndpointPacketManagement_AVR8 Endpoint Packet Management (AVR8)
*
* Functions, macros, variables, enums and types related to packet management of endpoints.
*/
-/** \ingroup Group_USB
- * \defgroup Group_EndpointManagement Endpoint Management
+/** \ingroup Group_EndpointManagement
+ * \defgroup Group_EndpointManagement_AVR8 Endpoint Management (AVR8)
*
* Functions, macros and enums related to endpoint management when in USB Device mode. This
* module contains the endpoint management macros, as well as endpoint interrupt and data
@@ -67,16 +67,13 @@
* @{
*/
-#ifndef __ENDPOINT_H__
-#define __ENDPOINT_H__
+#ifndef __ENDPOINT_AVR8_H__
+#define __ENDPOINT_AVR8_H__
/* Includes: */
- #include <avr/io.h>
- #include <stdbool.h>
-
- #include "../../../Common/Common.h"
- #include "../HighLevel/USBTask.h"
- #include "USBInterrupt.h"
+ #include "../../../../Common/Common.h"
+ #include "../USBTask.h"
+ #include "../USBInterrupt.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@ -234,7 +231,7 @@
/* Enums: */
/** Enum for the possible error return codes of the \ref Endpoint_WaitUntilReady() function.
*
- * \ingroup Group_EndpointRW
+ * \ingroup Group_EndpointRW_AVR8
*/
enum Endpoint_WaitUntilReady_ErrorCodes_t
{
@@ -316,7 +313,7 @@
* \note The return width of this function may differ, depending on the maximum endpoint bank size
* of the selected AVR model.
*
- * \ingroup Group_EndpointRW
+ * \ingroup Group_EndpointRW_AVR8
*
* \return Total number of bytes in the currently selected Endpoint's FIFO buffer.
*/
@@ -412,7 +409,7 @@
* will terminate all queued transactions, resetting the endpoint banks ready for a new
* packet.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*/
static inline void Endpoint_AbortPendingIN(void)
{
@@ -427,7 +424,7 @@
* transmission via the \ref Endpoint_ClearIN() command, or are awaiting acknowledgement via the
* \ref Endpoint_ClearOUT() command.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*
* \return Total number of busy banks in the selected endpoint.
*/
@@ -442,7 +439,7 @@
* is an OUT direction and no packet (or an empty packet) has been received, or if the endpoint is an IN
* direction and the endpoint bank is full.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*
* \return Boolean \c true if the currently selected endpoint may be read from or written to, depending
* on its direction.
@@ -490,7 +487,7 @@
/** Determines if the selected IN endpoint is ready for a new packet to be sent to the host.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*
* \return Boolean \c true if the current endpoint is ready for an IN packet, \c false otherwise.
*/
@@ -502,7 +499,7 @@
/** Determines if the selected OUT endpoint has received new packet from the host.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*
* \return Boolean \c true if current endpoint is has received an OUT packet, \c false otherwise.
*/
@@ -514,7 +511,7 @@
/** Determines if the current CONTROL type endpoint has received a SETUP packet.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*
* \return Boolean \c true if the selected endpoint has received a SETUP packet, \c false otherwise.
*/
@@ -527,7 +524,7 @@
/** Clears a received SETUP packet on the currently selected CONTROL type endpoint, freeing up the
* endpoint for the next packet.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*
* \note This is not applicable for non CONTROL type endpoints.
*/
@@ -540,7 +537,7 @@
/** Sends an IN packet to the host on the currently selected endpoint, freeing up the endpoint for the
* next packet and switching to the alternative endpoint bank if double banked.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*/
static inline void Endpoint_ClearIN(void) ATTR_ALWAYS_INLINE;
static inline void Endpoint_ClearIN(void)
@@ -555,7 +552,7 @@
/** Acknowledges an OUT packet to the host on the currently selected endpoint, freeing up the endpoint
* for the next packet and switching to the alternative endpoint bank if double banked.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*/
static inline void Endpoint_ClearOUT(void) ATTR_ALWAYS_INLINE;
static inline void Endpoint_ClearOUT(void)
@@ -576,7 +573,7 @@
* is called, or the host issues a CLEAR FEATURE request to the device for the currently selected
* endpoint.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*/
static inline void Endpoint_StallTransaction(void) ATTR_ALWAYS_INLINE;
static inline void Endpoint_StallTransaction(void)
@@ -586,7 +583,7 @@
/** Clears the STALL condition on the currently selected endpoint.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*/
static inline void Endpoint_ClearStall(void) ATTR_ALWAYS_INLINE;
static inline void Endpoint_ClearStall(void)
@@ -596,7 +593,7 @@
/** Determines if the currently selected endpoint is stalled, false otherwise.
*
- * \ingroup Group_EndpointPacketManagement
+ * \ingroup Group_EndpointPacketManagement_AVR8
*
* \return Boolean \c true if the currently selected endpoint is stalled, \c false otherwise.
*/
@@ -635,7 +632,7 @@
/** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*
* \return Next byte in the currently selected endpoint's FIFO buffer.
*/
@@ -647,7 +644,7 @@
/** Writes one byte from the currently selected endpoint's bank, for IN direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*
* \param[in] Byte Next byte to write into the the currently selected endpoint's FIFO buffer.
*/
@@ -659,7 +656,7 @@
/** Discards one byte from the currently selected endpoint's bank, for OUT direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*/
static inline void Endpoint_Discard_Byte(void) ATTR_ALWAYS_INLINE;
static inline void Endpoint_Discard_Byte(void)
@@ -672,7 +669,7 @@
/** Reads two bytes from the currently selected endpoint's bank in little endian format, for OUT
* direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*
* \return Next word in the currently selected endpoint's FIFO buffer.
*/
@@ -694,7 +691,7 @@
/** Reads two bytes from the currently selected endpoint's bank in big endian format, for OUT
* direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*
* \return Next word in the currently selected endpoint's FIFO buffer.
*/
@@ -716,7 +713,7 @@
/** Writes two bytes to the currently selected endpoint's bank in little endian format, for IN
* direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*
* \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer.
*/
@@ -730,7 +727,7 @@
/** Writes two bytes to the currently selected endpoint's bank in big endian format, for IN
* direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*
* \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer.
*/
@@ -743,7 +740,7 @@
/** Discards two bytes from the currently selected endpoint's bank, for OUT direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*/
static inline void Endpoint_Discard_Word(void) ATTR_ALWAYS_INLINE;
static inline void Endpoint_Discard_Word(void)
@@ -757,7 +754,7 @@
/** Reads four bytes from the currently selected endpoint's bank in little endian format, for OUT
* direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*
* \return Next double word in the currently selected endpoint's FIFO buffer.
*/
@@ -781,7 +778,7 @@
/** Reads four bytes from the currently selected endpoint's bank in big endian format, for OUT
* direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*
* \return Next double word in the currently selected endpoint's FIFO buffer.
*/
@@ -805,7 +802,7 @@
/** Writes four bytes to the currently selected endpoint's bank in little endian format, for IN
* direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*
* \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer.
*/
@@ -821,7 +818,7 @@
/** Writes four bytes to the currently selected endpoint's bank in big endian format, for IN
* direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*
* \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer.
*/
@@ -836,7 +833,7 @@
/** Discards four bytes from the currently selected endpoint's bank, for OUT direction endpoints.
*
- * \ingroup Group_EndpointPrimitiveRW
+ * \ingroup Group_EndpointPrimitiveRW_AVR8
*/
static inline void Endpoint_Discard_DWord(void) ATTR_ALWAYS_INLINE;
static inline void Endpoint_Discard_DWord(void)
@@ -883,7 +880,7 @@
*
* \note This routine should not be called on CONTROL type endpoints.
*
- * \ingroup Group_EndpointRW
+ * \ingroup Group_EndpointRW_AVR8
*
* \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum.
*/
diff --git a/LUFA/Drivers/USB/LowLevel/Host.c b/LUFA/Drivers/USB/Core/AVR8/Host.c
index e5dd4b0e8..214d19398 100644
--- a/LUFA/Drivers/USB/LowLevel/Host.c
+++ b/LUFA/Drivers/USB/Core/AVR8/Host.c
@@ -29,7 +29,7 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../HighLevel/USBMode.h"
+#include "../USBMode.h"
#if defined(USB_CAN_BE_HOST)
diff --git a/LUFA/Drivers/USB/LowLevel/Host.h b/LUFA/Drivers/USB/Core/AVR8/Host.h
index 651daf28b..def17ee70 100644
--- a/LUFA/Drivers/USB/LowLevel/Host.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Host.h
@@ -29,7 +29,7 @@
*/
/** \file
- * \brief USB host mode definitions.
+ * \brief USB host mode definitions (AVR8)
*
* This file contains structures, function prototypes and macros related to USB host mode.
*
@@ -37,8 +37,8 @@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-/** \ingroup Group_USB
- * \defgroup Group_Host Host Management
+/** \ingroup Group_Host
+ * \defgroup Group_Host_AVR8 Host Management (AVR8)
*
* USB Host mode related macros and enums. This module contains macros and enums which are used when
* the USB controller is initialized in host mode.
@@ -46,18 +46,14 @@
* @{
*/
-#ifndef __USBHOST_H__
-#define __USBHOST_H__
+#ifndef __USBHOST_AVR8_H__
+#define __USBHOST_AVR8_H__
/* Includes: */
- #include <avr/io.h>
- #include <stdbool.h>
- #include <util/delay.h>
-
- #include "../../../Common/Common.h"
- #include "../HighLevel/StdDescriptors.h"
- #include "Pipe.h"
- #include "USBInterrupt.h"
+ #include "../../../../Common/Common.h"
+ #include "../StdDescriptors.h"
+ #include "../Pipe.h"
+ #include "../USBInterrupt.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/LowLevel/OTG.h b/LUFA/Drivers/USB/Core/AVR8/OTG.h
index 2cb751dad..cc0cc3da1 100644
--- a/LUFA/Drivers/USB/LowLevel/OTG.h
+++ b/LUFA/Drivers/USB/Core/AVR8/OTG.h
@@ -29,7 +29,7 @@
*/
/** \file
- * \brief USB OTG mode definitions.
+ * \brief USB OTG mode definitions (AVR8)
*
* This file contains structures, function prototypes and macros related to USB OTG mode, where two USB devices
* may be linked directly together and exchange host/device roles as needed.
@@ -38,8 +38,8 @@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-/** \ingroup Group_USB
- * \defgroup Group_OTG USB On The Go (OTG) Management
+/** \ingroup Group_OTG
+ * \defgroup Group_OTG_AVR8 USB On The Go (OTG) Management (AVR8)
*
* This module contains macros for embedded USB hosts with dual role On The Go capabilities, for managing role
* exchange. OTG is a way for two USB dual role devices to talk to one another directly without fixed device/host
@@ -48,14 +48,11 @@
* @{
*/
-#ifndef __USBOTG_H__
-#define __USBOTG_H__
+#ifndef __USBOTG_AVR8_H__
+#define __USBOTG_AVR8_H__
/* Includes: */
- #include <avr/io.h>
- #include <stdbool.h>
-
- #include "../../../Common/Common.h"
+ #include "../../../../Common/Common.h"
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_USB_DRIVER)
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.c b/LUFA/Drivers/USB/Core/AVR8/Pipe.c
index 82a9c1a49..11751321c 100644
--- a/LUFA/Drivers/USB/LowLevel/Pipe.c
+++ b/LUFA/Drivers/USB/Core/AVR8/Pipe.c
@@ -29,7 +29,7 @@
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../HighLevel/USBMode.h"
+#include "../USBMode.h"
#if defined(USB_CAN_BE_HOST)
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/Core/AVR8/Pipe.h
index 34a64a7c5..3f62ec5d1 100644
--- a/LUFA/Drivers/USB/LowLevel/Pipe.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Pipe.h
@@ -38,27 +38,27 @@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-/** \ingroup Group_PipeManagement
- * \defgroup Group_PipeRW Pipe Data Reading and Writing
+/** \ingroup Group_PipeRW
+ * \defgroup Group_PipeRW_AVR8 Pipe Data Reading and Writing (AVR8)
*
* Functions, macros, variables, enums and types related to data reading and writing from and to pipes.
*/
-/** \ingroup Group_PipeRW
- * \defgroup Group_PipePrimitiveRW Read/Write of Primitive Data Types
+/** \ingroup Group_PipePrimitiveRW
+ * \defgroup Group_PipePrimitiveRW_AVR8 Read/Write of Primitive Data Types (AVR8)
*
* Functions, macros, variables, enums and types related to data reading and writing of primitive data types
* from and to pipes.
*/
-/** \ingroup Group_PipeManagement
- * \defgroup Group_PipePacketManagement Pipe Packet Management
+/** \ingroup Group_PipePacketManagement
+ * \defgroup Group_PipePacketManagement_AVR8 Pipe Packet Management (AVR8)
*
* Functions, macros, variables, enums and types related to packet management of pipes.
*/
-/** \ingroup Group_PipeManagement
- * \defgroup Group_PipeControlReq Pipe Control Request Management
+/** \ingroup Group_PipeControlReq
+ * \defgroup Group_PipeControlReq_AVR8 Pipe Control Request Management (AVR8)
*
* Module for host mode request processing. This module allows for the transmission of standard, class and
* vendor control requests to the default control endpoint of an attached device while in host mode.
@@ -66,8 +66,8 @@
* \see Chapter 9 of the USB 2.0 specification.
*/
-/** \ingroup Group_USB
- * \defgroup Group_PipeManagement Pipe Management
+/** \ingroup Group_PipeManagement
+ * \defgroup Group_PipeManagement_AVR8 Pipe Management (AVR8)
*
* This module contains functions, macros and enums related to pipe management when in USB Host mode. This
* module contains the pipe management macros, as well as pipe interrupt and data send/receive functions
@@ -76,15 +76,12 @@
* @{
*/
-#ifndef __PIPE_H__
-#define __PIPE_H__
+#ifndef __PIPE_AVR8_H__
+#define __PIPE_AVR8_H__
/* Includes: */
- #include <avr/io.h>
- #include <stdbool.h>
-
- #include "../../../Common/Common.h"
- #include "../HighLevel/USBTask.h"
+ #include "../../../../Common/Common.h"
+ #include "../USBTask.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@ -197,7 +194,7 @@
/* Enums: */
/** Enum for the possible error return codes of the \ref Pipe_WaitUntilReady() function.
*
- * \ingroup Group_PipeRW
+ * \ingroup Group_PipeRW_AVR8
*/
enum Pipe_WaitUntilReady_ErrorCodes_t
{
@@ -216,7 +213,7 @@
* \note The return width of this function may differ, depending on the maximum pipe bank size
* of the selected AVR model.
*
- * \ingroup Group_PipeRW
+ * \ingroup Group_PipeRW_AVR8
*
* \return Total number of bytes in the currently selected pipe's FIFO buffer.
*/
@@ -457,7 +454,7 @@
* transmission via the \ref Pipe_ClearOUT() command, or are awaiting acknowledgement via the
* \ref Pipe_ClearIN() command.
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*
* \return Total number of busy banks in the selected pipe.
*/
@@ -474,7 +471,7 @@
*
* \note This function is not valid on CONTROL type pipes.
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*
* \return Boolean \c true if the currently selected pipe may be read from or written to, depending
* on its direction.
@@ -487,7 +484,7 @@
/** Determines if a packet has been received on the currently selected IN pipe from the attached device.
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*
* \return Boolean \c true if the current pipe has received an IN packet, \c false otherwise.
*/
@@ -499,7 +496,7 @@
/** Determines if the currently selected OUT pipe is ready to send an OUT packet to the attached device.
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*
* \return Boolean \c true if the current pipe is ready for an OUT packet, \c false otherwise.
*/
@@ -512,7 +509,7 @@
/** Determines if no SETUP request is currently being sent to the attached device on the selected
* CONTROL type pipe.
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*
* \return Boolean \c true if the current pipe is ready for a SETUP packet, \c false otherwise.
*/
@@ -524,7 +521,7 @@
/** Sends the currently selected CONTROL type pipe's contents to the device as a SETUP packet.
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*/
static inline void Pipe_ClearSETUP(void) ATTR_ALWAYS_INLINE;
static inline void Pipe_ClearSETUP(void)
@@ -535,7 +532,7 @@
/** Acknowledges the reception of a setup IN request from the attached device on the currently selected
* pipe, freeing the bank ready for the next packet.
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*/
static inline void Pipe_ClearIN(void) ATTR_ALWAYS_INLINE;
static inline void Pipe_ClearIN(void)
@@ -546,7 +543,7 @@
/** Sends the currently selected pipe's contents to the device as an OUT packet on the selected pipe, freeing
* the bank ready for the next packet.
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*/
static inline void Pipe_ClearOUT(void) ATTR_ALWAYS_INLINE;
static inline void Pipe_ClearOUT(void)
@@ -560,7 +557,7 @@
* received, it must be cleared using \ref Pipe_ClearNAKReceived() before the previous (or any other) packet
* can be re-sent.
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*
* \return Boolean \c true if an NAK has been received on the current pipe, \c false otherwise.
*/
@@ -572,7 +569,7 @@
/** Clears the NAK condition on the currently selected pipe.
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*
* \see \ref Pipe_IsNAKReceived() for more details.
*/
@@ -584,7 +581,7 @@
/** Determines if the currently selected pipe has had the STALL condition set by the attached device.
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*
* \return Boolean \c true if the current pipe has been stalled by the attached device, \c false otherwise.
*/
@@ -597,7 +594,7 @@
/** Clears the STALL condition detection flag on the currently selected pipe, but does not clear the
* STALL condition itself (this must be done via a ClearFeature control request to the device).
*
- * \ingroup Group_PipePacketManagement
+ * \ingroup Group_PipePacketManagement_AVR8
*/
static inline void Pipe_ClearStall(void) ATTR_ALWAYS_INLINE;
static inline void Pipe_ClearStall(void)
@@ -607,7 +604,7 @@
/** Reads one byte from the currently selected pipe's bank, for OUT direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*
* \return Next byte in the currently selected pipe's FIFO buffer.
*/
@@ -619,7 +616,7 @@
/** Writes one byte from the currently selected pipe's bank, for IN direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*
* \param[in] Byte Next byte to write into the the currently selected pipe's FIFO buffer.
*/
@@ -631,7 +628,7 @@
/** Discards one byte from the currently selected pipe's bank, for OUT direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*/
static inline void Pipe_Discard_Byte(void) ATTR_ALWAYS_INLINE;
static inline void Pipe_Discard_Byte(void)
@@ -644,7 +641,7 @@
/** Reads two bytes from the currently selected pipe's bank in little endian format, for OUT
* direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*
* \return Next word in the currently selected pipe's FIFO buffer.
*/
@@ -666,7 +663,7 @@
/** Reads two bytes from the currently selected pipe's bank in big endian format, for OUT
* direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*
* \return Next word in the currently selected pipe's FIFO buffer.
*/
@@ -688,7 +685,7 @@
/** Writes two bytes to the currently selected pipe's bank in little endian format, for IN
* direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*
* \param[in] Word Next word to write to the currently selected pipe's FIFO buffer.
*/
@@ -702,7 +699,7 @@
/** Writes two bytes to the currently selected pipe's bank in big endian format, for IN
* direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*
* \param[in] Word Next word to write to the currently selected pipe's FIFO buffer.
*/
@@ -715,7 +712,7 @@
/** Discards two bytes from the currently selected pipe's bank, for OUT direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*/
static inline void Pipe_Discard_Word(void) ATTR_ALWAYS_INLINE;
static inline void Pipe_Discard_Word(void)
@@ -729,7 +726,7 @@
/** Reads four bytes from the currently selected pipe's bank in little endian format, for OUT
* direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*
* \return Next double word in the currently selected pipe's FIFO buffer.
*/
@@ -753,7 +750,7 @@
/** Reads four bytes from the currently selected pipe's bank in big endian format, for OUT
* direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*
* \return Next double word in the currently selected pipe's FIFO buffer.
*/
@@ -777,7 +774,7 @@
/** Writes four bytes to the currently selected pipe's bank in little endian format, for IN
* direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*
* \param[in] DWord Next double word to write to the currently selected pipe's FIFO buffer.
*/
@@ -793,7 +790,7 @@
/** Writes four bytes to the currently selected pipe's bank in big endian format, for IN
* direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*
* \param[in] DWord Next double word to write to the currently selected pipe's FIFO buffer.
*/
@@ -808,7 +805,7 @@
/** Discards four bytes from the currently selected pipe's bank, for OUT direction pipes.
*
- * \ingroup Group_PipePrimitiveRW
+ * \ingroup Group_PipePrimitiveRW_AVR8
*/
static inline void Pipe_Discard_DWord(void) ATTR_ALWAYS_INLINE;
static inline void Pipe_Discard_DWord(void)
@@ -889,7 +886,7 @@
/** Spin-loops until the currently selected non-control pipe is ready for the next packed of data to be read
* or written to it, aborting in the case of an error condition (such as a timeout or device disconnect).
*
- * \ingroup Group_PipeRW
+ * \ingroup Group_PipeRW_AVR8
*
* \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum.
*/
diff --git a/LUFA/Drivers/USB/LowLevel/USBController.c b/LUFA/Drivers/USB/Core/AVR8/USBController.c
index f41b5cc11..f41b5cc11 100644
--- a/LUFA/Drivers/USB/LowLevel/USBController.c
+++ b/LUFA/Drivers/USB/Core/AVR8/USBController.c
diff --git a/LUFA/Drivers/USB/LowLevel/USBController.h b/LUFA/Drivers/USB/Core/AVR8/USBController.h
index b85539d3e..292b39369 100644
--- a/LUFA/Drivers/USB/LowLevel/USBController.h
+++ b/LUFA/Drivers/USB/Core/AVR8/USBController.h
@@ -29,7 +29,7 @@
*/
/** \file
- * \brief USB low level USB controller definitions.
+ * \brief USB low level USB controller definitions (AVR8)
*
* This file contains structures, function prototypes and macros related to the low level configuration of the
* USB controller, to start, stop and reset the USB library core.
@@ -38,43 +38,37 @@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-/** \ingroup Group_USB
- * \defgroup Group_USBManagement USB Interface Management
+/** \ingroup Group_USBManagement
+ * \defgroup Group_USBManagement_AVR8 USB Interface Management (AVR8)
*
* Functions, macros, variables, enums and types related to the setup and management of the USB interface.
*
* @{
*/
-#ifndef __USBCONTROLLER_H__
-#define __USBCONTROLLER_H__
+#ifndef __USBCONTROLLER_AVR8_H__
+#define __USBCONTROLLER_AVR8_H__
/* Includes: */
- #include <avr/io.h>
- #include <avr/interrupt.h>
- #include <stdbool.h>
-
- #include "../HighLevel/USBMode.h"
-
- #include "../../../Common/Common.h"
- #include "../HighLevel/USBMode.h"
- #include "../HighLevel/Events.h"
- #include "../HighLevel/USBTask.h"
- #include "USBInterrupt.h"
+ #include "../../../../Common/Common.h"
+ #include "../USBMode.h"
+ #include "../Events.h"
+ #include "../USBTask.h"
+ #include "../USBInterrupt.h"
#if defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__)
- #include "Host.h"
- #include "OTG.h"
- #include "Pipe.h"
- #include "../HighLevel/HostStandardReq.h"
- #include "../HighLevel/PipeStream.h"
+ #include "../Host.h"
+ #include "../OTG.h"
+ #include "../Pipe.h"
+ #include "../HostStandardReq.h"
+ #include "../PipeStream.h"
#endif
#if defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__)
- #include "Device.h"
- #include "Endpoint.h"
- #include "../HighLevel/DeviceStandardReq.h"
- #include "../HighLevel/EndpointStream.h"
+ #include "../Device.h"
+ #include "../Endpoint.h"
+ #include "../DeviceStandardReq.h"
+ #include "../EndpointStream.h"
#endif
/* Enable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c b/LUFA/Drivers/USB/Core/AVR8/USBInterrupt.c
index 34234fe84..34234fe84 100644
--- a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c
+++ b/LUFA/Drivers/USB/Core/AVR8/USBInterrupt.c
diff --git a/LUFA/Drivers/USB/LowLevel/USBInterrupt.h b/LUFA/Drivers/USB/Core/AVR8/USBInterrupt.h
index 29ad93388..3cb0b66be 100644
--- a/LUFA/Drivers/USB/LowLevel/USBInterrupt.h
+++ b/LUFA/Drivers/USB/Core/AVR8/USBInterrupt.h
@@ -29,7 +29,7 @@
*/
/** \file
- * \brief USB controller interrupt service routine management.
+ * \brief USB controller interrupt service routine management (AVR8)
*
* This file contains definitions required for the correct handling of low level USB service routine interrupts
* from the USB controller.
@@ -38,14 +38,11 @@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-#ifndef __USBINTERRUPT_H__
-#define __USBINTERRUPT_H__
+#ifndef __USBINTERRUPT_AVR8_H__
+#define __USBINTERRUPT_AVR8_H__
/* Includes: */
- #include <avr/io.h>
- #include <avr/interrupt.h>
- #include <util/atomic.h>
- #include <stdbool.h>
+ #include "../../../../Common/Common.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@ -87,10 +84,9 @@
#define USB_INT_RXSTPI UEIENX, (1 << RXSTPE) , UEINTX, (1 << RXSTPI)
/* Includes: */
- #include "../../../Common/Common.h"
- #include "../HighLevel/USBMode.h"
- #include "../HighLevel/Events.h"
- #include "USBController.h"
+ #include "../USBMode.h"
+ #include "../Events.h"
+ #include "../USBController.h"
/* Function Prototypes: */
void USB_INT_ClearAllInterrupts(void);
diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c b/LUFA/Drivers/USB/Core/ConfigDescriptor.c
index 9671659d6..9671659d6 100644
--- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
+++ b/LUFA/Drivers/USB/Core/ConfigDescriptor.c
diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h b/LUFA/Drivers/USB/Core/ConfigDescriptor.h
index d51eb3d93..2f0ac8e02 100644
--- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
+++ b/LUFA/Drivers/USB/Core/ConfigDescriptor.h
@@ -51,8 +51,6 @@
#define __CONFIGDESCRIPTOR_H__
/* Includes: */
- #include <stdint.h>
-
#include "../../../Common/Common.h"
#include "HostStandardReq.h"
#include "USBMode.h"
diff --git a/LUFA/Drivers/USB/Core/Device.h b/LUFA/Drivers/USB/Core/Device.h
new file mode 100644
index 000000000..8c85451ac
--- /dev/null
+++ b/LUFA/Drivers/USB/Core/Device.h
@@ -0,0 +1,71 @@
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+ 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
+ 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
+ software without specific, written prior permission.
+
+ The author disclaim all warranties with regard to this
+ software, including all implied warranties of merchantability
+ and fitness. In no event shall the author be liable for any
+ special, indirect or consequential damages or any damages
+ whatsoever resulting from loss of use, data or profits, whether
+ in an action of contract, negligence or other tortious action,
+ arising out of or in connection with the use or performance of
+ this software.
+*/
+
+/** \file
+ * \brief Common USB device mode definitions.
+ *
+ * This file contains common structures, function prototypes and macros related to USB device mode for all
+ * architectures.
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the USB driver
+ * dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_USB
+ * \defgroup Group_Device Device Management
+ *
+ * USB Device mode related definitions common to all architectures. This module contains definitions which
+ * are used when the USB controller is initialized in device mode.
+ *
+ * @{
+ */
+
+#ifndef __USBDEVICE_H__
+#define __USBDEVICE_H__
+
+ /* Includes: */
+ #include "../../../Common/Common.h"
+ #include "StdDescriptors.h"
+ #include "USBInterrupt.h"
+ #include "Endpoint.h"
+
+ #if (ARCH == ARCH_AVR8)
+ #include "AVR8/Device.h"
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_USB_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+ #endif
+
+#endif
+
+/** @} */
+
diff --git a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
index f9cec4168..f0c336eda 100644
--- a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
+++ b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
@@ -207,33 +207,12 @@ static void USB_Device_GetInternalSerialDescriptor(void)
} SignatureDescriptor;
SignatureDescriptor.Header.Type = DTYPE_String;
- SignatureDescriptor.Header.Size = sizeof(SignatureDescriptor);
-
- ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
- {
- uint8_t SigReadAddress = 0x0E;
-
- for (uint8_t SerialCharNum = 0; SerialCharNum < 20; SerialCharNum++)
- {
- uint8_t SerialByte = boot_signature_byte_get(SigReadAddress);
-
- if (SerialCharNum & 0x01)
- {
- SerialByte >>= 4;
- SigReadAddress++;
- }
-
- SerialByte &= 0x0F;
-
- SignatureDescriptor.UnicodeString[SerialCharNum] = (SerialByte >= 10) ?
- (('A' - 10) + SerialByte) : ('0' + SerialByte);
- }
- }
+ SignatureDescriptor.Header.Size = USB_Device_GetSerialString(SignatureDescriptor.UnicodeString,
+ sizeof(SignatureDescriptor.UnicodeString));
Endpoint_ClearSETUP();
Endpoint_Write_Control_Stream_LE(&SignatureDescriptor, sizeof(SignatureDescriptor));
-
Endpoint_ClearOUT();
}
#endif
diff --git a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.h b/LUFA/Drivers/USB/Core/DeviceStandardReq.h
index 4e67f8ae5..0ab297da5 100644
--- a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.h
+++ b/LUFA/Drivers/USB/Core/DeviceStandardReq.h
@@ -42,18 +42,12 @@
#define __DEVICESTDREQ_H__
/* Includes: */
- #include <avr/pgmspace.h>
- #include <avr/eeprom.h>
- #include <avr/boot.h>
- #include <util/atomic.h>
- #include <stdint.h>
- #include <stdbool.h>
-
+ #include "../../../Common/Common.h"
#include "StdDescriptors.h"
#include "Events.h"
#include "StdRequestType.h"
#include "USBTask.h"
- #include "../LowLevel/USBController.h"
+ #include "USBController.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/Core/Endpoint.h b/LUFA/Drivers/USB/Core/Endpoint.h
new file mode 100644
index 000000000..302c368e4
--- /dev/null
+++ b/LUFA/Drivers/USB/Core/Endpoint.h
@@ -0,0 +1,88 @@
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+ 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
+ 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
+ software without specific, written prior permission.
+
+ The author disclaim all warranties with regard to this
+ software, including all implied warranties of merchantability
+ and fitness. In no event shall the author be liable for any
+ special, indirect or consequential damages or any damages
+ whatsoever resulting from loss of use, data or profits, whether
+ in an action of contract, negligence or other tortious action,
+ arising out of or in connection with the use or performance of
+ this software.
+*/
+
+/** \file
+ * \brief USB device endpoint management definitions.
+ *
+ * This file contains structures, function prototypes and macros related to the management of the device's
+ * data endpoints when the library is initialized in USB device mode.
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the USB driver
+ * dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_EndpointManagement
+ * \defgroup Group_EndpointRW Endpoint Data Reading and Writing
+ *
+ * Functions, macros, variables, enums and types related to data reading and writing from and to endpoints.
+ */
+
+/** \ingroup Group_EndpointRW
+ * \defgroup Group_EndpointPrimitiveRW Read/Write of Primitive Data Types
+ *
+ * Functions, macros, variables, enums and types related to data reading and writing of primitive data types
+ * from and to endpoints.
+ */
+
+/** \ingroup Group_EndpointManagement
+ * \defgroup Group_EndpointPacketManagement Endpoint Packet Management
+ *
+ * Functions, macros, variables, enums and types related to packet management of endpoints.
+ */
+
+/** \ingroup Group_USB
+ * \defgroup Group_EndpointManagement Endpoint Management
+ *
+ * Functions, macros and enums related to endpoint management when in USB Device mode. This
+ * module contains the endpoint management macros, as well as endpoint interrupt and data
+ * send/receive functions for various data types.
+ *
+ * @{
+ */
+
+#ifndef __ENDPOINT_H__
+#define __ENDPOINT_H__
+
+ /* Includes: */
+ #include "../../../Common/Common.h"
+
+ #if (ARCH == ARCH_AVR8)
+ #include "AVR8/Endpoint.h"
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_USB_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+ #endif
+
+#endif
+
+/** @} */
+
diff --git a/LUFA/Drivers/USB/HighLevel/EndpointStream.c b/LUFA/Drivers/USB/Core/EndpointStream.c
index 974af682c..974af682c 100644
--- a/LUFA/Drivers/USB/HighLevel/EndpointStream.c
+++ b/LUFA/Drivers/USB/Core/EndpointStream.c
diff --git a/LUFA/Drivers/USB/HighLevel/EndpointStream.h b/LUFA/Drivers/USB/Core/EndpointStream.h
index 726378bfb..4d4f33a20 100644
--- a/LUFA/Drivers/USB/HighLevel/EndpointStream.h
+++ b/LUFA/Drivers/USB/Core/EndpointStream.h
@@ -51,10 +51,6 @@
#define __ENDPOINT_STREAM_H__
/* Includes: */
- #include <avr/pgmspace.h>
- #include <avr/eeprom.h>
- #include <stdbool.h>
-
#include "../../../Common/Common.h"
#include "USBTask.h"
diff --git a/LUFA/Drivers/USB/HighLevel/Events.c b/LUFA/Drivers/USB/Core/Events.c
index cd340fbba..cd340fbba 100644
--- a/LUFA/Drivers/USB/HighLevel/Events.c
+++ b/LUFA/Drivers/USB/Core/Events.c
diff --git a/LUFA/Drivers/USB/HighLevel/Events.h b/LUFA/Drivers/USB/Core/Events.h
index 368774bdd..4a3a1a160 100644
--- a/LUFA/Drivers/USB/HighLevel/Events.h
+++ b/LUFA/Drivers/USB/Core/Events.h
@@ -69,8 +69,6 @@
#define __USBEVENTS_H__
/* Includes: */
- #include <stdint.h>
-
#include "../../../Common/Common.h"
#include "USBMode.h"
@@ -92,7 +90,7 @@
* before the mode is switched to the newly indicated mode but after the \ref EVENT_USB_Device_Disconnect
* event has fired (if connected before the role change).
*
- * \note This event only exists on USB AVR models which support dual role modes.
+ * \note This event only exists on microcontrollers that support dual role USB modes.
* \n\n
*
* \note This event does not exist if the \c USB_DEVICE_ONLY or \c USB_HOST_ONLY tokens have been supplied
@@ -105,7 +103,7 @@
*
* \param[in] ErrorCode Error code indicating the failure reason, a value in \ref USB_Host_ErrorCodes_t.
*
- * \note This event only exists on USB AVR models which supports host mode.
+ * \note This event only exists on microcontrollers that supports USB host mode.
* \n\n
*
* \note This event does not exist if the \c USB_DEVICE_ONLY token is supplied to the compiler (see
@@ -118,7 +116,7 @@
* the standard \ref EVENT_USB_Device_Connect() event and so can be used to programmatically start the USB
* management task to reduce CPU consumption.
*
- * \note This event only exists on USB AVR models which supports host mode.
+ * \note This event only exists on microcontrollers that supports USB host mode.
* \n\n
*
* \note This event does not exist if the \c USB_DEVICE_ONLY token is supplied to the compiler (see
@@ -132,7 +130,7 @@
* a USB device has been removed the USB interface whether or not it has been enumerated. This
* can be used to programmatically stop the USB management task to reduce CPU consumption.
*
- * \note This event only exists on USB AVR models which supports host mode.
+ * \note This event only exists on microcontrollers that supports USB host mode.
* \n\n
*
* \note This event does not exist if the \c USB_DEVICE_ONLY token is supplied to the compiler (see
@@ -152,7 +150,7 @@
* ErrorCode parameter indicates a control error, this will give the error
* code returned by the \ref USB_Host_SendControlRequest() function.
*
- * \note This event only exists on USB AVR models which supports host mode.
+ * \note This event only exists on microcontrollers that supports USB host mode.
* \n\n
*
* \note This event does not exist if the \c USB_DEVICE_ONLY token is supplied to the compiler (see
@@ -188,8 +186,9 @@
*/
void EVENT_USB_Host_StartOfFrame(void);
- /** Event for USB device connection. This event fires when the AVR in device mode and the device is connected
- * to a host, beginning the enumeration process, measured by a rising level on the AVR's VBUS pin.
+ /** Event for USB device connection. This event fires when the microcontroller is in USB Device mode
+ * and the device is connected to a USB host, beginning the enumeration process measured by a rising
+ * level on the microcontroller's VBUS sense pin.
*
* This event is time-critical; exceeding OS-specific delays within this event handler (typically of around
* two seconds) will prevent the device from enumerating correctly.
@@ -202,17 +201,17 @@
* and disconnection events may be manually fired, and the \ref USB_DeviceState global changed manually.
* \n\n
*
- * \note This event may fire multiple times during device enumeration on the series 2 USB AVRs with limited USB controllers
+ * \note This event may fire multiple times during device enumeration on the microcontrollers with limited USB controllers
* if \c NO_LIMITED_CONTROLLER_CONNECT is not defined.
*
* \see \ref Group_USBManagement for more information on the USB management task and reducing CPU usage.
*/
void EVENT_USB_Device_Connect(void);
- /** Event for USB device disconnection. This event fires when the AVR in device mode and the device is disconnected
- * from a host, measured by a falling level on the AVR's VBUS pin.
+ /** Event for USB device disconnection. This event fires when the microcontroller is in USB Device mode and the device is
+ * disconnected from a host, measured by a falling level on the microcontroller's VBUS sense pin.
*
- * \note For the smaller series 2 USB AVRs with limited USB controllers, VBUS is not available to the USB controller.
+ * \note For the microcontrollers with limited USB controllers, VBUS sense is not available to the USB controller.
* this means that the current connection state is derived from the bus suspension and wake up events by default,
* which is not always accurate (host may suspend the bus while still connected). If the actual connection state
* needs to be determined, VBUS should be routed to an external pin, and the auto-detect behaviour turned off by
@@ -220,7 +219,7 @@
* and disconnection events may be manually fired, and the \ref USB_DeviceState global changed manually.
* \n\n
*
- * \note This event may fire multiple times during device enumeration on the series 2 USB AVRs with limited USB controllers
+ * \note This event may fire multiple times during device enumeration on the microcontrollers with limited USB controllers
* if \c NO_LIMITED_CONTROLLER_CONNECT is not defined.
*
* \see \ref Group_USBManagement for more information on the USB management task and reducing CPU usage.
@@ -277,8 +276,9 @@
* \ref Group_USBManagement documentation).
* \n\n
*
- * \note This event does not exist on the series 2 USB AVRs when the \c NO_LIMITED_CONTROLLER_CONNECT
- * compile time token is not set - see \ref EVENT_USB_Device_Disconnect.
+ * \note This event does not exist on the microcontrollers with limited USB VBUS sensing abilities
+ * when the \c NO_LIMITED_CONTROLLER_CONNECT compile time token is not set - see
+ * \ref EVENT_USB_Device_Disconnect.
*
* \see \ref EVENT_USB_Device_WakeUp() event for accompanying Wake Up event.
*/
@@ -294,8 +294,9 @@
* \ref Group_USBManagement documentation).
* \n\n
*
- * \note This event does not exist on the series 2 USB AVRs when the \c NO_LIMITED_CONTROLLER_CONNECT
- * compile time token is not set - see \ref EVENT_USB_Device_Connect.
+ * \note This event does not exist on the microcontrollers with limited USB VBUS sensing abilities
+ * when the \c NO_LIMITED_CONTROLLER_CONNECT compile time token is not set - see
+ * \ref EVENT_USB_Device_Disconnect.
*
* \see \ref EVENT_USB_Device_Suspend() event for accompanying Suspend event.
*/
diff --git a/LUFA/Drivers/USB/Core/Host.h b/LUFA/Drivers/USB/Core/Host.h
new file mode 100644
index 000000000..8a6ac438d
--- /dev/null
+++ b/LUFA/Drivers/USB/Core/Host.h
@@ -0,0 +1,68 @@
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+ 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
+ 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
+ software without specific, written prior permission.
+
+ The author disclaim all warranties with regard to this
+ software, including all implied warranties of merchantability
+ and fitness. In no event shall the author be liable for any
+ special, indirect or consequential damages or any damages
+ whatsoever resulting from loss of use, data or profits, whether
+ in an action of contract, negligence or other tortious action,
+ arising out of or in connection with the use or performance of
+ this software.
+*/
+
+/** \file
+ * \brief USB host mode definitions.
+ *
+ * USB Host mode related macros and enums. This module contains macros and enums which are used when
+ * the USB controller is initialized in host mode.
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the USB driver
+ * dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_USB
+ * \defgroup Group_Host Host Management
+ *
+ * USB Host mode related macros and enums. This module contains macros and enums which are used when
+ * the USB controller is initialized in host mode.
+ *
+ * @{
+ */
+
+#ifndef __USBHOST_H__
+#define __USBHOST_H__
+
+ /* Includes: */
+ #include "../../../Common/Common.h"
+
+ #if (ARCH == ARCH_AVR8)
+ #include "AVR8/Host.h"
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_USB_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+ #endif
+
+#endif
+
+/** @} */
+
diff --git a/LUFA/Drivers/USB/HighLevel/HostStandardReq.c b/LUFA/Drivers/USB/Core/HostStandardReq.c
index 16d0ffb17..16d0ffb17 100644
--- a/LUFA/Drivers/USB/HighLevel/HostStandardReq.c
+++ b/LUFA/Drivers/USB/Core/HostStandardReq.c
diff --git a/LUFA/Drivers/USB/HighLevel/HostStandardReq.h b/LUFA/Drivers/USB/Core/HostStandardReq.h
index 9d2c2052f..46822221c 100644
--- a/LUFA/Drivers/USB/HighLevel/HostStandardReq.h
+++ b/LUFA/Drivers/USB/Core/HostStandardReq.h
@@ -42,12 +42,10 @@
#define __HOSTSTDREQ_H__
/* Includes: */
- #include <stdint.h>
- #include <stdbool.h>
-
+ #include "../../../Common/Common.h"
#include "USBMode.h"
#include "StdRequestType.h"
- #include "../LowLevel/USBController.h"
+ #include "USBController.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/Core/OTG.h b/LUFA/Drivers/USB/Core/OTG.h
new file mode 100644
index 000000000..3b41a0fe6
--- /dev/null
+++ b/LUFA/Drivers/USB/Core/OTG.h
@@ -0,0 +1,69 @@
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+ 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
+ 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
+ software without specific, written prior permission.
+
+ The author disclaim all warranties with regard to this
+ software, including all implied warranties of merchantability
+ and fitness. In no event shall the author be liable for any
+ special, indirect or consequential damages or any damages
+ whatsoever resulting from loss of use, data or profits, whether
+ in an action of contract, negligence or other tortious action,
+ arising out of or in connection with the use or performance of
+ this software.
+*/
+
+/** \file
+ * \brief USB OTG mode definitions.
+ *
+ * This file contains structures, function prototypes and macros related to USB OTG mode, where two USB devices
+ * may be linked directly together and exchange host/device roles as needed.
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the USB driver
+ * dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_USB
+ * \defgroup Group_OTG USB On The Go (OTG) Management
+ *
+ * This module contains macros for embedded USB hosts with dual role On The Go capabilities, for managing role
+ * exchange. OTG is a way for two USB dual role devices to talk to one another directly without fixed device/host
+ * roles.
+ *
+ * @{
+ */
+
+#ifndef __USBOTG_H__
+#define __USBOTG_H__
+
+ /* Includes: */
+ #include "../../../Common/Common.h"
+
+ #if (ARCH == ARCH_AVR8)
+ #include "AVR8/OTG.h"
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_USB_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+ #endif
+
+#endif
+
+/** @} */
+
diff --git a/LUFA/Drivers/USB/Core/Pipe.h b/LUFA/Drivers/USB/Core/Pipe.h
new file mode 100644
index 000000000..2ab14fc6c
--- /dev/null
+++ b/LUFA/Drivers/USB/Core/Pipe.h
@@ -0,0 +1,97 @@
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+ 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
+ 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
+ software without specific, written prior permission.
+
+ The author disclaim all warranties with regard to this
+ software, including all implied warranties of merchantability
+ and fitness. In no event shall the author be liable for any
+ special, indirect or consequential damages or any damages
+ whatsoever resulting from loss of use, data or profits, whether
+ in an action of contract, negligence or other tortious action,
+ arising out of or in connection with the use or performance of
+ this software.
+*/
+
+/** \file
+ * \brief USB host pipe management definitions.
+ *
+ * This file contains structures, function prototypes and macros related to the management of the device's
+ * data pipes when the library is initialized in USB host mode.
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the USB driver
+ * dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_PipeManagement
+ * \defgroup Group_PipeRW Pipe Data Reading and Writing
+ *
+ * Functions, macros, variables, enums and types related to data reading and writing from and to pipes.
+ */
+
+/** \ingroup Group_PipeRW
+ * \defgroup Group_PipePrimitiveRW Read/Write of Primitive Data Types
+ *
+ * Functions, macros, variables, enums and types related to data reading and writing of primitive data types
+ * from and to pipes.
+ */
+
+/** \ingroup Group_PipeManagement
+ * \defgroup Group_PipePacketManagement Pipe Packet Management
+ *
+ * Functions, macros, variables, enums and types related to packet management of pipes.
+ */
+
+/** \ingroup Group_PipeManagement
+ * \defgroup Group_PipeControlReq Pipe Control Request Management
+ *
+ * Module for host mode request processing. This module allows for the transmission of standard, class and
+ * vendor control requests to the default control endpoint of an attached device while in host mode.
+ *
+ * \see Chapter 9 of the USB 2.0 specification.
+ */
+
+/** \ingroup Group_USB
+ * \defgroup Group_PipeManagement Pipe Management
+ *
+ * This module contains functions, macros and enums related to pipe management when in USB Host mode. This
+ * module contains the pipe management macros, as well as pipe interrupt and data send/receive functions
+ * for various data types.
+ *
+ * @{
+ */
+
+#ifndef __PIPE_H__
+#define __PIPE_H__
+
+ /* Includes: */
+ #include "../../../Common/Common.h"
+
+ #if (ARCH == ARCH_AVR8)
+ #include "AVR8/Pipe.h"
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_USB_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+ #endif
+
+#endif
+
+/** @} */
+
diff --git a/LUFA/Drivers/USB/HighLevel/PipeStream.c b/LUFA/Drivers/USB/Core/PipeStream.c
index 4465471a8..4465471a8 100644
--- a/LUFA/Drivers/USB/HighLevel/PipeStream.c
+++ b/LUFA/Drivers/USB/Core/PipeStream.c
diff --git a/LUFA/Drivers/USB/HighLevel/PipeStream.h b/LUFA/Drivers/USB/Core/PipeStream.h
index 38ab09f0b..86c544ebe 100644
--- a/LUFA/Drivers/USB/HighLevel/PipeStream.h
+++ b/LUFA/Drivers/USB/Core/PipeStream.h
@@ -51,10 +51,6 @@
#define __PIPE_STREAM_H__
/* Includes: */
- #include <avr/pgmspace.h>
- #include <avr/eeprom.h>
- #include <stdbool.h>
-
#include "../../../Common/Common.h"
#include "USBTask.h"
diff --git a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h b/LUFA/Drivers/USB/Core/StdDescriptors.h
index 7b8f4d7dc..ed4ecf91e 100644
--- a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
+++ b/LUFA/Drivers/USB/Core/StdDescriptors.h
@@ -50,17 +50,12 @@
#define __USBDESCRIPTORS_H__
/* Includes: */
- #include <avr/pgmspace.h>
- #include <stdbool.h>
- #include <stdint.h>
- #include <stddef.h>
-
#include "../../../Common/Common.h"
#include "USBMode.h"
#include "Events.h"
#if defined(USB_CAN_BE_DEVICE)
- #include "../LowLevel/Device.h"
+ #include "Device.h"
#endif
/* Enable C linkage for C++ Compilers: */
@@ -81,24 +76,6 @@
*/
#define NO_DESCRIPTOR 0
- #if (!defined(NO_INTERNAL_SERIAL) && \
- (defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1287__) || \
- defined(__AVR_ATmega32U6__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) || \
- defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega8U2__)))
- /** 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
- * number allocations) to a device regardless of the port it is plugged in to on the host. Some USB AVRs contain
- * a unique serial number internally, and setting the device descriptors serial number string index to this value
- * will cause it to use the internal serial number.
- *
- * On unsupported devices, this will evaluate to NO_DESCRIPTOR and so will force the host to create a pseudo-serial
- * number for the device.
- */
- #define USE_INTERNAL_SERIAL 0xDC
- #else
- #define USE_INTERNAL_SERIAL NO_DESCRIPTOR
- #endif
-
/** Macro to calculate the power value for the configuration descriptor, from a given number of milliamperes. */
#define USB_CONFIG_POWER_MA(mA) ((mA) >> 1)
diff --git a/LUFA/Drivers/USB/HighLevel/StdRequestType.h b/LUFA/Drivers/USB/Core/StdRequestType.h
index c62aa502d..a8c3f0913 100644
--- a/LUFA/Drivers/USB/HighLevel/StdRequestType.h
+++ b/LUFA/Drivers/USB/Core/StdRequestType.h
@@ -50,7 +50,7 @@
#define __STDREQTYPE_H__
/* Includes: */
- #include <stdint.h>
+ #include "../../../Common/Common.h"
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_USB_DRIVER)
diff --git a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_R.c b/LUFA/Drivers/USB/Core/Template/Template_Endpoint_Control_R.c
index e746b5124..e746b5124 100644
--- a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_R.c
+++ b/LUFA/Drivers/USB/Core/Template/Template_Endpoint_Control_R.c
diff --git a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/Core/Template/Template_Endpoint_Control_W.c
index bdbbcfc11..bdbbcfc11 100644
--- a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c
+++ b/LUFA/Drivers/USB/Core/Template/Template_Endpoint_Control_W.c
diff --git a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c b/LUFA/Drivers/USB/Core/Template/Template_Endpoint_RW.c
index a46d7513b..a46d7513b 100644
--- a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c
+++ b/LUFA/Drivers/USB/Core/Template/Template_Endpoint_RW.c
diff --git a/LUFA/Drivers/USB/HighLevel/Template/Template_Pipe_RW.c b/LUFA/Drivers/USB/Core/Template/Template_Pipe_RW.c
index 147ce5ad4..147ce5ad4 100644
--- a/LUFA/Drivers/USB/HighLevel/Template/Template_Pipe_RW.c
+++ b/LUFA/Drivers/USB/Core/Template/Template_Pipe_RW.c
diff --git a/LUFA/Drivers/USB/Core/USBController.h b/LUFA/Drivers/USB/Core/USBController.h
new file mode 100644
index 000000000..475aeb1bd
--- /dev/null
+++ b/LUFA/Drivers/USB/Core/USBController.h
@@ -0,0 +1,67 @@
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+ 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
+ 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
+ software without specific, written prior permission.
+
+ The author disclaim all warranties with regard to this
+ software, including all implied warranties of merchantability
+ and fitness. In no event shall the author be liable for any
+ special, indirect or consequential damages or any damages
+ whatsoever resulting from loss of use, data or profits, whether
+ in an action of contract, negligence or other tortious action,
+ arising out of or in connection with the use or performance of
+ this software.
+*/
+
+/** \file
+ * \brief USB low level USB controller definitions.
+ *
+ * This file contains structures, function prototypes and macros related to the low level configuration of the
+ * USB controller, to start, stop and reset the USB library core.
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the USB driver
+ * dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_USB
+ * \defgroup Group_USBManagement USB Interface Management
+ *
+ * Functions, macros, variables, enums and types related to the setup and management of the USB interface.
+ *
+ * @{
+ */
+
+#ifndef __USBCONTROLLER_H__
+#define __USBCONTROLLER_H__
+
+ /* Includes: */
+ #include "../../../Common/Common.h"
+
+ #if (ARCH == ARCH_AVR8)
+ #include "AVR8/USBController.h"
+ #endif
+
+ /* Preprocessor Checks and Defines: */
+ #if !defined(__INCLUDE_FROM_USB_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+ #endif
+
+#endif
+
+/** @} */
+
diff --git a/LUFA/Drivers/USB/Core/USBInterrupt.h b/LUFA/Drivers/USB/Core/USBInterrupt.h
new file mode 100644
index 000000000..00adc4014
--- /dev/null
+++ b/LUFA/Drivers/USB/Core/USBInterrupt.h
@@ -0,0 +1,57 @@
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+ 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
+ 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
+ software without specific, written prior permission.
+
+ The author disclaim all warranties with regard to this
+ software, including all implied warranties of merchantability
+ and fitness. In no event shall the author be liable for any
+ special, indirect or consequential damages or any damages
+ whatsoever resulting from loss of use, data or profits, whether
+ in an action of contract, negligence or other tortious action,
+ arising out of or in connection with the use or performance of
+ this software.
+*/
+
+/** \file
+ * \brief USB controller interrupt service routine management.
+ *
+ * This file contains definitions required for the correct handling of low level USB service routine interrupts
+ * from the USB controller.
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the USB driver
+ * dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+#ifndef __USBINTERRUPT_H__
+#define __USBINTERRUPT_H__
+
+ /* Includes: */
+ #include "../../../Common/Common.h"
+
+ #if (ARCH == ARCH_AVR8)
+ #include "AVR8/USBInterrupt.h"
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_USB_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+ #endif
+
+#endif
+
diff --git a/LUFA/Drivers/USB/HighLevel/USBMode.h b/LUFA/Drivers/USB/Core/USBMode.h
index 58f9927dc..58f9927dc 100644
--- a/LUFA/Drivers/USB/HighLevel/USBMode.h
+++ b/LUFA/Drivers/USB/Core/USBMode.h
diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.c b/LUFA/Drivers/USB/Core/USBTask.c
index c0cd7119f..c0cd7119f 100644
--- a/LUFA/Drivers/USB/HighLevel/USBTask.c
+++ b/LUFA/Drivers/USB/Core/USBTask.c
diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.h b/LUFA/Drivers/USB/Core/USBTask.h
index 205fee622..b5cf381aa 100644
--- a/LUFA/Drivers/USB/HighLevel/USBTask.h
+++ b/LUFA/Drivers/USB/Core/USBTask.h
@@ -42,11 +42,8 @@
#define __USBTASK_H__
/* Includes: */
- #include <avr/interrupt.h>
- #include <stdint.h>
- #include <stdbool.h>
-
- #include "../LowLevel/USBController.h"
+ #include "../../../Common/Common.h"
+ #include "USBController.h"
#include "Events.h"
#include "StdRequestType.h"
#include "StdDescriptors.h"
@@ -100,11 +97,11 @@
* \ref HOST_STATE_Configured and \ref HOST_STATE_Suspended states which are not implemented by
* the library internally.
*
- * To reduce program size and speed up checks of this global, it can be placed into one of the AVR's
- * GPIOR hardware registers instead of RAM by defining the HOST_STATE_AS_GPIOR token to a value
- * between 0 and 2 in the project makefile and passing it to the compiler via the -D switch. When
- * defined, the corresponding GPIOR register should not be used in the user application except
- * implicitly via the library APIs.
+ * To reduce program size and speed up checks of this global on the AVR8 architecture, it can be
+ * placed into one of the AVR's GPIOR hardware registers instead of RAM by defining the
+ * HOST_STATE_AS_GPIOR token to a value between 0 and 2 in the project makefile and passing it to
+ * the compiler via the -D switch. When defined, the corresponding GPIOR register should not be used
+ * in the user application except implicitly via the library APIs.
*
* \note This global is only present if the user application can be a USB host.
*
@@ -129,11 +126,11 @@
* library. The only exception to this rule is if the NO_LIMITED_CONTROLLER_CONNECT token is used
* (see \ref EVENT_USB_Device_Connect() and \ref EVENT_USB_Device_Disconnect() events).
*
- * To reduce program size and speed up checks of this global, it can be placed into one of the AVR's
- * GPIOR hardware registers instead of RAM by defining the DEVICE_STATE_AS_GPIOR token to a value
- * between 0 and 2 in the project makefile and passing it to the compiler via the -D switch. When
- * defined, the corresponding GPIOR register should not be used in the user application except
- * implicitly via the library APIs.
+ * To reduce program size and speed up checks of this global on the AVR8 architecture, it can be
+ * placed into one of the AVR's GPIOR hardware registers instead of RAM by defining the
+ * DEVICE_STATE_AS_GPIOR token to a value between 0 and 2 in the project makefile and passing it to
+ * the compiler via the -D switch. When defined, the corresponding GPIOR register should not be used
+ * in the user application except implicitly via the library APIs.
*
* \note This global is only present if the user application can be a USB device.
* \n\n
diff --git a/LUFA/Drivers/USB/USB.h b/LUFA/Drivers/USB/USB.h
index 70dc97e10..6dba17f64 100644
--- a/LUFA/Drivers/USB/USB.h
+++ b/LUFA/Drivers/USB/USB.h
@@ -34,36 +34,36 @@
* Master include file for the library USB functionality.
*
* This file should be included in all user projects making use of the USB portions of the library, instead of
- * including any headers in the USB/LowLevel/ or USB/HighLevel/ subdirectories.
+ * the individual USB driver submodule headers.
*/
/** \defgroup Group_USB USB Core - LUFA/Drivers/USB/USB.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
- * - LUFA/Drivers/USB/LowLevel/Device.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/LowLevel/Endpoint.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/LowLevel/Host.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/LowLevel/Pipe.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/LowLevel/USBController.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/LowLevel/USBInterrupt.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/HighLevel/Events.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/HighLevel/EndpointStream.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/HighLevel/HostStandardReq.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/HighLevel/PipeStream.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
- * - LUFA/Drivers/USB/HighLevel/USBTask.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/ConfigDescriptor.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/DeviceStandardReq.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/Events.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/EndpointStream.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/HostStandardReq.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/PipeStream.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/USBTask.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/<i>ARCH</i>/Device.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/<i>ARCH</i>/Endpoint.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/<i>ARCH</i>/Host.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/<i>ARCH</i>/Pipe.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/<i>ARCH</i>/USBController.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ * - LUFA/Drivers/USB/Core/<i>ARCH</i>/USBInterrupt.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
* - LUFA/Drivers/USB/Class/Common/HIDParser.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
*
* \section Sec_ModDescription Module Description
- * Driver and framework for the USB controller hardware on the USB series of AVR microcontrollers. This module
+ * Driver and framework for the USB controller of the selected architecture and microcontroller model. This module
* consists of many submodules, and is designed to provide an easy way to configure and control USB host, device
* or OTG mode USB applications.
*
* The USB stack requires the sole control over the USB controller in the microcontroller only; i.e. it does not
- * require any additional AVR timers, etc. to operate. This ensures that the USB stack requires as few resources
- * as possible.
+ * require any additional timers or other peripherals to operate. This ensures that the USB stack requires as few
+ * resources as possible.
*
* The USB stack can be used in Device Mode for connections to USB Hosts (see \ref Group_Device), in Host mode for
* hosting of other USB devices (see \ref Group_Host), or as a dual role device which can either act as a USB host
@@ -361,39 +361,38 @@
#endif
/* Includes: */
- #include "HighLevel/USBMode.h"
+ #include "../../Common/Common.h"
+ #include "Core/USBMode.h"
/* Preprocessor Checks: */
- #if (!defined(USB_SERIES_2_AVR) && !defined(USB_SERIES_4_AVR) && \
- !defined(USB_SERIES_6_AVR) && !defined(USB_SERIES_7_AVR))
- #error The currently selected AVR model is not supported under the USB component of the LUFA library.
+ #if (!defined(USB_CAN_BE_DEVICE) && !defined(USB_CAN_BE_HOST))
+ #error The currently selected architecture is not supported under the USB component of the library.
#endif
/* Includes: */
- #include "HighLevel/USBTask.h"
- #include "HighLevel/Events.h"
- #include "HighLevel/StdDescriptors.h"
- #include "HighLevel/ConfigDescriptor.h"
-
- #include "LowLevel/USBController.h"
- #include "LowLevel/USBInterrupt.h"
+ #include "Core/USBTask.h"
+ #include "Core/Events.h"
+ #include "Core/StdDescriptors.h"
+ #include "Core/ConfigDescriptor.h"
+ #include "Core/USBController.h"
+ #include "Core/USBInterrupt.h"
#if defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__)
- #include "LowLevel/Host.h"
- #include "LowLevel/Pipe.h"
- #include "HighLevel/HostStandardReq.h"
- #include "HighLevel/PipeStream.h"
+ #include "Core/Host.h"
+ #include "Core/Pipe.h"
+ #include "Core/HostStandardReq.h"
+ #include "Core/PipeStream.h"
#endif
#if defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__)
- #include "LowLevel/Device.h"
- #include "LowLevel/Endpoint.h"
- #include "HighLevel/DeviceStandardReq.h"
- #include "HighLevel/EndpointStream.h"
+ #include "Core/Device.h"
+ #include "Core/Endpoint.h"
+ #include "Core/DeviceStandardReq.h"
+ #include "Core/EndpointStream.h"
#endif
#if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
- #include "LowLevel/OTG.h"
+ #include "Core/OTG.h"
#endif
#include "Class/Audio.h"
diff --git a/LUFA/ManPages/DirectorySummaries.txt b/LUFA/ManPages/DirectorySummaries.txt
index a02d4076b..504742bf5 100644
--- a/LUFA/ManPages/DirectorySummaries.txt
+++ b/LUFA/ManPages/DirectorySummaries.txt
@@ -13,44 +13,31 @@
* \dir LUFA/Drivers
* \brief Library hardware and software drivers.
*
- * This folder contains all the library hardware and software drivers for each supported board and USB AVR
+ * This folder contains all the library hardware and software drivers for each supported board, architecture and
* microcontroller model.
*
* \dir LUFA/Drivers/Misc
* \brief Miscellaneous driver files.
*
- * This folder contains drivers for aspects other than the USB interface, board hardware or AVR peripherals.
+ * This folder contains drivers for aspects other than the USB interface, board hardware or microcontroller peripherals.
*
* \dir LUFA/Drivers/Peripheral
- * \brief USB AVR peripheral driver files.
+ * \brief Microcontroller peripheral driver files.
*
- * This folder contains drivers for several of the AVR internal peripherals such as the USART, compatible with
- * all USB AVR models.
- *
- * \dir LUFA/Drivers/Peripheral/AVR8
- * \brief AVR8 AVR microcontroller model specific peripheral driver files.
- *
- * This folder contains drivers for several of the AVR internal peripherals such as the USART, compatible only with
- * the 8-bit AVR microcontroller models, such as the AT90USB1287. Its contents should <b>not</b> be included by the
- * user application - the dispatch header file located in the parent directory should be used instead.
+ * This folder contains drivers for various low level microcontroller peripherals, usually located on the microcontroller
+ * die within the same physical chip.
*
* \dir LUFA/Drivers/USB
* \brief USB controller peripheral driver files.
*
- * This folder contains the main header files required to implement the USB interface in the USB supporting AVR models.
- * The header files contained directly in this folder should be included in the user application in order to gain USB
- * functionality, and the appropriate C source files in the LowLevel and HighLevel driver folders added to the compile
- * and link stages.
- *
- * \dir LUFA/Drivers/USB/LowLevel
- * \brief Low level USB driver files.
+ * This folder contains the complete LUFA USB stack and controller files, including the core driver and stack, as well
+ * as the USB class driver implementations.
*
- * This folder contains low level USB driver source files required to implement USB functionality on the USB AVR microcontrollers.
+ * \dir LUFA/Drivers/USB/Core
+ * \brief Core USB driver files.
*
- * \dir LUFA/Drivers/USB/HighLevel
- * \brief High level USB driver files.
- *
- * This folder contains high level USB driver source files required to implement USB functionality on the USB AVR microcontrollers.
+ * This folder contains the core USB stack and controller driver files, to correctly implement USB functionality on the
+ * target architecture and microcontroller model. This
*
* \dir LUFA/Drivers/USB/Class
* \brief USB Class helper driver files.
@@ -76,34 +63,12 @@
* the Atmel corporation. Header files in this folder should be included in user applications requiring the functionality of
* hardware placed on supported boards.
*
- * \dir LUFA/Drivers/Board/USBKEY
- * \brief USBKEY board hardware driver files.
- *
- * This folder contains drivers for hardware on the Atmel USBKEY demonstration board. The header files in this folder should
- * not be included directly in user applications; the similarly named dispatch header files located in the parent Board directory
- * should be included instead.
- *
- * \dir LUFA/Drivers/Board/STK526
- * \brief STK526 board hardware driver files.
- *
- * This folder contains drivers for hardware on the Atmel STK526 development board. The header files in this folder should
- * not be included directly in user applications; the similarly named dispatch header files located in the parent Board directory
- * should be included instead.
- *
- * \dir LUFA/Drivers/Board/STK525
- * \brief STK525 board hardware driver files.
- *
- * This folder contains drivers for hardware on the Atmel STK525 development board. The header files in this folder should
- * not be included directly in user applications; the similarly named dispatch header files located in the parent Board directory
- * should be included instead.
- *
- * \dir LUFA/Drivers/Board/RZUSBSTICK
- * \brief RZUSBSTICK board hardware driver files.
- *
- * This folder contains drivers for hardware on the Atmel RZUSBSTICK board, as used in the Atmel "Raven" wireless kits. The header
- * files in this folder should not be included directly in user applications; the similarly named dispatch header files located in
- * the parent Board directory should be included instead.
+ * \dir LUFA/Drivers/Board/ADAFRUITU4
+ * \brief ADAFRUITU4 board hardware driver files.
*
+ * This folder contains drivers for hardware on the Adafruit U4 breakout board (http://ladyada.net/products/atmega32u4breakout).
+ * The header files in this folder should not be included directly in user applications; the similarly named dispatch header files
+ * located in the parent Board directory should be included instead.
* \dir LUFA/Drivers/Board/ATAVRUSBRF01
* \brief ATAVRUSBRF01 board hardware driver files.
*
@@ -111,6 +76,13 @@
* files in this folder should not be included directly in user applications; the similarly named dispatch header files located in
* the parent Board directory should be included instead.
*
+ * \dir LUFA/Drivers/Board/BENITO
+ * \brief BENITO board hardware driver files.
+ *
+ * This folder contains drivers for hardware on the Benito boards (http://dorkbotpdx.org/wiki/benito). The header files in this
+ * folder should not be included directly in user applications; the similarly named dispatch header files located in the parent
+ * Board directory should be included instead.
+ *
* \dir LUFA/Drivers/Board/BUMBLEB
* \brief BUMBLEB board hardware driver files.
*
@@ -118,12 +90,26 @@
* files in this folder should not be included directly in user applications; the similarly named dispatch header files located in
* the parent Board directory should be included instead.
*
- * \dir LUFA/Drivers/Board/XPLAIN
- * \brief XPLAIN board hardware driver files.
+ * \dir LUFA/Drivers/Board/BUI
+ * \brief BUI board hardware driver files.
*
- * This folder contains drivers for hardware on the Atmel XPLAIN board (all hardware revisions). The header files in this folder
- * should not be included directly in user applications; the similarly named dispatch header files located in the parent Board
- * directory should be included instead.
+ * This folder contains drivers for hardware on the Busware BUI (http://www.busware.de/tiki-index.php?page=BUI).
+ * The header files in this folder should not be included directly in user applications; the similarly named dispatch header files
+ * located in the parent Board directory should be included instead.
+ *
+ * \dir LUFA/Drivers/Board/BLACKCAT
+ * \brief BLACKCAT board hardware driver files.
+ *
+ * This folder contains drivers for hardware on the TCNISO Blackcat USB JTAG (http://www.embeddedcomputers.net/products/BlackcatUSB/.
+ * The header files in this folder should not be included directly in user applications; the similarly named dispatch header files
+ * located in the parent Board directory should be included instead.
+ *
+ * \dir LUFA/Drivers/Board/CULV3
+ * \brief CULV3 board hardware driver files.
+ *
+ * This folder contains drivers for hardware on the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL).
+ * The header files in this folder should not be included directly in user applications; the similarly named dispatch header files
+ * located in the parent Board directory should be included instead.
*
* \dir LUFA/Drivers/Board/EVK527
* \brief XPLAIN board hardware driver files.
@@ -132,31 +118,31 @@
* not be included directly in user applications; the similarly named dispatch header files located in the parent Board directory
* should be included instead.
*
- * \dir LUFA/Drivers/Board/TEENSY
- * \brief TEENSY board hardware driver files.
+ * \dir LUFA/Drivers/Board/JMDBU2
+ * \brief JM-DB-U2 board hardware driver files.
*
- * This folder contains drivers for hardware on all revisions of the PJRC Teensy boards (http://www.pjrc.com/teensy/). The header
- * files in this folder should not be included directly in user applications; the similarly named dispatch header files located
- * in the parent Board directory should be included instead.
+ * This folder contains drivers for hardware on the JM-DB-U2 boards (http://u2.mattair.net/). The header files in this folder
+ * should not be included directly in user applications; the similarly named dispatch header files located in the parent Board
+ * directory should be included instead.
*
- * \dir LUFA/Drivers/Board/USBTINYMKII
- * \brief USBTINY-MKII board hardware driver files.
+ * \dir LUFA/Drivers/Board/MAXIMUS
+ * \brief MAXIMUS board hardware driver files.
*
- * This folder contains drivers for hardware on all revisions of the USBTINY-MKII boards (http://tom-itx.dyndns.org:81/~webpage/).
- * The header files in this folder should not be included directly in user applications; the similarly named dispatch header files
- * located in the parent Board directory should be included instead.
+ * This folder contains drivers for hardware on the Maximus boards (http://www.avrusb.com/). The header files in this folder
+ * should not be included directly in user applications; the similarly named dispatch header files located in the parent Board
+ * directory should be included instead.
*
- * \dir LUFA/Drivers/Board/BENITO
- * \brief BENITO board hardware driver files.
+ * \dir LUFA/Drivers/Board/MICROSIN162
+ * \brief MICROSIN162 board hardware driver files.
*
- * This folder contains drivers for hardware on the Benito boards (http://dorkbotpdx.org/wiki/benito). The header files in this
- * folder should not be included directly in user applications; the similarly named dispatch header files located in the parent
- * Board directory should be included instead.
+ * This folder contains drivers for hardware on the Microsin AVR-USB162 board (http://microsin.ru/content/view/685/44/). The
+ * header files in this folder should not be included directly in user applications; the similarly named dispatch header files
+ * located in the parent Board directory should be included instead.
*
- * \dir LUFA/Drivers/Board/JMDBU2
- * \brief JM-DB-U2 board hardware driver files.
+ * \dir LUFA/Drivers/Board/MINIMUS
+ * \brief MINIMUS board hardware driver files.
*
- * This folder contains drivers for hardware on the JM-DB-U2 boards (http://u2.mattair.net/). The header files in this folder
+ * This folder contains drivers for hardware on the Minimus boards (http://www.minimususb.com/). The header files in this folder
* should not be included directly in user applications; the similarly named dispatch header files located in the parent Board
* directory should be included instead.
*
@@ -167,6 +153,55 @@
* The header files in this folder should not be included directly in user applications; the similarly named dispatch header files
* located in the parent Board directory should be included instead.
*
+ * \dir LUFA/Drivers/Board/RZUSBSTICK
+ * \brief RZUSBSTICK board hardware driver files.
+ *
+ * This folder contains drivers for hardware on the Atmel RZUSBSTICK board, as used in the Atmel "Raven" wireless kits. The header
+ * files in this folder should not be included directly in user applications; the similarly named dispatch header files located in
+ * the parent Board directory should be included instead.
+ *
+ * \dir LUFA/Drivers/Board/SPARKFUN8U2
+ * \brief SPARKFUN8U2 board hardware driver files.
+ *
+ * This folder contains drivers for hardware on the Sparkfun ATMEGA8U2 breakout board (http://www.sparkfun.com/products/10277). The
+ * header files in this folder should not be included directly in user applications; the similarly named dispatch header files located
+ * in the parent Board directory should be included instead.
+ *
+ * \dir LUFA/Drivers/Board/STK525
+ * \brief STK525 board hardware driver files.
+ *
+ * This folder contains drivers for hardware on the Atmel STK525 development board. The header files in this folder should
+ * not be included directly in user applications; the similarly named dispatch header files located in the parent Board directory
+ * should be included instead.
+ *
+ * \dir LUFA/Drivers/Board/STK526
+ * \brief STK526 board hardware driver files.
+ *
+ * This folder contains drivers for hardware on the Atmel STK526 development board. The header files in this folder should
+ * not be included directly in user applications; the similarly named dispatch header files located in the parent Board directory
+ * should be included instead.
+ *
+ * \dir LUFA/Drivers/Board/TEENSY
+ * \brief TEENSY board hardware driver files.
+ *
+ * This folder contains drivers for hardware on all revisions of the PJRC Teensy boards (http://www.pjrc.com/teensy/). The header
+ * files in this folder should not be included directly in user applications; the similarly named dispatch header files located
+ * in the parent Board directory should be included instead.
+ *
+ * \dir LUFA/Drivers/Board/UDIP
+ * \brief UDIP board hardware driver files.
+ *
+ * This folder contains drivers for hardware on the Linnix UDIP boards (http://linnix.com/udip/).
+ * The header files in this folder should not be included directly in user applications; the similarly named dispatch header files
+ * located in the parent Board directory should be included instead.
+ *
+ * \dir LUFA/Drivers/Board/UNO
+ * \brief UNO board hardware driver files.
+ *
+ * This folder contains drivers for hardware on the Arduino Uno boards (http://www.arduino.cc).
+ * The header files in this folder should not be included directly in user applications; the similarly named dispatch header files
+ * located in the parent Board directory should be included instead.
+ *
* \dir LUFA/Drivers/Board/USBFOO
* \brief USBFOO board hardware driver files.
*
@@ -174,6 +209,27 @@
* The header files in this folder should not be included directly in user applications; the similarly named dispatch header files
* located in the parent Board directory should be included instead.
*
+ * \dir LUFA/Drivers/Board/USBKEY
+ * \brief USBKEY board hardware driver files.
+ *
+ * This folder contains drivers for hardware on the Atmel USBKEY demonstration board. The header files in this folder should
+ * not be included directly in user applications; the similarly named dispatch header files located in the parent Board directory
+ * should be included instead.
+ *
+ * \dir LUFA/Drivers/Board/USBTINYMKII
+ * \brief USBTINY-MKII board hardware driver files.
+ *
+ * This folder contains drivers for hardware on all revisions of the USBTINY-MKII boards (http://tom-itx.dyndns.org:81/~webpage/).
+ * The header files in this folder should not be included directly in user applications; the similarly named dispatch header files
+ * located in the parent Board directory should be included instead.
+ *
+ * \dir LUFA/Drivers/Board/XPLAIN
+ * \brief XPLAIN board hardware driver files.
+ *
+ * This folder contains drivers for hardware on the Atmel XPLAIN board (all hardware revisions). The header files in this folder
+ * should not be included directly in user applications; the similarly named dispatch header files located in the parent Board
+ * directory should be included instead.
+ *
* \dir LUFA/CodeTemplates
* \brief Code templates for use in LUFA powered applications.
*
diff --git a/LUFA/makefile b/LUFA/makefile
index ccc2afd8c..44808b9e9 100644
--- a/LUFA/makefile
+++ b/LUFA/makefile
@@ -22,19 +22,19 @@ ifeq ($(origin ARCH), undefined)
endif
# Define module source file lists
-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/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/EndpointStream.c \
- $(LUFA_ROOT_PATH)/Drivers/USB/HighLevel/HostStandardReq.c \
- $(LUFA_ROOT_PATH)/Drivers/USB/HighLevel/PipeStream.c \
- $(LUFA_ROOT_PATH)/Drivers/USB/HighLevel/USBTask.c \
+LUFA_SRC_USB = $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Device.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Endpoint.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Host.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBController.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBInterrupt.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptor.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/EndpointStream.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/PipeStream.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c
LUFA_SRC_USBCLASS = $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/Audio.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDC.c \