diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-04-14 08:35:47 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-04-14 08:35:47 +0000 |
commit | 6a5a37d7d141f109dc02d0bb6d8f4757b533408d (patch) | |
tree | 6ec5a4528b25d8531d508348caa8f297d3aa5b1d /LUFA/Drivers/USB/HighLevel/USBTask.c | |
parent | fea5d085122bb386f1ec293b2e51036e29c7dc30 (diff) | |
download | lufa-6a5a37d7d141f109dc02d0bb6d8f4757b533408d.tar.gz lufa-6a5a37d7d141f109dc02d0bb6d8f4757b533408d.tar.bz2 lufa-6a5a37d7d141f109dc02d0bb6d8f4757b533408d.zip |
The USB_Host_SendControlRequest() function no longer automatically selects the Control pipe (pipe 0), so that other control type pipes can be used with the function.
The USB Host management task now saves and restores the currently selected pipe before and after the task completes.
Diffstat (limited to 'LUFA/Drivers/USB/HighLevel/USBTask.c')
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/USBTask.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.c b/LUFA/Drivers/USB/HighLevel/USBTask.c index 395f2d25e..e62ac687f 100644 --- a/LUFA/Drivers/USB/HighLevel/USBTask.c +++ b/LUFA/Drivers/USB/HighLevel/USBTask.c @@ -86,6 +86,10 @@ static void USB_HostTask(void) static uint16_t WaitMSRemaining;
static uint8_t PostWaitState;
+ uint8_t PrevPipe = Pipe_GetCurrentPipe();
+
+ Pipe_SelectPipe(PIPE_CONTROLPIPE);
+
switch (USB_HostState)
{
case HOST_STATE_WaitForDevice:
@@ -249,5 +253,7 @@ static void USB_HostTask(void) USB_ResetInterface();
}
+
+ Pipe_SelectPipe(PrevPipe);
}
#endif
|