Moved all source to the trunk directory.
[pub/lufa.git] / LUFA / Drivers / USB / LowLevel / USBMode.h
diff --git a/LUFA/Drivers/USB/LowLevel/USBMode.h b/LUFA/Drivers/USB/LowLevel/USBMode.h
new file mode 100644 (file)
index 0000000..f0fbf68
--- /dev/null
@@ -0,0 +1,77 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+#ifndef __USBMODE_H__\r
+#define __USBMODE_H__\r
+\r
+       /* Private Interface - For use in library only: */\r
+       #if !defined(__DOXYGEN__)\r
+               /* Macros: */\r
+                       #if ((defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) ||   \\r
+                             defined(__AVR_AT90USB162__)  || defined(__AVR_AT90USB82__)  ||   \\r
+                                 defined(__AVR_ATmega16U4__)  || defined(__AVR_ATmega32U4__) ||   \\r
+                                 defined(__AVR_ATmega32U6__)) && !defined(USB_DEVICE_ONLY))\r
+                               #define USB_DEVICE_ONLY\r
+                       #endif\r
+                       \r
+                       #if (defined(__AVR_AT90USB162__)  || defined(__AVR_AT90USB82__))\r
+                               #define USB_LIMITED_CONTROLLER\r
+                       #elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))\r
+                               #define USB_MODIFIED_FULL_CONTROLLER\r
+                       #else\r
+                               #define USB_FULL_CONTROLLER\r
+                       #endif                  \r
+\r
+                       #if (!defined(USB_DEVICE_ONLY) && !defined(USB_HOST_ONLY))\r
+                               #define USB_CAN_BE_BOTH\r
+                               #define USB_CAN_BE_HOST\r
+                               #define USB_CAN_BE_DEVICE\r
+                       #elif defined(USB_HOST_ONLY)\r
+                               #define USB_CAN_BE_HOST\r
+                               #define USB_CurrentMode USB_MODE_HOST\r
+                       #elif defined(USB_DEVICE_ONLY)\r
+                               #define USB_CAN_BE_DEVICE\r
+                               #define USB_CurrentMode USB_MODE_DEVICE\r
+                       #endif\r
+                       \r
+                       #if (defined(USB_HOST_ONLY) && defined(USB_DEVICE_ONLY))\r
+                               #error USB_HOST_ONLY and USB_DEVICE_ONLY are mutually exclusive.\r
+                       #endif\r
+\r
+                       #if (defined(USB_RAM_DESCRIPTORS) && defined(USE_EEPROM_DESCRIPTORS))\r
+                               #error USB_RAM_DESCRIPTORS and USE_EEPROM_DESCRIPTORS are mutually exclusive.\r
+                       #endif\r
+\r
+                       #if defined(USE_STATIC_OPTIONS)\r
+                               #define USB_Options USE_STATIC_OPTIONS\r
+                       #endif\r
+       #endif\r
+       \r
+#endif\r