From 5de71ee6bf8abce63566637c4d50f0cd2e0335e9 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 21 Mar 2016 22:07:23 +0100 Subject: [PATCH] CHG: enter a define for TIMEOUT --- client/cmdhf14b.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/cmdhf14b.c b/client/cmdhf14b.c index 05572a3b..5666e605 100644 --- a/client/cmdhf14b.c +++ b/client/cmdhf14b.c @@ -14,6 +14,7 @@ #include #include "cmdhf14b.h" +#define TIMEOUT 2000 static int CmdHelp(const char *Cmd); int usage_hf_14b_info(void){ @@ -351,7 +352,7 @@ bool HF14B_ST_Info(bool verbose){ SendCommand(&c); UsbCommand resp; - if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)) { + if (!WaitForResponseTimeout(CMD_ACK, &resp, TIMEOUT)) { if (verbose) PrintAndLog("timeout while waiting for reply."); return FALSE; } @@ -425,7 +426,7 @@ bool HF14B_ST_Reader(bool verbose){ SendCommand(&c); UsbCommand resp; - if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)) { + if (!WaitForResponseTimeout(CMD_ACK, &resp, TIMEOUT)) { if (verbose) PrintAndLog("timeout while waiting for reply."); return FALSE; } @@ -469,7 +470,7 @@ bool HF14B_Std_Reader(bool verbose){ SendCommand(&c); UsbCommand resp; - if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)) { + if (!WaitForResponseTimeout(CMD_ACK, &resp, TIMEOUT)) { if (verbose) PrintAndLog("timeout while waiting for reply."); return FALSE; } @@ -814,7 +815,7 @@ bool waitCmd(bool verbose) { uint16_t len = 0; UsbCommand resp; - if (WaitForResponseTimeout(CMD_ACK, &resp, 2000)) { + if (WaitForResponseTimeout(CMD_ACK, &resp, TIMEOUT)) { status = (resp.arg[0] & 0xFFFF); if ( status > 0 ) return FALSE; -- 2.39.2