aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/HighLevel/USBTask.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-05-07 05:30:19 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-05-07 05:30:19 +0000
commit526e398986583e2fb65c0a36a2fbf2ce153446e5 (patch)
treea8da94130fb3c52b5c15669e3fd67097bea19873 /LUFA/Drivers/USB/HighLevel/USBTask.c
parent2bd88ebc4f37baf81d550e79b3e3118b0843e61c (diff)
downloadlufa-526e398986583e2fb65c0a36a2fbf2ce153446e5.tar.gz
lufa-526e398986583e2fb65c0a36a2fbf2ce153446e5.tar.bz2
lufa-526e398986583e2fb65c0a36a2fbf2ce153446e5.zip
Fixed inability to enumerate any devices while in host mode (broken in a previous commit).
Diffstat (limited to 'LUFA/Drivers/USB/HighLevel/USBTask.c')
-rw-r--r--LUFA/Drivers/USB/HighLevel/USBTask.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.c b/LUFA/Drivers/USB/HighLevel/USBTask.c
index 738dc1592..5202cc834 100644
--- a/LUFA/Drivers/USB/HighLevel/USBTask.c
+++ b/LUFA/Drivers/USB/HighLevel/USBTask.c
@@ -83,12 +83,11 @@ static void USB_HostTask(void)
{
uint8_t ErrorCode = HOST_ENUMERROR_NoError;
uint8_t SubErrorCode = HOST_ENUMERROR_NoError;
+ uint8_t PrevPipe = Pipe_GetCurrentPipe();
static uint16_t WaitMSRemaining;
static uint8_t PostWaitState;
- uint8_t PrevPipe = Pipe_GetCurrentPipe();
-
Pipe_SelectPipe(PIPE_CONTROLPIPE);
switch (USB_HostState)
@@ -176,10 +175,10 @@ static void USB_HostTask(void)
.bRequest = REQ_GetDescriptor,
.wValue = (DTYPE_Device << 8),
.wIndex = 0,
- .wLength = PIPE_CONTROLPIPE_DEFAULT_SIZE,
+ .wLength = 8,
};
- uint8_t DataBuffer[PIPE_CONTROLPIPE_DEFAULT_SIZE];
+ uint8_t DataBuffer[8];
if ((SubErrorCode = USB_Host_SendControlRequest(DataBuffer)) != HOST_SENDCONTROL_Successful)
{