summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSunil Jogi <sunil.jogi@nxp.com>2012-04-10 11:37:25 -0700
committerMartijn Coenen <maco@google.com>2012-04-13 16:31:21 -0700
commit8206325bc6b3a60aed3c5cce157369ec2989437a (patch)
treed682013871a597470f037c1f1de8db82f5118f5b /src
parentc3a87316a08d782d8b336d2d9663b47a4ec37d21 (diff)
downloadexternal_libnfc-nxp-8206325bc6b3a60aed3c5cce157369ec2989437a.zip
external_libnfc-nxp-8206325bc6b3a60aed3c5cce157369ec2989437a.tar.gz
external_libnfc-nxp-8206325bc6b3a60aed3c5cce157369ec2989437a.tar.bz2
Added recovery function when SE wired mode selected
Added a recovery function with delay when SE wired mode selected. This function will add extra delay before any abort when SE is in wired mode. This will allow SE to complete any operation and do not power off the SE immediately when wired mode transaction is on going.
Diffstat (limited to 'src')
-rw-r--r--src/phLibNfc.c12
-rw-r--r--src/phLibNfc.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/src/phLibNfc.c b/src/phLibNfc.c
index 1012acb..c7c37c8 100644
--- a/src/phLibNfc.c
+++ b/src/phLibNfc.c
@@ -129,6 +129,18 @@ int phLibNfc_Load_Firmware_Image ()
return status;
}
+// Function for delay the recovery in case wired mode is set
+// to complete the possible pending transaction with SE
+void phLibNfc_Mgt_Recovery ()
+{
+ /* Wait before recovery if wired mode */
+ if (gpphLibContext->sSeContext.eActivatedMode == phLibNfc_SE_ActModeWired)
+ {
+ usleep (12000000);
+ }
+
+ return;
+}
extern uint8_t nxp_nfc_isoxchg_timeout;
NFCSTATUS phLibNfc_SetIsoXchgTimeout(uint8_t timeout) {
diff --git a/src/phLibNfc.h b/src/phLibNfc.h
index 1eb62ae..6111a93 100644
--- a/src/phLibNfc.h
+++ b/src/phLibNfc.h
@@ -856,6 +856,10 @@ NFCSTATUS phLibNfc_Download_Mode ();
int phLibNfc_Load_Firmware_Image ();
+// Function for delay the recovery in case wired mode is set
+// to complete the possible pending transaction with SE
+void phLibNfc_Mgt_Recovery ();
+
// timeout is 8 bits
// bits [0..3] => timeout value, (256*16/13.56*10^6) * 2^value
// [0] -> 0.0003s