From dd3da571e252a07c3d830be78c72262deb29c21d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 10 Oct 2017 15:02:06 +0200 Subject: [PATCH] CHG: reverted back from a time-outed usb receive function --- uart/uart_posix.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/uart/uart_posix.c b/uart/uart_posix.c index 8d284140a..6c7580b67 100644 --- a/uart/uart_posix.c +++ b/uart/uart_posix.c @@ -128,7 +128,6 @@ serial_port uart_open(const char* pcPortName) } void uart_close(const serial_port sp) { - if (!sp) return; if (sp == INVALID_SERIAL_PORT) return; if (sp == CLAIMED_SERIAL_PORT) return; @@ -162,7 +161,7 @@ bool uart_receive(const serial_port sp, byte_t* pbtRx, size_t pszMaxRxLen, size_ int byteCount; fd_set rfds; struct timeval tv; - uint64_t timeout_at = msclock() + RECV_TOTAL_TIMEOUT_MS; + //uint64_t timeout_at = msclock() + RECV_TOTAL_TIMEOUT_MS; // Reset the output count *pszRxLen = 0; @@ -212,8 +211,8 @@ bool uart_receive(const serial_port sp, byte_t* pbtRx, size_t pszMaxRxLen, size_ return true; } -// } while (byteCount); - } while (msclock() < timeout_at); + } while (byteCount); +// } while (msclock() < timeout_at); return true; }