aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-03-31 11:56:00 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-03-31 11:56:00 +0000
commitfa85c5e4169c27cb76c24e89cab63c2b062739c4 (patch)
tree04f4abb5599360bec4452ec210f9f4d151fb4743
parent3aa8620a61cea8676c74b5e61527ab273f13ec70 (diff)
downloadlufa-fa85c5e4169c27cb76c24e89cab63c2b062739c4.tar.gz
lufa-fa85c5e4169c27cb76c24e89cab63c2b062739c4.tar.bz2
lufa-fa85c5e4169c27cb76c24e89cab63c2b062739c4.zip
Commit for the 090401 release.
-rw-r--r--LUFA/ChangeLog.txt2
-rw-r--r--LUFA/Doxygen.conf2
-rw-r--r--LUFA/Drivers/USB/HighLevel/USBTask.c2
-rw-r--r--LUFA/Drivers/USB/LowLevel/LowLevel.h53
-rw-r--r--LUFA/Drivers/USB/LowLevel/Pipe.c4
-rw-r--r--LUFA/Drivers/USB/LowLevel/StreamCallbacks.h2
-rw-r--r--LUFA/MigrationInformation.txt2
7 files changed, 37 insertions, 30 deletions
diff --git a/LUFA/ChangeLog.txt b/LUFA/ChangeLog.txt
index fac212019..de0e5abde 100644
--- a/LUFA/ChangeLog.txt
+++ b/LUFA/ChangeLog.txt
@@ -6,7 +6,7 @@
/** \page Page_ChangeLog Project Changelog
*
- * \section Sec_ChangeLogXXXXXX Version XXXXXX
+ * \section Sec_ChangeLog090401 Version 090401
*
* - Fixed MagStripe project configuration descriptor containing an unused (blank) endpoint descriptor
* - Incorporated makefile changes by Denver Gingerich to retain compatibility with stock (non-WinAVR) AVR-GCC installations
diff --git a/LUFA/Doxygen.conf b/LUFA/Doxygen.conf
index 7cb1c71e5..cc4a6e2de 100644
--- a/LUFA/Doxygen.conf
+++ b/LUFA/Doxygen.conf
@@ -31,7 +31,7 @@ PROJECT_NAME = "LUFA Library"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 000000
+PROJECT_NUMBER = 090401
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.c b/LUFA/Drivers/USB/HighLevel/USBTask.c
index 69670232b..c58e237e3 100644
--- a/LUFA/Drivers/USB/HighLevel/USBTask.c
+++ b/LUFA/Drivers/USB/HighLevel/USBTask.c
@@ -94,7 +94,7 @@ static void USB_HostTask(void)
if ((SubErrorCode = USB_Host_WaitMS(1)) != HOST_WAITERROR_Successful)
{
USB_HostState = PostWaitState;
- ErrorCode = HOST_ENUMERROR_WaitStage;
+ ErrorCode = HOST_ENUMERROR_WaitStage;
break;
}
diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.h b/LUFA/Drivers/USB/LowLevel/LowLevel.h
index 98deaaca1..253d0180e 100644
--- a/LUFA/Drivers/USB/LowLevel/LowLevel.h
+++ b/LUFA/Drivers/USB/LowLevel/LowLevel.h
@@ -109,20 +109,24 @@
*/
#define USB_MODE_DEVICE 1
- /** Mode mask for the USB_CurrentMode global and the USB_Init() function. This indicates that the
- * USB interface is or should be initialized in the USB host mode.
- *
- * \note Not all USB AVRs support host mode.
- */
- #define USB_MODE_HOST 2
-
- /** Mode mask for the the USB_Init() function. This indicates that the USB interface should be
- * initialized into whatever mode the UID pin of the USB AVR indicates, and that the device
- * should swap over its mode when the level of the UID pin changes during operation.
- *
- * \note Not all USB AVRs support host mode, and thus UID mode.
- */
- #define USB_MODE_UID 3
+ #if defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__)
+ /** Mode mask for the USB_CurrentMode global and the USB_Init() function. This indicates that the
+ * USB interface is or should be initialized in the USB host mode.
+ *
+ * \note This token is not available on AVR models which do not support host mode.
+ */
+ #define USB_MODE_HOST 2
+ #endif
+
+ #if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
+ /** Mode mask for the the USB_Init() function. This indicates that the USB interface should be
+ * initialized into whatever mode the UID pin of the USB AVR indicates, and that the device
+ * should swap over its mode when the level of the UID pin changes during operation.
+ *
+ * \note This token is not available on AVR models which do not support both host and device modes.
+ */
+ #define USB_MODE_UID 3
+ #endif
/** Regulator disable option mask for USB_Init(). This indicates that the internal 3.3V USB data pad
* regulator should be enabled to regulate the data pin voltages to within the USB standard.
@@ -181,10 +185,14 @@
*/
#define EP_TYPE_MASK 0b11
- /** Returns boolean true if the VBUS line is currently high (i.e. the USB host is supplying power),
- * otherwise returns false.
- */
- #define USB_VBUS_GetStatus() ((USBSTA & (1 << VBUS)) ? true : false)
+ #if defined(USB_FULL_CONTROLLER) || defined(USB_MODIFIED_FULL_CONTROLLER) || defined(__DOXYGEN__)
+ /** Returns boolean true if the VBUS line is currently high (i.e. the USB host is supplying power),
+ * otherwise returns false.
+ *
+ * \note This token is not available on some AVR models which do not support hardware VBUS monitoring.
+ */
+ #define USB_VBUS_GetStatus() ((USBSTA & (1 << VBUS)) ? true : false)
+ #endif
/** Detaches the device from the USB bus. This has the effect of removing the device from any
* host if, ceasing USB communications. If no host is present, this prevents any host from
@@ -353,19 +361,18 @@
#define USB_Interface_Reset() MACROS{ uint8_t Temp = USBCON; USBCON = (Temp & ~(1 << USBE)); \
USBCON = (Temp | (1 << USBE)); }MACROE
- /* Inline Functions: */
+ /* Inline Functions: */
+ #if defined(USB_CAN_BE_BOTH)
static inline uint8_t USB_GetUSBModeFromUID(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t USB_GetUSBModeFromUID(void)
{
- #if (defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__))
if (USBSTA & (1 << ID))
return USB_MODE_DEVICE;
else
return USB_MODE_HOST;
- #else
- return USB_MODE_DEVICE;
- #endif
}
+ #endif
+
#endif
/* Disable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.c b/LUFA/Drivers/USB/LowLevel/Pipe.c
index 496df33de..1bc08e1fb 100644
--- a/LUFA/Drivers/USB/LowLevel/Pipe.c
+++ b/LUFA/Drivers/USB/LowLevel/Pipe.c
@@ -190,7 +190,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length
}
uint8_t Pipe_Read_Stream_LE(void* Buffer, uint16_t Length
- #if !defined(NO_STREAM_CALLBACKS)
+#if !defined(NO_STREAM_CALLBACKS)
, uint8_t (* const Callback)(void)
#endif
)
@@ -223,7 +223,7 @@ uint8_t Pipe_Read_Stream_LE(void* Buffer, uint16_t Length
}
uint8_t Pipe_Read_Stream_BE(void* Buffer, uint16_t Length
- #if !defined(NO_STREAM_CALLBACKS)
+#if !defined(NO_STREAM_CALLBACKS)
, uint8_t (* const Callback)(void)
#endif
)
diff --git a/LUFA/Drivers/USB/LowLevel/StreamCallbacks.h b/LUFA/Drivers/USB/LowLevel/StreamCallbacks.h
index 891f2f5bc..5c2dad637 100644
--- a/LUFA/Drivers/USB/LowLevel/StreamCallbacks.h
+++ b/LUFA/Drivers/USB/LowLevel/StreamCallbacks.h
@@ -48,7 +48,7 @@
* Stream callback functions should return a value from the StreamCallback_Return_ErrorCodes_t
* enum.
*
- * Usage Example (Device Endpoint, but applicable for Host pipes also):
+ * Usage Example (Device Endpoint, but applicable for Host Pipes also):
* \code
* STREAM_CALLBACK(GlobalNotSet); // Callback Prototype
*
diff --git a/LUFA/MigrationInformation.txt b/LUFA/MigrationInformation.txt
index cf104474f..e60958f30 100644
--- a/LUFA/MigrationInformation.txt
+++ b/LUFA/MigrationInformation.txt
@@ -10,7 +10,7 @@
* to the next version released. It does not indicate all new additions to the library in each version change, only
* areas relevant to making older projects compatible with the API changes of each new release.
*
- * \section Sec_MigrationXXXXXX Migrating from 090209 to XXXXXX
+ * \section Sec_Migration090401 Migrating from 090209 to 090401
*
* <b>All</b>
* - LUFA projects must now give the raw input clock frequency (before any prescaling) as a compile time constant "F_CLOCK",