diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-03-15 08:07:29 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-03-15 08:07:29 +0000 |
commit | 134e018b21df179313c818ec63d6fcd2cce5e5e7 (patch) | |
tree | 33fbbf5f28b5b92fa2206327fa653cf48d270815 /LUFA/Drivers/USB/Core | |
parent | 95a1aa4c016829ebd7b641e8871ba123d36d49a4 (diff) | |
download | lufa-134e018b21df179313c818ec63d6fcd2cce5e5e7.tar.gz lufa-134e018b21df179313c818ec63d6fcd2cce5e5e7.tar.bz2 lufa-134e018b21df179313c818ec63d6fcd2cce5e5e7.zip |
Fixed Remote Wakeup broken on the AVRs due to the mechanism only operating when the SUSPI bit is set (thanks to Holger Steinhaus).
Remove redundant setting of UIDE in the AVR8 and AVR32 USB controller drivers.
Diffstat (limited to 'LUFA/Drivers/USB/Core')
-rw-r--r-- | LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/UC3/USBController_UC3.c | 8 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c | 2 |
4 files changed, 5 insertions, 10 deletions
diff --git a/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c index 8b4171138..27eabc3d4 100644 --- a/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c @@ -75,12 +75,13 @@ void USB_Init( #if defined(USB_CAN_BE_BOTH) if (Mode == USB_MODE_UID) { - UHWCON |= (1 << UIDE); + UHWCON |= (1 << UIDE); USB_INT_Enable(USB_INT_IDTI); USB_CurrentMode = USB_GetUSBModeFromUID(); } else { + UHWCON &= ~(1 << UIDE); USB_CurrentMode = Mode; } #endif diff --git a/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c index 856ccd626..89d60ebe0 100644 --- a/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c @@ -112,8 +112,6 @@ ISR(USB_GEN_vect, ISR_BLOCK) if (USB_INT_HasOccurred(USB_INT_SUSPI) && USB_INT_IsEnabled(USB_INT_SUSPI)) { - USB_INT_Clear(USB_INT_SUSPI); - USB_INT_Disable(USB_INT_SUSPI); USB_INT_Enable(USB_INT_WAKEUPI); diff --git a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c index 40ac381f6..a9ac2481c 100644 --- a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c +++ b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c @@ -117,10 +117,7 @@ void USB_ResetInterface(void) #if defined(USB_CAN_BE_BOTH)
if (UIDModeSelectEnabled)
- {
- AVR32_USBB.USBCON.uide = true;
- USB_INT_Enable(USB_INT_IDTI);
- }
+ USB_INT_Enable(USB_INT_IDTI);
#endif
USB_CLK_Unfreeze();
@@ -129,6 +126,7 @@ void USB_ResetInterface(void) {
#if defined(USB_CAN_BE_DEVICE)
AVR32_USBB.USBCON.uimod = true;
+
USB_Init_Device();
#endif
}
@@ -136,6 +134,7 @@ void USB_ResetInterface(void) {
#if defined(USB_CAN_BE_HOST)
AVR32_USBB.USBCON.uimod = false;
+
USB_Init_Host();
#endif
}
@@ -180,7 +179,6 @@ static void USB_Init_Device(void) USB_INT_Enable(USB_INT_EORSTI);
USB_Attach();
- USB_Device_SetDeviceAddress(0);
}
#endif
diff --git a/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c b/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c index aee8940e3..76f4ef022 100644 --- a/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c +++ b/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c @@ -79,8 +79,6 @@ ISR(USB_GEN_vect) if (USB_INT_HasOccurred(USB_INT_SUSPI) && USB_INT_IsEnabled(USB_INT_SUSPI))
{
- USB_INT_Clear(USB_INT_SUSPI);
-
USB_INT_Disable(USB_INT_SUSPI);
USB_INT_Enable(USB_INT_WAKEUPI);
|