summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-02-12 22:27:28 -0800
committerSteve Kondik <shade@chemlab.org>2013-02-12 22:27:28 -0800
commitf64f7e90f9c0dd6f4c52c66a5fd54d9af754c675 (patch)
tree22d9834afe37f9d384357a988fc6a5ed624c69ef
parentbc0f99a540d75e8f5051fffeea1f27bff11e1eb4 (diff)
parent54222dd9925b48b9d124a1f73302866cb5256788 (diff)
downloadexternal_libnfc-nxp-f64f7e90f9c0dd6f4c52c66a5fd54d9af754c675.zip
external_libnfc-nxp-f64f7e90f9c0dd6f4c52c66a5fd54d9af754c675.tar.gz
external_libnfc-nxp-f64f7e90f9c0dd6f4c52c66a5fd54d9af754c675.tar.bz2
Merge tag 'android-4.2.2_r1' of https://android.googlesource.com/platform/external/libnfc-nxp into 1.1
Android 4.2.2 release 1
-rwxr-xr-xinc/phNfcConfig.h2
-rw-r--r--src/phFriNfc_FelicaMap.c14
2 files changed, 14 insertions, 2 deletions
diff --git a/inc/phNfcConfig.h b/inc/phNfcConfig.h
index 0c94dc0..8e44c2e 100755
--- a/inc/phNfcConfig.h
+++ b/inc/phNfcConfig.h
@@ -172,7 +172,7 @@
#ifndef NXP_ISO_XCHG_TIMEOUT
-#define NXP_ISO_XCHG_TIMEOUT 0x1AU
+#define NXP_ISO_XCHG_TIMEOUT 0x1BU
#endif
#ifndef NXP_MIFARE_XCHG_TIMEOUT
diff --git a/src/phFriNfc_FelicaMap.c b/src/phFriNfc_FelicaMap.c
index 8a810f9..39b98d9 100644
--- a/src/phFriNfc_FelicaMap.c
+++ b/src/phFriNfc_FelicaMap.c
@@ -631,6 +631,7 @@ static NFCSTATUS phFriNfc_Felica_HChkApduBuff_Size( phFriNfc_NdefMap_t *NdefMap)
NFCSTATUS status = NFCSTATUS_PENDING;
uint8_t ResetFlag = FALSE;
uint32_t Nbc = 0;
+ uint32_t DataLen = 0;
Nbc = phFriNfc_Felica_HGetMaximumBlksToRead(NdefMap,PH_NFCFRI_NDEFMAP_FELI_NBC);
@@ -733,7 +734,18 @@ static NFCSTATUS phFriNfc_Felica_HChkApduBuff_Size( phFriNfc_NdefMap_t *NdefMap)
}
if ( ResetFlag == TRUE)
{
- *NdefMap->NumOfBytesRead = NdefMap->ApduBuffIndex;
+ PH_NFCFRI_NDEFMAP_FELI_CAL_LEN_BYTES(NdefMap->FelicaAttrInfo.LenBytes[0],
+ NdefMap->FelicaAttrInfo.LenBytes[1],
+ NdefMap->FelicaAttrInfo.LenBytes[2],
+ DataLen);
+ if (NdefMap->ApduBuffIndex > DataLen)
+ {
+ *NdefMap->NumOfBytesRead = DataLen;
+ }
+ else
+ {
+ *NdefMap->NumOfBytesRead = NdefMap->ApduBuffIndex;
+ }
/*Reset the index, internal buffer counters back to zero*/
NdefMap->ApduBuffIndex = 0;
NdefMap->Felica.Rd_NoBytesToCopy=0;