]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/usb.c
rename ReceiveCommandP -> ReceiveCommandPoll for consistency
[proxmark3-svn] / client / usb.c
index c326aeca76327de4493bfc06795078e657f374cc..e7573feafdad1c05eea39dc7766f3dd742d5f965 100644 (file)
@@ -1,11 +1,12 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
 #include <unistd.h>
 #include <usb.h>
 #include <strings.h>
 #include <errno.h>
 
-#include "translate.h"
 #include "prox.h"
 #include "proxmark3.h"
 
@@ -14,7 +15,7 @@ static unsigned int claimed_iface = 0;
 unsigned char return_on_error = 0;
 unsigned char error_occured = 0;
 
-void SendCommand(UsbCommand *c, BOOL wantAck) {
+void SendCommand(UsbCommand *c, bool wantAck) {
        int ret;
 
 #if 0
@@ -50,7 +51,7 @@ void SendCommand(UsbCommand *c, BOOL wantAck) {
        }
 }
 
-int ReceiveCommandP(UsbCommand *c) {
+bool ReceiveCommandPoll(UsbCommand *c) {
        int ret;
 
        bzero(c, sizeof(UsbCommand));
@@ -95,11 +96,11 @@ int ReceiveCommandP(UsbCommand *c) {
 #endif
        }
 
-       return ret;
+       return ret > 0;
 }
 
 void ReceiveCommand(UsbCommand *c) {
-       while(ReceiveCommandP(c)<0) {}
+       while(!ReceiveCommandPoll(c)) {}
 }
 
 usb_dev_handle* findProxmark(int verbose, unsigned int *iface) {
Impressum, Datenschutz