mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-29 03:43:23 +08:00
CHG: reverted back from a time-outed usb receive function
This commit is contained in:
parent
4e728dc0f9
commit
dd3da571e2
1 changed files with 3 additions and 4 deletions
|
@ -128,7 +128,6 @@ serial_port uart_open(const char* pcPortName)
|
||||||
}
|
}
|
||||||
|
|
||||||
void uart_close(const serial_port sp) {
|
void uart_close(const serial_port sp) {
|
||||||
if (!sp) return;
|
|
||||||
if (sp == INVALID_SERIAL_PORT) return;
|
if (sp == INVALID_SERIAL_PORT) return;
|
||||||
if (sp == CLAIMED_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;
|
int byteCount;
|
||||||
fd_set rfds;
|
fd_set rfds;
|
||||||
struct timeval tv;
|
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
|
// Reset the output count
|
||||||
*pszRxLen = 0;
|
*pszRxLen = 0;
|
||||||
|
@ -212,8 +211,8 @@ bool uart_receive(const serial_port sp, byte_t* pbtRx, size_t pszMaxRxLen, size_
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// } while (byteCount);
|
} while (byteCount);
|
||||||
} while (msclock() < timeout_at);
|
// } while (msclock() < timeout_at);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue