Commit for the 090401 release.
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 31 Mar 2009 11:56:00 +0000 (11:56 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 31 Mar 2009 11:56:00 +0000 (11:56 +0000)
LUFA/ChangeLog.txt
LUFA/Doxygen.conf
LUFA/Drivers/USB/HighLevel/USBTask.c
LUFA/Drivers/USB/LowLevel/LowLevel.h
LUFA/Drivers/USB/LowLevel/Pipe.c
LUFA/Drivers/USB/LowLevel/StreamCallbacks.h
LUFA/MigrationInformation.txt

index fac2120..de0e5ab 100644 (file)
@@ -6,7 +6,7 @@
    \r
  /** \page Page_ChangeLog Project Changelog\r
   *\r
-  *  \section Sec_ChangeLogXXXXXX Version XXXXXX\r
+  *  \section Sec_ChangeLog090401 Version 090401\r
   *\r
   *  - Fixed MagStripe project configuration descriptor containing an unused (blank) endpoint descriptor\r
   *  - Incorporated makefile changes by Denver Gingerich to retain compatibility with stock (non-WinAVR) AVR-GCC installations\r
index 7cb1c71..cc4a6e2 100644 (file)
@@ -31,7 +31,7 @@ PROJECT_NAME           = "LUFA Library"
 # This could be handy for archiving the generated documentation or \r
 # if some version control system is used.\r
 \r
-PROJECT_NUMBER         = 000000\r
+PROJECT_NUMBER         = 090401\r
 \r
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) \r
 # base path where the generated documentation will be put. \r
index 6967023..c58e237 100644 (file)
@@ -94,7 +94,7 @@ static void USB_HostTask(void)
                                if ((SubErrorCode = USB_Host_WaitMS(1)) != HOST_WAITERROR_Successful)\r
                                {\r
                                        USB_HostState = PostWaitState;\r
-                                       ErrorCode    = HOST_ENUMERROR_WaitStage;\r
+                                       ErrorCode     = HOST_ENUMERROR_WaitStage;\r
                                        break;\r
                                }\r
                                \r
index 98deaac..253d018 100644 (file)
                         */\r
                        #define USB_MODE_DEVICE                    1\r
 \r
-                       /** Mode mask for the USB_CurrentMode global and the USB_Init() function. This indicates that the\r
-                        *  USB interface is or should be initialized in the USB host mode.\r
-                        *\r
-                        *  \note Not all USB AVRs support host mode.\r
-                        */\r
-                       #define USB_MODE_HOST                      2\r
-\r
-                       /** Mode mask for the the USB_Init() function. This indicates that the USB interface should be\r
-                        *  initialized into whatever mode the UID pin of the USB AVR indicates, and that the device\r
-                        *  should swap over its mode when the level of the UID pin changes during operation.\r
-                        *\r
-                        *  \note Not all USB AVRs support host mode, and thus UID mode.\r
-                        */\r
-                       #define USB_MODE_UID                       3\r
+                       #if defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__)\r
+                               /** Mode mask for the USB_CurrentMode global and the USB_Init() function. This indicates that the\r
+                                *  USB interface is or should be initialized in the USB host mode.\r
+                                *\r
+                                *  \note This token is not available on AVR models which do not support host mode.\r
+                                */\r
+                               #define USB_MODE_HOST                      2\r
+                       #endif\r
+                       \r
+                       #if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)\r
+                               /** Mode mask for the the USB_Init() function. This indicates that the USB interface should be\r
+                                *  initialized into whatever mode the UID pin of the USB AVR indicates, and that the device\r
+                                *  should swap over its mode when the level of the UID pin changes during operation.\r
+                                *\r
+                                *  \note This token is not available on AVR models which do not support both host and device modes.\r
+                                */\r
+                               #define USB_MODE_UID                       3\r
+                       #endif\r
                        \r
                        /** Regulator disable option mask for USB_Init(). This indicates that the internal 3.3V USB data pad\r
                         *  regulator should be enabled to regulate the data pin voltages to within the USB standard.\r
                         */\r
                        #define EP_TYPE_MASK                       0b11\r
 \r
-                       /** Returns boolean true if the VBUS line is currently high (i.e. the USB host is supplying power),\r
-                        *  otherwise returns false.\r
-                        */\r
-                       #define USB_VBUS_GetStatus()             ((USBSTA & (1 << VBUS)) ? true : false)\r
+                       #if defined(USB_FULL_CONTROLLER) || defined(USB_MODIFIED_FULL_CONTROLLER) || defined(__DOXYGEN__)\r
+                               /** Returns boolean true if the VBUS line is currently high (i.e. the USB host is supplying power),\r
+                                *  otherwise returns false.\r
+                                *\r
+                                *  \note This token is not available on some AVR models which do not support hardware VBUS monitoring.\r
+                                */\r
+                               #define USB_VBUS_GetStatus()             ((USBSTA & (1 << VBUS)) ? true : false)\r
+                       #endif\r
 \r
                        /** Detaches the device from the USB bus. This has the effect of removing the device from any\r
                         *  host if, ceasing USB communications. If no host is present, this prevents any host from\r
                        #define USB_Interface_Reset()      MACROS{ uint8_t Temp = USBCON; USBCON = (Temp & ~(1 << USBE)); \\r
                                                                   USBCON = (Temp | (1 << USBE));           }MACROE\r
        \r
-               /* Inline Functions: */         \r
+               /* Inline Functions: */\r
+                       #if defined(USB_CAN_BE_BOTH)\r
                        static inline uint8_t USB_GetUSBModeFromUID(void) ATTR_WARN_UNUSED_RESULT;\r
                        static inline uint8_t USB_GetUSBModeFromUID(void)\r
                        {\r
-                               #if (defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__))\r
                                if (USBSTA & (1 << ID))\r
                                  return USB_MODE_DEVICE;\r
                                else\r
                                  return USB_MODE_HOST;\r
-                               #else\r
-                               return USB_MODE_DEVICE;\r
-                               #endif\r
                        }\r
+                       #endif\r
+                       \r
        #endif\r
        \r
        /* Disable C linkage for C++ Compilers: */\r
index 496df33..1bc08e1 100644 (file)
@@ -190,7 +190,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length
 }\r
 \r
 uint8_t Pipe_Read_Stream_LE(void* Buffer, uint16_t Length\r
-                                                       #if !defined(NO_STREAM_CALLBACKS)\r
+#if !defined(NO_STREAM_CALLBACKS)\r
                                  , uint8_t (* const Callback)(void)\r
 #endif\r
                                                                 )\r
