#include <stdio.h>
#include <stdlib.h>
+#include <inttypes.h>
#include <string.h>
#include <unistd.h>
#include "util.h"
PrintAndLog(" x0 -> <1 kByte");
break;
case 0x01:
- PrintAndLog(" x0 -> 1 kByte");
+ PrintAndLog(" x1 -> 1 kByte");
break;
case 0x02:
- PrintAndLog(" x0 -> 2 kByte");
+ PrintAndLog(" x2 -> 2 kByte");
break;
case 0x03:
- PrintAndLog(" x0 -> 4 kByte");
+ PrintAndLog(" x3 -> 4 kByte");
break;
case 0x04:
- PrintAndLog(" x0 -> 8 kByte");
+ PrintAndLog(" x4 -> 8 kByte");
break;
}
switch (card.ats[pos + 3] & 0xf0) {
// Are we handling the (optional) second part uid?
if (long_uid > 0xffffffff) {
- PrintAndLog("Emulating ISO/IEC 14443 type A tag with 7 byte UID (%014"llx")",long_uid);
+ PrintAndLog("Emulating ISO/IEC 14443 type A tag with 7 byte UID (%014" PRIx64 ")",long_uid);
// Store the second part
c.arg[2] = (long_uid & 0xffffffff);
long_uid >>= 32;
c.arg[2] = 13560000 / 1000 / (8*16) * timeout; // timeout in ETUs (time to transfer 1 bit, approx. 9.4 us)
}
- if(power)
+ if(power) {
c.arg[0] |= ISO14A_NO_DISCONNECT;
+ }
- if(datalen > 0)
+ if(datalen > 0) {
c.arg[0] |= ISO14A_RAW;
+ }
- if(topazmode)
+ if(topazmode) {
c.arg[0] |= ISO14A_TOPAZMODE;
+ }
// Max buffer is USB_CMD_DATA_SIZE
c.arg[1] = (datalen & 0xFFFF) | (numbits << 16);