diff options
author | Martijn Coenen <martijn.coenen@nxp.com> | 2011-01-18 19:41:13 +0100 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2011-06-03 15:59:02 -0700 |
commit | 1db6f8ed6317c429ced6d2d7c92fd5a64ffe4015 (patch) | |
tree | e11f2b5936fa796673f0540ad557320abb07c370 /src | |
parent | 577a6bcb406f4a950dfbdfcaa50328cb7c1fa155 (diff) | |
download | external_libnfc-nxp-1db6f8ed6317c429ced6d2d7c92fd5a64ffe4015.zip external_libnfc-nxp-1db6f8ed6317c429ced6d2d7c92fd5a64ffe4015.tar.gz external_libnfc-nxp-1db6f8ed6317c429ced6d2d7c92fd5a64ffe4015.tar.bz2 |
Implement Felica timeout handling (libNFC).
Change-Id: I1a88ae0807d5ba53a635e31f3c5284906bd40ea2
Diffstat (limited to 'src')
-rw-r--r-- | src/phHciNfc_Felica.c | 5 | ||||
-rw-r--r-- | src/phLibNfc.c | 6 | ||||
-rw-r--r-- | src/phLibNfc.h | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/src/phHciNfc_Felica.c b/src/phHciNfc_Felica.c index 1a353a5..2bbb32a 100644 --- a/src/phHciNfc_Felica.c +++ b/src/phHciNfc_Felica.c @@ -58,7 +58,8 @@ #define NXP_FEL_CUR_IDM_PMM_LEN 0x08U #define FELICA_STATUS 0x00U -#define FELICA_TIMEOUT NXP_FELICA_XCHG_TIMEOUT + +uint8_t nxp_nfc_felica_timeout = NXP_FELICA_XCHG_TIMEOUT; /* Presence check command for felica tag */ #define FELICA_REQ_MODE 0x04U @@ -908,7 +909,7 @@ phHciNfc_Send_Felica_Command( hcp_message = &(hcp_packet->msg.message); /* Time out */ - hcp_message->payload[i++] = FELICA_TIMEOUT ; + hcp_message->payload[i++] = nxp_nfc_felica_timeout ; /* Status */ hcp_message->payload[i++] = FELICA_STATUS; diff --git a/src/phLibNfc.c b/src/phLibNfc.c index 9c7db4f..f5976b7 100644 --- a/src/phLibNfc.c +++ b/src/phLibNfc.c @@ -130,6 +130,12 @@ NFCSTATUS phLibNfc_SetHciTimeout(uint32_t timeout_in_ms) { return NFCSTATUS_SUCCESS; } +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; +} + /** * Initialize the phLibNfc interface. */ diff --git a/src/phLibNfc.h b/src/phLibNfc.h index 216196f..0e0a519 100644 --- a/src/phLibNfc.h +++ b/src/phLibNfc.h @@ -855,6 +855,10 @@ NFCSTATUS phLibNfc_Download_Mode (); // bit [5..7] => unused NFCSTATUS phLibNfc_SetIsoXchgTimeout(uint8_t timeout); NFCSTATUS phLibNfc_SetHciTimeout(uint32_t timeout_in_ms); +// Felica timeout +// [0] -> timeout disabled +// [1..255] -> timeout in ms +NFCSTATUS phLibNfc_SetFelicaTimeout(uint8_t timeout_in_ms); /** * \ingroup grp_lib_nfc |