]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/flash.c
Removing windows specific code. Everything now compile and work the same for the...
[proxmark3-svn] / client / flash.c
index b4e4c8918b21e82df6ad8638ff005ae4f685f21d..68d3b097000fb503b24e1377e13bdf12abfe8386 100644 (file)
@@ -1,14 +1,8 @@
-#ifdef WIN32
-#include <windows.h>
-#include <setupapi.h>
-#define bzero(b,len) (memset((b), '\0', (len)), (void) 0)
-BOOL UsbConnect(void);
-#endif
-#include <proxusb.h>
-
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#include "sleep.h"
+#include "proxusb.h"
 #include "flash.h"
 #include "elf.h"
 
 #include "flash.h"
 #include "elf.h"
 
@@ -194,7 +188,7 @@ unsigned int EnterFlashState(void)
   if (state & DEVICE_INFO_FLAG_CURRENT_MODE_OS) {
     fprintf(stderr,"Entering flash-mode...\n");
     UsbCommand c;
   if (state & DEVICE_INFO_FLAG_CURRENT_MODE_OS) {
     fprintf(stderr,"Entering flash-mode...\n");
     UsbCommand c;
-    bzero(&c, sizeof(c));
+    memset(&c, 0, sizeof (c));
 
     if ((state & DEVICE_INFO_FLAG_BOOTROM_PRESENT) && (state & DEVICE_INFO_FLAG_OSIMAGE_PRESENT)) {
       /* New style handover: Send CMD_START_FLASH, which will reset the board and
 
     if ((state & DEVICE_INFO_FLAG_BOOTROM_PRESENT) && (state & DEVICE_INFO_FLAG_OSIMAGE_PRESENT)) {
       /* New style handover: Send CMD_START_FLASH, which will reset the board and
@@ -212,15 +206,10 @@ unsigned int EnterFlashState(void)
       fprintf(stderr,"Waiting for Proxmark to reappear on USB... ");
     }
 
       fprintf(stderr,"Waiting for Proxmark to reappear on USB... ");
     }
 
-#ifdef WIN32
-    Sleep(1000);
-    while (!UsbConnect()) { Sleep(1000); }
-#else
     CloseProxmark();
     sleep(1);
 
     while (!OpenProxmark(0)) { sleep(1); }
     CloseProxmark();
     sleep(1);
 
     while (!OpenProxmark(0)) { sleep(1); }
-#endif
     fprintf(stderr,"Found.\n");
 
     return GetProxmarkState();
     fprintf(stderr,"Found.\n");
 
     return GetProxmarkState();
Impressum, Datenschutz