diff options
author | Martijn Coenen <maco@google.com> | 2011-07-20 16:03:54 +0200 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2011-07-20 16:03:54 +0200 |
commit | b78322991a8bebe8d7ce6b7b978280c0508c4993 (patch) | |
tree | 88e66366d85ae928bc18eb0972f673df13caeebf | |
parent | 8e65f6b557dd972062785645cc9464c666a14030 (diff) | |
download | external_libnfc-nxp-b78322991a8bebe8d7ce6b7b978280c0508c4993.zip external_libnfc-nxp-b78322991a8bebe8d7ce6b7b978280c0508c4993.tar.gz external_libnfc-nxp-b78322991a8bebe8d7ce6b7b978280c0508c4993.tar.bz2 |
getTimeout() support in libnfc-nxp.
Bug: 4492175
Change-Id: I7f85fc32bfaabeac8fa4da6c1509992d5523afa3
-rw-r--r-- | src/phLibNfc.c | 16 | ||||
-rw-r--r-- | src/phLibNfc.h | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/phLibNfc.c b/src/phLibNfc.c index 1245960..ec8b05e 100644 --- a/src/phLibNfc.c +++ b/src/phLibNfc.c @@ -126,24 +126,40 @@ NFCSTATUS phLibNfc_SetIsoXchgTimeout(uint8_t timeout) { return NFCSTATUS_SUCCESS; } +int phLibNfc_GetIsoXchgTimeout() { + return nxp_nfc_isoxchg_timeout; +} + extern uint32_t nxp_nfc_hci_response_timeout; NFCSTATUS phLibNfc_SetHciTimeout(uint32_t timeout_in_ms) { nxp_nfc_hci_response_timeout = timeout_in_ms; return NFCSTATUS_SUCCESS; } +int phLibNfc_GetHciTimeout() { + return nxp_nfc_hci_response_timeout; +} + extern uint32_t nxp_nfc_felica_timeout; NFCSTATUS phLibNfc_SetFelicaTimeout(uint8_t timeout_in_ms) { nxp_nfc_felica_timeout = timeout_in_ms; return NFCSTATUS_SUCCESS; } +int phLibNfc_GetFelicaTimeout() { + return nxp_nfc_felica_timeout; +} + extern uint8_t nxp_nfc_mifareraw_timeout; NFCSTATUS phLibNfc_SetMifareRawTimeout(uint8_t timeout) { nxp_nfc_mifareraw_timeout = timeout; return NFCSTATUS_SUCCESS; } +int phLibNfc_GetMifareRawTimeout() { + return nxp_nfc_mifareraw_timeout; +} + /** * Initialize the phLibNfc interface. */ diff --git a/src/phLibNfc.h b/src/phLibNfc.h index 3ae0864..c2cb6dd 100644 --- a/src/phLibNfc.h +++ b/src/phLibNfc.h @@ -860,11 +860,16 @@ NFCSTATUS phLibNfc_Download_Mode (); // bit [4] => timeout enable // bit [5..7] => unused NFCSTATUS phLibNfc_SetIsoXchgTimeout(uint8_t timeout); +int phLibNfc_GetIsoXchgTimeout(); + NFCSTATUS phLibNfc_SetHciTimeout(uint32_t timeout_in_ms); +int phLibNfc_GetHciTimeout(); + // Felica timeout // [0] -> timeout disabled // [1..255] -> timeout in ms NFCSTATUS phLibNfc_SetFelicaTimeout(uint8_t timeout_in_ms); +int phLibNfc_GetFelicaTimeout(); // MIFARE RAW timeout (ISO14443-3A / NfcA timeout) // timeout is 8 bits @@ -875,6 +880,7 @@ NFCSTATUS phLibNfc_SetFelicaTimeout(uint8_t timeout_in_ms); // [15] -> not allowed // bits [4..7] => 0 NFCSTATUS phLibNfc_SetMifareRawTimeout(uint8_t timeout); +int phLibNfc_GetMifareRawTimeout(); /** * \ingroup grp_lib_nfc |