]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
flasher updated again, should work more solid now
authorroel@libnfc.org <roel@libnfc.org@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Thu, 21 Mar 2013 12:44:21 +0000 (12:44 +0000)
committerroel@libnfc.org <roel@libnfc.org@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Thu, 21 Mar 2013 12:44:21 +0000 (12:44 +0000)
client/flash.c
client/flasher.c

index 4af0dea82cc5b66a562c1492198c9076f3e57f4e..b59fff049f52777b134401576890cf4bb3434ee4 100644 (file)
@@ -337,14 +337,14 @@ static int enter_bootloader(void)
                        SendCommand(&c);
                        fprintf(stderr,"Press and hold down button NOW if your bootloader requires it.\n");
                }
-               fprintf(stderr,"Waiting for Proxmark to reappear on USB...");
-
+    msleep(100);
                CloseProxmark();
-               sleep(1);
-               while (!OpenProxmark(0)) {
+
+               fprintf(stderr,"Waiting for Proxmark to reappear on USB...");
+    do {
                        sleep(1);
                        fprintf(stderr, ".");
-               }
+               } while (!OpenProxmark(0));
                fprintf(stderr," Found.\n");
 
                return 0;
@@ -488,5 +488,6 @@ int flash_stop_flashing(void) {
        UsbCommand c = {CMD_HARDWARE_RESET};
 //     SendCommand_(&c);
   SendCommand(&c);
+  msleep(100);
   return 0;
 }
index d1efec5eebdba4f1f77fa060812ad1e136adf76e..cf2cdd954abac543f7f661bc693194677eb53201 100644 (file)
@@ -74,7 +74,6 @@ int OpenProxmark(size_t i) {
   sp = uart_open(serial_port_name);
   if (sp == INVALID_SERIAL_PORT) {
     //poll once a second
-    msleep(100);
     return 0;
   }
   return 1;
Impressum, Datenschutz