X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/44179abcf85acb14fb3aff72ce50ae84281c0f2e..e071f3897a0946c6be1e1b5e1f78eda8dcbf6fc7:/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c?ds=sidebyside 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);