int CmdHFDESReader(const char *Cmd)
{
- UsbCommand c ={CMD_MIFARE_DES_READER, {3, 0x60, 0}};
+ UsbCommand c = { CMD_MIFARE_DES_READER, {3, 0x60, 0} };
SendCommand(&c);
-
UsbCommand resp;
- WaitForResponseTimeout(CMD_ACK,&resp,2000);
+ if (!WaitForResponseTimeout(CMD_ACK,&resp,2000) ){
+ PrintAndLog("Command time-out");
+ return 1;
+ }
return 0;
}
int CmdHFDES(const char *Cmd)
{
//flush
- WaitForResponseTimeout(CMD_ACK,NULL,100);
+ clearCommandBuffer();
+ //WaitForResponseTimeout(CMD_ACK,NULL,100);
CmdsParse(CommandTable, Cmd);
return 0;
}