syntax sugar

This commit is contained in:
iceman1001 2017-01-18 22:57:20 +01:00
commit 7898d3b55f

View file

@ -250,15 +250,13 @@ int mfKeyBrute(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint64_t *resultk
return found; return found;
} }
// EMULATOR // EMULATOR
int mfEmlGetMem(uint8_t *data, int blockNum, int blocksCount) { int mfEmlGetMem(uint8_t *data, int blockNum, int blocksCount) {
UsbCommand c = {CMD_MIFARE_EML_MEMGET, {blockNum, blocksCount, 0}}; UsbCommand c = {CMD_MIFARE_EML_MEMGET, {blockNum, blocksCount, 0}};
clearCommandBuffer(); clearCommandBuffer();
SendCommand(&c); SendCommand(&c);
UsbCommand resp; UsbCommand resp;
if (!WaitForResponseTimeout(CMD_ACK,&resp,1500)) return 1; if (!WaitForResponseTimeout(CMD_ACK, &resp, 1500)) return 1;
memcpy(data, resp.d.asBytes, blocksCount * 16); memcpy(data, resp.d.asBytes, blocksCount * 16);
return 0; return 0;
} }