From 33fac4a6a23b595a2a3cdfa76eddde98d48947b4 Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Mon, 9 Dec 2013 16:20:14 +0100 Subject: usb: dfu: f_dfu: Provide infrastructure to adjust DFU's Poll Timeout value It is necessary to deter the host from sending subsequent DFU_GETSTATUS request in the case of e.g. writing the buffer to medium. Here the timeout is increased when we fill up the whole buffer. This delay allows eMMC memory to perform its internal operations. Otherwise we end up with HOST's error regarding GET_STATUS receive timeout. Signed-off-by: Lukasz Majewski --- include/dfu.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/dfu.h b/include/dfu.h index 9a50721..f973426 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -77,6 +77,9 @@ static inline unsigned int get_mmc_blk_size(int dev) #ifndef CONFIG_SYS_DFU_MAX_FILE_SIZE #define CONFIG_SYS_DFU_MAX_FILE_SIZE CONFIG_SYS_DFU_DATA_BUF_SIZE #endif +#ifndef DFU_DEFAULT_POLL_TIMEOUT +#define DFU_DEFAULT_POLL_TIMEOUT 0 +#endif struct dfu_entity { char name[DFU_NAME_SIZE]; -- cgit v1.1