From: roel@libnfc.org Date: Thu, 21 Mar 2013 12:44:21 +0000 (+0000) Subject: flasher updated again, should work more solid now X-Git-Tag: v1.0.0~120 X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/d8193fa5ac203dfd340d7f552b6d47d411013981 flasher updated again, should work more solid now --- diff --git a/client/flash.c b/client/flash.c index 4af0dea8..b59fff04 100644 --- a/client/flash.c +++ b/client/flash.c @@ -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; } diff --git a/client/flasher.c b/client/flasher.c index d1efec5e..cf2cdd95 100644 --- a/client/flasher.c +++ b/client/flasher.c @@ -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;