#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"
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
}
}
-int ReceiveCommandP(UsbCommand *c) {
+bool ReceiveCommandPoll(UsbCommand *c) {
int ret;
bzero(c, sizeof(UsbCommand));
#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) {