projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added new USB_DeviceState variable to keep track of the current Device mode USB state.
[pub/USBasp.git]
/
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
e0d71a0
..
970df4f
100644
(file)
--- 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)
}
\r
\r
/* Check to see if the device was disconnected, if so exit function */
\r
}
\r
\r
/* Check to see if the device was disconnected, if so exit function */
\r
- if (!(USB_IsConnected))
\r
- {
\r
- /* Return error code */
\r
- return PIPE_RWSTREAM_DeviceDisconnected;
\r
- }
\r
- };
\r
+ if (USB_HostState == HOST_STATE_Unattached)
\r
+ return PIPE_RWSTREAM_DeviceDisconnected;
\r
+ }
\r
\r
/* Freeze OUT pipe after use */
\r
Pipe_SelectPipe(SIMAGE_DATA_OUT_PIPE);
\r
\r
/* Freeze OUT pipe after use */
\r
Pipe_SelectPipe(SIMAGE_DATA_OUT_PIPE);
\r