projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed StillImageHost not correctly freezing and unfreezing data pipes while waiting...
[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
970df4f
..
fbff2f4
100644
(file)
--- a/
Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c
+++ b/
Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c
@@
-127,7
+127,9
@@
uint8_t SImage_RecieveBlockHeader(void)
}
\r
}
\r
\r
}
\r
}
\r
\r
+ Pipe_Freeze();
\r
Pipe_SelectPipe(SIMAGE_DATA_OUT_PIPE);
\r
Pipe_SelectPipe(SIMAGE_DATA_OUT_PIPE);
\r
+ Pipe_Unfreeze();
\r
\r
/* Check if pipe stalled (command failed by device) */
\r
if (Pipe_IsStalled())
\r
\r
/* Check if pipe stalled (command failed by device) */
\r
if (Pipe_IsStalled())
\r
@@
-139,7
+141,9
@@
uint8_t SImage_RecieveBlockHeader(void)
return PIPE_RWSTREAM_PipeStalled;
\r
}
\r
\r
return PIPE_RWSTREAM_PipeStalled;
\r
}
\r
\r
+ Pipe_Freeze();
\r
Pipe_SelectPipe(SIMAGE_DATA_IN_PIPE);
\r
Pipe_SelectPipe(SIMAGE_DATA_IN_PIPE);
\r
+ Pipe_Unfreeze();
\r
\r
/* Check if pipe stalled (command failed by device) */
\r
if (Pipe_IsStalled())
\r
\r
/* Check if pipe stalled (command failed by device) */
\r
if (Pipe_IsStalled())
\r
@@
-155,14
+159,7
@@
uint8_t SImage_RecieveBlockHeader(void)
if (USB_HostState == HOST_STATE_Unattached)
\r
return PIPE_RWSTREAM_DeviceDisconnected;
\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
- Pipe_Freeze();
\r
-
\r
- /* Select the IN data pipe for data reception */
\r
- Pipe_SelectPipe(SIMAGE_DATA_IN_PIPE);
\r
-
\r
+
\r
/* Load in the response from the attached device */
\r
Pipe_Read_Stream_LE(&PIMA_ReceivedBlock, PIMA_COMMAND_SIZE(0));
\r
\r
/* Load in the response from the attached device */
\r
Pipe_Read_Stream_LE(&PIMA_ReceivedBlock, PIMA_COMMAND_SIZE(0));
\r
\r