timeout reconfiguration: flag was never cleared and some more changes:

* clear newtimeout_pending flag
* fix initial newtimeout_pending flag value on win32
* remove all _atomic as anyway a load+clear wouldn't be atomic and we're not in a critical situation: just one writer seldomly called on reconnect
* move new timeout poll to uart_recv for faster deployment
* remove redundant uart_reconfigure_timeouts(UART_FPC_CLIENT_RX_TIMEOUT_MS);
This commit is contained in:
Philippe Teuwen 2019-05-16 12:35:40 +02:00
commit b5e4a60a15
3 changed files with 14 additions and 17 deletions

View file

@ -623,16 +623,13 @@ int TestProxmark(void) {
PrintAndLogEx(INFO, "Communicating with PM3 over %s", conn.send_via_fpc_usart ? _YELLOW_("FPC UART") : _YELLOW_("USB-CDC"));
int res;
if (conn.send_via_fpc_usart) {
PrintAndLogEx(INFO, "UART Serial baudrate: " _YELLOW_("%u") "\n", conn.uart_speed);
res = uart_reconfigure_timeouts(UART_FPC_CLIENT_RX_TIMEOUT_MS);
} else {
res = uart_reconfigure_timeouts(UART_USB_CLIENT_RX_TIMEOUT_MS);
}
if (res != PM3_SUCCESS) {
return res;
int res = uart_reconfigure_timeouts(UART_USB_CLIENT_RX_TIMEOUT_MS);
if (res != PM3_SUCCESS) {
return res;
}
}
return PM3_SUCCESS;
}