X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/b10a759fefc33673745dd65a6b4ba11af7cf8025..0de8e3874d6524379550a50a4d9c29faf2d239ea:/armsrc/mifarecmd.c diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 73fb8a5a..f63d754d 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -908,7 +908,8 @@ void MifareEMemClr(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain) void MifareEMemSet(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain){ FpgaDownloadAndGo(FPGA_BITSTREAM_HF); - emlSetMem(datain, arg0, arg1); // data, block num, blocks count + //emlSetMem(datain, arg0, arg1); // data, block num, blocks count + emlSetMem_xt(datain, arg0, arg1, arg2); // data, block num, blocks count, block byte width } void MifareEMemGet(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain){ @@ -1138,6 +1139,7 @@ void MifareCGetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai // bit 2 - need HALT after sequence // bit 3 - need init FPGA and field before sequence // bit 4 - need reset FPGA and LED + // bit 5 - need to set datain instead of issuing USB reply (called via ARM for StandAloneMode14a) uint8_t workFlags = arg0; uint8_t blockNo = arg2; @@ -1197,6 +1199,11 @@ void MifareCGetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai } LED_B_ON(); + if (workFlags & 0x20) { + if (isOK) + memcpy(datain, data, 18); + } + else cmd_send(CMD_ACK,isOK,0,0,data,18); LED_B_OFF();