summaryrefslogtreecommitdiffstats
path: root/src/phLibNfc.h
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2011-06-09 15:55:19 +0200
committerMartijn Coenen <maco@google.com>2011-06-09 15:55:19 +0200
commit01a91eaddd15d39b85c9950eb88a1c6348290556 (patch)
tree511d6106958a4cdd9e0dcad0f6c8dc6e59a88894 /src/phLibNfc.h
parent5a84ba3c21d1df214e8e95beee95ba5dbc4449f5 (diff)
downloadexternal_libnfc-nxp-01a91eaddd15d39b85c9950eb88a1c6348290556.zip
external_libnfc-nxp-01a91eaddd15d39b85c9950eb88a1c6348290556.tar.gz
external_libnfc-nxp-01a91eaddd15d39b85c9950eb88a1c6348290556.tar.bz2
Make NfcA timeout configurable in libnfc.
Adds an interface for setting the NfcA timeout, which is called "mifare raw" in libnfc. Also changed the default, since it was set to only 2 ms, which is too short for most commands. Current setting is around 600ms. Change-Id: I00ccd85cd47a70895a3aca0f0bc34e1b0eab82c7
Diffstat (limited to 'src/phLibNfc.h')
-rw-r--r--src/phLibNfc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/phLibNfc.h b/src/phLibNfc.h
index 0e0a519..fa24866 100644
--- a/src/phLibNfc.h
+++ b/src/phLibNfc.h
@@ -860,6 +860,16 @@ NFCSTATUS phLibNfc_SetHciTimeout(uint32_t timeout_in_ms);
// [1..255] -> timeout in ms
NFCSTATUS phLibNfc_SetFelicaTimeout(uint8_t timeout_in_ms);
+// MIFARE RAW timeout (ISO14443-3A / NfcA timeout)
+// timeout is 8 bits
+// bits [0..3] => timeout value, (256*16/13.56*10^6) * 2^value
+// [0] -> 0.0003s
+// ..
+// [14] -> 4.9s
+// [15] -> not allowed
+// bits [4..7] => 0
+NFCSTATUS phLibNfc_SetMifareRawTimeout(uint8_t timeout);
+
/**
* \ingroup grp_lib_nfc
*