Check 30 seconds for USB port

This commit is contained in:
Lorenz Meier
2014-01-07 08:37:06 +01:00
parent 9886a384ff
commit f35e6efbca
+3 -1
View File
@@ -62,7 +62,9 @@ nshterm_main(int argc, char *argv[])
}
uint8_t retries = 0;
int fd = -1;
while (retries < 50) {
/* try the first 30 seconds */
while (retries < 300) {
/* the retries are to cope with the behaviour of /dev/ttyACM0 */
/* which may not be ready immediately. */
fd = open(argv[1], O_RDWR);