@@ -223,7 +223,7 @@ uint8_t Pipe_Read_Stream_LE(void* Buffer, uint16_t Length
 }\r
 \r
 uint8_t Pipe_Read_Stream_BE(void* Buffer, uint16_t Length\r
-                                                       #if !defined(NO_STREAM_CALLBACKS)\r
+#if !defined(NO_STREAM_CALLBACKS)\r
                                  , uint8_t (* const Callback)(void)\r
 #endif\r
                                                                 )\r
index 891f2f5..5c2dad6 100644 (file)
@@ -48,7 +48,7 @@
                         *  Stream callback functions should return a value from the StreamCallback_Return_ErrorCodes_t\r
                         *  enum.\r
                         *\r
-                        *  Usage Example (Device Endpoint, but applicable for Host pipes also):\r
+                        *  Usage Example (Device Endpoint, but applicable for Host Pipes also):\r
                         *  \code\r
                         *  STREAM_CALLBACK(GlobalNotSet); // Callback Prototype\r
                         *\r
index cf10447..e60958f 100644 (file)
@@ -10,7 +10,7 @@
  *  to the next version released. It does not indicate all new additions to the library in each version change, only\r
  *  areas relevant to making older projects compatible with the API changes of each new release.\r
  *\r
- * \section Sec_MigrationXXXXXX Migrating from 090209 to XXXXXX\r
+ * \section Sec_Migration090401 Migrating from 090209 to 090401\r
  *\r
  *  <b>All</b>\r
  *    - LUFA projects must now give the raw input clock frequency (before any prescaling) as a compile time constant "F_CLOCK",\r