diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-07-20 10:19:13 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-07-20 10:19:13 +0000 |
commit | f3c061d5c8ef95a0bd2ec829cc1d7461af94a845 (patch) | |
tree | a65ba678fbd7c82ccef396bea49d71fcd58d6ca6 /LUFA/Drivers/USB/LowLevel/HostChapter9.c | |
parent | 211712d66d6949941141964341bb937bf1422636 (diff) | |
download | lufa-f3c061d5c8ef95a0bd2ec829cc1d7461af94a845.tar.gz lufa-f3c061d5c8ef95a0bd2ec829cc1d7461af94a845.tar.bz2 lufa-f3c061d5c8ef95a0bd2ec829cc1d7461af94a845.zip |
Fixed PrinterHost demo Printer_GetDeviceID() routine not removing the Device ID string length from the start of the returned array (thanks to John Andrews).
Fixed error in new pipe stream function template system not setting the right device token for R/W operations (also thanks to John Andrews).
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/HostChapter9.c')
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/HostChapter9.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/HostChapter9.c b/LUFA/Drivers/USB/LowLevel/HostChapter9.c index a271c06cb..42e3262ff 100644 --- a/LUFA/Drivers/USB/LowLevel/HostChapter9.c +++ b/LUFA/Drivers/USB/LowLevel/HostChapter9.c @@ -58,7 +58,7 @@ uint8_t USB_Host_SendControlRequest(void* BufferPtr) Pipe_ClearSETUP();
- if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_SetupSent)))
+ if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_SetupSent)) != HOST_SENDCONTROL_Successful)
goto End_Of_Control_Send;
Pipe_Freeze();
@@ -76,7 +76,7 @@ uint8_t USB_Host_SendControlRequest(void* BufferPtr) {
Pipe_Unfreeze();
- if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_InReceived)))
+ if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_InReceived)) != HOST_SENDCONTROL_Successful)
goto End_Of_Control_Send;
if (!(Pipe_BytesInPipe()))
@@ -96,12 +96,12 @@ uint8_t USB_Host_SendControlRequest(void* BufferPtr) Pipe_SetToken(PIPE_TOKEN_OUT);
Pipe_Unfreeze();
- if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)))
+ if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)) != HOST_SENDCONTROL_Successful)
goto End_Of_Control_Send;
Pipe_ClearOUT();
- if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)))
+ if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)) != HOST_SENDCONTROL_Successful)
goto End_Of_Control_Send;
}
else
@@ -113,7 +113,7 @@ uint8_t USB_Host_SendControlRequest(void* BufferPtr) while (DataLen)
{
- if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)))
+ if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)) != HOST_SENDCONTROL_Successful)
goto End_Of_Control_Send;
while (DataLen && (Pipe_BytesInPipe() < USB_ControlPipeSize))
@@ -125,7 +125,7 @@ uint8_t USB_Host_SendControlRequest(void* BufferPtr) Pipe_ClearOUT();
}
- if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)))
+ if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)) != HOST_SENDCONTROL_Successful)
goto End_Of_Control_Send;
Pipe_Freeze();
@@ -134,7 +134,7 @@ uint8_t USB_Host_SendControlRequest(void* BufferPtr) Pipe_SetToken(PIPE_TOKEN_IN);
Pipe_Unfreeze();
- if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_InReceived)))
+ if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_InReceived)) != HOST_SENDCONTROL_Successful)
goto End_Of_Control_Send;
Pipe_ClearIN();
|