Also set the serial port as blocking

This commit is contained in:
2017-12-13 22:23:07 +01:00
parent feb1bf4184
commit bf1c94092d
4 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ void CloseProxmark() {
int OpenProxmark(size_t i) {
sp = uart_open(serial_port_name);
if (sp == INVALID_SERIAL_PORT || sp == CLAIMED_SERIAL_PORT) {
if (sp == INVALID_SERIAL_PORT || sp == CLAIMED_SERIAL_PORT || sp == NONBLOCKING_SERIAL_PORT) {
//poll once a second
return 0;
}
+1 -1
View File
@@ -362,7 +362,7 @@ int main(int argc, char* argv[]) {
msleep(1000);
printf(".");
fflush(stdout);
} while(++openCount < 20 && (sp == INVALID_SERIAL_PORT || sp == CLAIMED_SERIAL_PORT));
} while(++openCount < 20 && (sp == INVALID_SERIAL_PORT || sp == CLAIMED_SERIAL_PORT || sp == NONBLOCKING_SERIAL_PORT));
printf("\n");
}