diff options
Diffstat (limited to 'Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c')
-rw-r--r-- | Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c b/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c index e0d71a0591..970df4f879 100644 --- a/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c +++ b/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c @@ -152,12 +152,9 @@ uint8_t SImage_RecieveBlockHeader(void) }
/* Check to see if the device was disconnected, if so exit function */
- if (!(USB_IsConnected))
- {
- /* Return error code */
- return PIPE_RWSTREAM_DeviceDisconnected;
- }
- };
+ if (USB_HostState == HOST_STATE_Unattached)
+ return PIPE_RWSTREAM_DeviceDisconnected;
+ }
/* Freeze OUT pipe after use */
Pipe_SelectPipe(SIMAGE_DATA_OUT_PIPE);
|