diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-09-01 13:35:30 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-09-01 13:35:30 +0000 |
| commit | 7842c440a307c8847f4d3295d76d13df057fd4b8 (patch) | |
| tree | 570754562965cf412f860c8ccfff67bb53b0ee34 /Demos/Host/LowLevel/StillImageHost/Lib | |
| parent | f08dda5536738a882927b6071fbea70e4979f505 (diff) | |
Fixed StillImageHost not correctly freezing and unfreezing data pipes while waiting for a response block header.
Added basic PIMA commands to the StillImage Host Class driver - need to extend to PIMA specific command functions.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@803 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Host/LowLevel/StillImageHost/Lib')
| -rw-r--r-- | Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c b/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c index 970df4f8..fbff2f48 100644 --- 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) }
}
+ Pipe_Freeze();
Pipe_SelectPipe(SIMAGE_DATA_OUT_PIPE);
+ Pipe_Unfreeze();
/* Check if pipe stalled (command failed by device) */
if (Pipe_IsStalled())
@@ -139,7 +141,9 @@ uint8_t SImage_RecieveBlockHeader(void) return PIPE_RWSTREAM_PipeStalled;
}
+ Pipe_Freeze();
Pipe_SelectPipe(SIMAGE_DATA_IN_PIPE);
+ Pipe_Unfreeze();
/* Check if pipe stalled (command failed by device) */
if (Pipe_IsStalled())
@@ -155,14 +159,7 @@ uint8_t SImage_RecieveBlockHeader(void) if (USB_HostState == HOST_STATE_Unattached)
return PIPE_RWSTREAM_DeviceDisconnected;
}
-
- /* Freeze OUT pipe after use */
- Pipe_SelectPipe(SIMAGE_DATA_OUT_PIPE);
- Pipe_Freeze();
-
- /* Select the IN data pipe for data reception */
- Pipe_SelectPipe(SIMAGE_DATA_IN_PIPE);
-
+
/* Load in the response from the attached device */
Pipe_Read_Stream_LE(&PIMA_ReceivedBlock, PIMA_COMMAND_SIZE(0));
|
