Rename few stuff for consistency

This commit is contained in:
Philippe Teuwen 2019-04-18 12:43:35 +02:00
commit 482db05741
83 changed files with 691 additions and 675 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;
UsbCommandOLD c = {CMD_EM410X_DEMOD, {findone, 0, 0}, {{0}}};
PacketCommandOLD c = {CMD_EM410X_DEMOD, {findone, 0, 0}, {{0}}};
SendCommand(&c);
return 0;
}
@ -648,7 +648,7 @@ static int CmdEM410xWrite(const char *Cmd) {
return 0;
}
UsbCommandOLD c = {CMD_EM410X_WRITE_TAG, {card, (uint32_t)(id >> 32), (uint32_t)id}, {{0}}};
PacketCommandOLD c = {CMD_EM410X_WRITE_TAG, {card, (uint32_t)(id >> 32), (uint32_t)id}, {{0}}};
SendCommand(&c);
return 0;
}
@ -1127,10 +1127,10 @@ static bool demodEM4x05resp(uint32_t *word) {
//////////////// 4205 / 4305 commands
static int EM4x05ReadWord_ext(uint8_t addr, uint32_t pwd, bool usePwd, uint32_t *word) {
UsbCommandOLD c = {CMD_EM4X_READ_WORD, {addr, pwd, usePwd}, {{0}}};
PacketCommandOLD c = {CMD_EM4X_READ_WORD, {addr, pwd, usePwd}, {{0}}};
clearCommandBuffer();
SendCommand(&c);
UsbReplyNG resp;
PacketResponseNG resp;
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) {
PrintAndLogEx(DEBUG, "timeout while waiting for reply.");
return -1;
@ -1230,10 +1230,10 @@ static int CmdEM4x05Write(const char *Cmd) {
uint16_t flag = (addr << 8) | (usePwd);
UsbCommandOLD c = {CMD_EM4X_WRITE_WORD, {flag, data, pwd}, {{0}}};
PacketCommandOLD c = {CMD_EM4X_WRITE_WORD, {flag, data, pwd}, {{0}}};
clearCommandBuffer();
SendCommand(&c);
UsbReplyNG resp;
PacketResponseNG resp;
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2000)) {
PrintAndLogEx(WARNING, "Error occurred, device did not respond during write operation.");
return -1;