aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-04-28 07:48:26 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-04-28 07:48:26 +0000
commit59c4871f8011247a056f6ca2ca8aca89000e3841 (patch)
treeb26bb76882e9cca644ba0083bcc1c9ea50511463 /LUFA
parent85aaaf84ce14568580a35c31e22062ba529b49fe (diff)
downloadlufa-59c4871f8011247a056f6ca2ca8aca89000e3841.tar.gz
lufa-59c4871f8011247a056f6ca2ca8aca89000e3841.tar.bz2
lufa-59c4871f8011247a056f6ca2ca8aca89000e3841.zip
USB_Init() no longer calls sei() to enable global interrupts - this must now be done in the user application once all init code has run.
Diffstat (limited to 'LUFA')
-rw-r--r--LUFA/Drivers/USB/LowLevel/LowLevel.c2
-rw-r--r--LUFA/Drivers/USB/LowLevel/LowLevel.h8
-rw-r--r--LUFA/ManPages/ChangeLog.txt1
-rw-r--r--LUFA/ManPages/MigrationInformation.txt12
4 files changed, 19 insertions, 4 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.c b/LUFA/Drivers/USB/LowLevel/LowLevel.c
index c9d0493b4..a088654f7 100644
--- a/LUFA/Drivers/USB/LowLevel/LowLevel.c
+++ b/LUFA/Drivers/USB/LowLevel/LowLevel.c
@@ -103,8 +103,6 @@ void USB_Init(
#endif
USB_IsInitialized = true;
-
- sei();
}
void USB_ShutDown(void)
diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.h b/LUFA/Drivers/USB/LowLevel/LowLevel.h
index 79261cd44..337a004a5 100644
--- a/LUFA/Drivers/USB/LowLevel/LowLevel.h
+++ b/LUFA/Drivers/USB/LowLevel/LowLevel.h
@@ -236,8 +236,12 @@
* allow for device connection to a host when in device mode, or for device enumeration while in
* host mode.
*
- * As the USB library relies on USB interrupts for some of its functionality, this routine will
- * enable global interrupts.
+ * As the USB library relies on interrupts for the device and host mode enumeration processes,
+ * the user must enable global interrupts before or shortly after this function is called. In
+ * device mode, interrupts must be enabled within 500ms of this function being called to ensure
+ * that the host does not time out whilst enumerating the device. In host mode, interrupts may be
+ * enabled at the application's leisure however enumeration will not begin of an attached device
+ * until after this has occurred.
*
* Calling this function when the USB interface is already initialized will cause a complete USB
* interface reset and re-enumeration.
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt
index 425cb4372..2a772b880 100644
--- a/LUFA/ManPages/ChangeLog.txt
+++ b/LUFA/ManPages/ChangeLog.txt
@@ -28,6 +28,7 @@
* - Added LIBUSB_FILTERDRV_COMPAT compile time option to the AVRISP programmer project to make the code compatible with Windows
* builds of avrdude at the expense of AVRStudio compatibility
* - Removed two-step endpoint/pipe bank clear and switch sequence for smaller, faster endpoint/pipe code
+ * - The USB_Init() function no longer calls sei() - the user is now responsible for enabling interrupts when they are ready
*
* <b>Fixed:</b>
* - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin
diff --git a/LUFA/ManPages/MigrationInformation.txt b/LUFA/ManPages/MigrationInformation.txt
index 8467e0019..baed50987 100644
--- a/LUFA/ManPages/MigrationInformation.txt
+++ b/LUFA/ManPages/MigrationInformation.txt
@@ -16,6 +16,18 @@
* - The \ref TWI_StartTransmission() function now takes in a timeout period, expressed in milliseconds, within which the addressed
* device must respond or the function will abort.
*
+ * <b>Device Mode</b>
+ * - The \ref USB_Init() function no longer calls sei() to enable global interrupts, as the user application may need
+ * to perform other initialization before it is ready to handle global interrupts. The user application is now responsible
+ * for enabling global interrupts before or shortly after calling \ref USB_Init() to ensure that the enumeration process
+ * functions correctly.
+ *
+ * <b>Host Mode</b>
+ * - The \ref USB_Init() function no longer calls sei() to enable global interrupts, as the user application may need
+ * to perform other initialization before it is ready to handle global interrupts. The user application is now responsible
+ * for enabling global interrupts before or shortly after calling \ref USB_Init() to ensure that the enumeration process
+ * functions correctly.
+ *
* \section Sec_Migration100219 Migrating from 091223 to 100219
*
* <b>Non-USB Library Components</b>