Automated upgrades SendCommandOLD/MIX 0,0,0,NULL,0 -> NG and SendCommandOLD ....,NULL,0 -> MIX

This commit is contained in:
Philippe Teuwen 2019-05-07 19:51:33 +02:00
commit 290f2b625b
43 changed files with 144 additions and 144 deletions

View file

@ -389,7 +389,7 @@ int AskEm410xDemod(const char *Cmd, uint32_t *hi, uint64_t *lo, bool verbose) {
static int CmdEM410xRead_device(const char *Cmd) {
char cmdp = tolower(param_getchar(Cmd, 0));
uint8_t findone = (cmdp == '1') ? 1 : 0;
SendCommandOLD(CMD_EM410X_DEMOD, findone, 0, 0, NULL, 0);
SendCommandMIX(CMD_EM410X_DEMOD, findone, 0, 0, NULL, 0);
return 0;
}
*/
@ -647,7 +647,7 @@ static int CmdEM410xWrite(const char *Cmd) {
return 0;
}
SendCommandOLD(CMD_EM410X_WRITE_TAG, card, (uint32_t)(id >> 32), (uint32_t)id, NULL, 0);
SendCommandMIX(CMD_EM410X_WRITE_TAG, card, (uint32_t)(id >> 32), (uint32_t)id, NULL, 0);
return 0;
}
@ -1126,7 +1126,7 @@ static bool demodEM4x05resp(uint32_t *word) {
//////////////// 4205 / 4305 commands
static int EM4x05ReadWord_ext(uint8_t addr, uint32_t pwd, bool usePwd, uint32_t *word) {
clearCommandBuffer();
SendCommandOLD(CMD_EM4X_READ_WORD, addr, pwd, usePwd, NULL, 0);
SendCommandMIX(CMD_EM4X_READ_WORD, addr, pwd, usePwd, NULL, 0);
PacketResponseNG resp;
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) {
PrintAndLogEx(DEBUG, "timeout while waiting for reply.");
@ -1228,7 +1228,7 @@ static int CmdEM4x05Write(const char *Cmd) {
uint16_t flag = (addr << 8) | (usePwd);
clearCommandBuffer();
SendCommandOLD(CMD_EM4X_WRITE_WORD, flag, data, pwd, NULL, 0);
SendCommandMIX(CMD_EM4X_WRITE_WORD, flag, data, pwd, NULL, 0);
PacketResponseNG resp;
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2000)) {
PrintAndLogEx(WARNING, "Error occurred, device did not respond during write operation.");