mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 22:23:38 -07:00
small refactoring
This commit is contained in:
parent
0ab6c7b9be
commit
1abc4144ee
1 changed files with 10 additions and 8 deletions
|
@ -271,15 +271,17 @@ int main(int argc, char* argv[]) {
|
||||||
set_my_executable_path();
|
set_my_executable_path();
|
||||||
|
|
||||||
// open uart
|
// open uart
|
||||||
int openCount = 0;
|
if (!waitCOMPort) {
|
||||||
do {
|
|
||||||
sp = uart_open(argv[1]);
|
sp = uart_open(argv[1]);
|
||||||
if (sp != INVALID_SERIAL_PORT && sp != CLAIMED_SERIAL_PORT)
|
} else {
|
||||||
break;
|
int openCount = 0;
|
||||||
msleep(1000);
|
do {
|
||||||
printf(".");
|
sp = uart_open(argv[1]);
|
||||||
} while(waitCOMPort && (++openCount < 20));
|
msleep(1000);
|
||||||
printf("\n");
|
printf(".");
|
||||||
|
} while(++openCount < 20 && (sp == INVALID_SERIAL_PORT || sp == CLAIMED_SERIAL_PORT));
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
// check result of uart opening
|
// check result of uart opening
|
||||||
if (sp == INVALID_SERIAL_PORT) {
|
if (sp == INVALID_SERIAL_PORT) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue