Flush stdout when waiting for /dev/ttyACM0

This commit is contained in:
Philippe Teuwen 2017-10-24 14:10:52 +02:00
parent 23af9327a5
commit 8a50d60617

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");
}