From e110a78de74ee278896c0f7ae13d364841a3c817 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Mon, 14 Feb 2011 13:24:42 +0000 Subject: [PATCH] uart: do not reload static timeout as it is already past (static timeout is used to compensate response delay) --- libnfc/buses/uart_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnfc/buses/uart_posix.c b/libnfc/buses/uart_posix.c index 8e664c9..88c90a5 100644 --- a/libnfc/buses/uart_posix.c +++ b/libnfc/buses/uart_posix.c @@ -262,7 +262,7 @@ uart_receive (serial_port sp, byte_t * pbtRx, size_t * pszRx) *pszRx += res; // Reload timeout with a low value to prevent from waiting too long on slow devices (16x is enought to took at least 1 byte) - tv.tv_usec = uiTimeoutStatic + uiTimeoutPerByte * MIN( iExpectedByteCount, 16 ); + tv.tv_usec = uiTimeoutPerByte * MIN( iExpectedByteCount, 16 ); // DBG("Timeout reloaded at: %d µs", tv.tv_usec); } while (byteCount && (iExpectedByteCount > 0));