mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-09 09:39:16 +08:00
Fix for USB uart slowness
See Proxmark#787
This commit is contained in:
parent
77eaa36093
commit
f05ab29c04
1 changed files with 6 additions and 2 deletions
|
@ -68,9 +68,9 @@ typedef struct {
|
||||||
} serial_port_unix;
|
} serial_port_unix;
|
||||||
|
|
||||||
// Set time-out on 30 miliseconds
|
// Set time-out on 30 miliseconds
|
||||||
const struct timeval timeout = {
|
struct timeval timeout = {
|
||||||
.tv_sec = 0, // 0 second
|
.tv_sec = 0, // 0 second
|
||||||
.tv_usec = 300000 // 300 000 micro seconds
|
.tv_usec = 30000 // 30000 micro seconds
|
||||||
};
|
};
|
||||||
|
|
||||||
serial_port uart_open(const char* pcPortName)
|
serial_port uart_open(const char* pcPortName)
|
||||||
|
@ -89,6 +89,10 @@ serial_port uart_open(const char* pcPortName)
|
||||||
|
|
||||||
char *colon = strrchr(addrstr, ':');
|
char *colon = strrchr(addrstr, ':');
|
||||||
char *portstr;
|
char *portstr;
|
||||||
|
|
||||||
|
// Set time-out to 300 miliseconds only for TCP port
|
||||||
|
timeout.tv_usec = 300000;
|
||||||
|
|
||||||
if (colon) {
|
if (colon) {
|
||||||
portstr = colon + 1;
|
portstr = colon + 1;
|
||||||
*colon = '\0';
|
*colon = '\0';
|
||||||
|
|
Loading…
Reference in a new issue