From 59c4871f8011247a056f6ca2ca8aca89000e3841 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Wed, 28 Apr 2010 07:48:26 +0000 Subject: 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. --- LUFA/Drivers/USB/LowLevel/LowLevel.c | 2 -- LUFA/Drivers/USB/LowLevel/LowLevel.h | 8 ++++++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'LUFA/Drivers') 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. -- cgit v1.2.3