mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
chg: reverting tests
This commit is contained in:
parent
a41cdf803a
commit
85eb7c2cc6
2 changed files with 6 additions and 40 deletions
|
@ -122,29 +122,6 @@ void uart_close(const serial_port sp) {
|
|||
bool uart_receive(const serial_port sp, byte_t* pbtRx, size_t pszMaxRxLen, size_t* pszRxLen) {
|
||||
ReadFile(((serial_port_windows*)sp)->hPort, pbtRx, pszMaxRxLen, (LPDWORD)pszRxLen, NULL);
|
||||
return (*pszRxLen != 0);
|
||||
/*
|
||||
DWORD dwBytesToGet = (DWORD)pszMaxRxLen;
|
||||
DWORD dwBytesReceived = 0;
|
||||
DWORD dwTotalBytesReceived = 0;
|
||||
BOOL res;
|
||||
|
||||
do {
|
||||
res = ReadFile(((serial_port_windows *) sp)->hPort, pbtRx + dwTotalBytesReceived, dwBytesToGet, &dwBytesReceived, NULL);
|
||||
|
||||
dwTotalBytesReceived += dwBytesReceived;
|
||||
|
||||
if (!res)
|
||||
return false;
|
||||
else if (dwBytesReceived == 0)
|
||||
return false;
|
||||
|
||||
if (((DWORD)pszMaxRxLen) > dwTotalBytesReceived)
|
||||
dwBytesToGet -= dwBytesReceived;
|
||||
|
||||
} while (((DWORD)pszMaxRxLen) > dwTotalBytesReceived);
|
||||
|
||||
return (dwTotalBytesReceived == (DWORD) pszMaxRxLen);
|
||||
*/
|
||||
}
|
||||
|
||||
bool uart_send(const serial_port sp, const byte_t* pbtTx, const size_t szTxLen) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue