Merge pull request #443 from doegox/flush

Flush stdout when waiting for /dev/ttyACM0
This commit is contained in:
Iceman 2017-10-24 14:28:16 +02:00 committed by GitHub
commit 5cc1ff44b4

View file

@ -355,11 +355,13 @@ int main(int argc, char* argv[]) {
sp = uart_open(argv[1]);
} else {
printf("Waiting for Proxmark to appear on %s ", argv[1]);
fflush(stdout);
int openCount = 0;
do {
sp = uart_open(argv[1]);
msleep(1000);
printf(".");
fflush(stdout);
} while(++openCount < 20 && (sp == INVALID_SERIAL_PORT || sp == CLAIMED_SERIAL_PORT));
printf("\n");
}