X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/211712d66d6949941141964341bb937bf1422636..a459f10b0c1a3e02f160ff3a1a2a0b45ae5b69a7:/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c diff --git a/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c b/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c index e0d71a059..970df4f87 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);