aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-04-15 13:34:11 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-04-15 13:34:11 +0000
commitb3d053ebfe82f180677265409a99eb43c7c3990a (patch)
tree2771598f466009d6eeba73aaa1aeb856786c2cbc /LUFA/Drivers
parente752ebe828275d582a995ea1b73d0bc631f9b8c2 (diff)
Fixed incorrect reponse to GET STATUS requests in device mode if NO_DEVICE_SELF_POWER or NO_DEVICE_REMOTE_WAKEUP tokens are defined (thanks to Georg Glock).
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2161 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers')
-rw-r--r--LUFA/Drivers/USB/Core/DeviceStandardReq.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/LUFA/Drivers/USB/Core/DeviceStandardReq.c b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
index 61082cfb..f5e1cca3 100644
--- a/LUFA/Drivers/USB/Core/DeviceStandardReq.c
+++ b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
@@ -289,7 +289,6 @@ static void USB_Device_GetStatus(void)
switch (USB_ControlRequest.bmRequestType)
{
- #if !defined(NO_DEVICE_SELF_POWER) || !defined(NO_DEVICE_REMOTE_WAKEUP)
case (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE):
#if !defined(NO_DEVICE_SELF_POWER)
if (USB_Device_CurrentlySelfPowered)
@@ -301,17 +300,16 @@ static void USB_Device_GetStatus(void)
CurrentStatus |= FEATURE_REMOTE_WAKEUP_ENABLED;
#endif
break;
- #endif
- #if !defined(CONTROL_ONLY_DEVICE)
case (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_ENDPOINT):
+ #if !defined(CONTROL_ONLY_DEVICE)
Endpoint_SelectEndpoint((uint8_t)USB_ControlRequest.wIndex & ENDPOINT_EPNUM_MASK);
CurrentStatus = Endpoint_IsStalled();
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
+ #endif
break;
- #endif
default:
return;
}