aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-03-03 08:19:06 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-03-03 08:19:06 +0000
commitea7039a0cc56e67affb6c69ddc56e7e4e3188d08 (patch)
tree0e5f5cde7d17afcb31f701ce07a3eb2275542003
parent99145a8d7c88d9af065cfb7f5e8507d5b65ff811 (diff)
downloadlufa-ea7039a0cc56e67affb6c69ddc56e7e4e3188d08.tar.gz
lufa-ea7039a0cc56e67affb6c69ddc56e7e4e3188d08.tar.bz2
lufa-ea7039a0cc56e67affb6c69ddc56e7e4e3188d08.zip
Changed stream wait timeout counter to be 16-bit, so that very long timeout periods can be set for correct communications with badly designed hosts or devices which greatly exceed the USB specification limits.
Mass Storage Host demo now uses a USB_STREAM_TIMEOUT_MS of two seconds to maintain compatibility with poorly designed devices.
-rw-r--r--Demos/MassStorageHost/MassStoreCommands.c5
-rw-r--r--Demos/MassStorageHost/makefile1
2 files changed, 4 insertions, 2 deletions
diff --git a/Demos/MassStorageHost/MassStoreCommands.c b/Demos/MassStorageHost/MassStoreCommands.c
index c4b315b0a..f4143adcf 100644
--- a/Demos/MassStorageHost/MassStoreCommands.c
+++ b/Demos/MassStorageHost/MassStoreCommands.c
@@ -41,8 +41,9 @@
* may be neccesary to retry the functions in the module several times
* after they have returned and error to successfully send the command
* to the device. Some devices may also need to have the stream function
- * timeout period extended beyond 100ms by defining USB_STREAM_TIMEOUT_MS
- * to a larger value in the project makefile and passing it to the compiler
+ * timeout period extended beyond 100ms (some badly designed devices exceeding
+ * 1.5 seconds occasionally) by defining USB_STREAM_TIMEOUT_MS to a
+ * larger value in the project makefile and passing it to the compiler
* via the -D switch.
*/
diff --git a/Demos/MassStorageHost/makefile b/Demos/MassStorageHost/makefile
index fb04798e8..2608b76bb 100644
--- a/Demos/MassStorageHost/makefile
+++ b/Demos/MassStorageHost/makefile
@@ -180,6 +180,7 @@ CSTANDARD = -std=gnu99
CDEFS = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD)
CDEFS += -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DNO_STREAM_CALLBACKS -DUSB_HOST_ONLY
CDEFS += -DUSE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
+CDEFS += -DUSB_STREAM_TIMEOUT_MS=2000
# Place -D or -U options here for ASM sources