mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 10:43:01 +08:00
chg: less fallbacks
This commit is contained in:
parent
6113d6bbb4
commit
7785dcbce4
1 changed files with 4 additions and 7 deletions
|
@ -106,17 +106,14 @@ serial_port uart_open(const char *pcPortName, uint32_t speed) {
|
|||
uart_reconfigure_timeouts(sp, UART_FPC_CLIENT_RX_TIMEOUT_MS);
|
||||
|
||||
if (!uart_set_speed(sp, speed)) {
|
||||
// trying some fallbacks automatically
|
||||
// try fallback automatically
|
||||
speed = 115200;
|
||||
if (!uart_set_speed(sp, speed)) {
|
||||
speed = 9600;
|
||||
if (!uart_set_speed(sp, speed)) {
|
||||
uart_close(sp);
|
||||
printf("[!] UART error while setting baudrate\n");
|
||||
return INVALID_SERIAL_PORT;
|
||||
}
|
||||
}
|
||||
}
|
||||
conn.uart_speed = uart_get_speed(sp);
|
||||
return sp;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue