summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Hamilton <jham@google.com>2012-08-29 19:31:06 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-29 19:31:06 -0700
commitcaa9f7c0ff7a38d04318e50e89051a724fecec42 (patch)
tree87dd0e543fa9a369a4c65b5ddfaa79dd5cc1231d
parent9acc2486787ee83b436b2999cd27f7b1ffb9fd69 (diff)
parent1985108ceba65f0b01d5c4c41da49073c5d01230 (diff)
downloadexternal_libnfc-nxp-caa9f7c0ff7a38d04318e50e89051a724fecec42.zip
external_libnfc-nxp-caa9f7c0ff7a38d04318e50e89051a724fecec42.tar.gz
external_libnfc-nxp-caa9f7c0ff7a38d04318e50e89051a724fecec42.tar.bz2
am 1985108c: Merge "Support of topaz tag NFC Forum version number 1.1"
* commit '1985108ceba65f0b01d5c4c41da49073c5d01230': Support of topaz tag NFC Forum version number 1.1
-rw-r--r--src/phFriNfc_TopazDynamicMap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/phFriNfc_TopazDynamicMap.c b/src/phFriNfc_TopazDynamicMap.c
index 2aa29ea..e9d1529 100644
--- a/src/phFriNfc_TopazDynamicMap.c
+++ b/src/phFriNfc_TopazDynamicMap.c
@@ -199,6 +199,9 @@ so there are 4 segements in the card */
((((block_no) + 1) == TOPAZ_STATIC_LOCK_FIRST_BLOCK_NO) ? \
(((block_no) + 1) + TOPAZ_STATIC_LOCK_BLOCK_AREAS) : \
((block_no) + 1))
+/* Check topaz spec version number */
+#define TOPAZ_COMPARE_VERSION(device_ver, tag_ver) \
+ ((device_ver & 0xF0) >= (tag_ver & 0xF0))
#ifdef FRINFC_READONLY_NDEF
@@ -2368,7 +2371,7 @@ phFriNfc_Tpz_H_CheckCCBytesForWrite (
{
check_index = (uint8_t)(check_index + 1);
- if ((check_cc_rw[0] != ps_tpz_info->CCByteBuf[1]) ||
+ if ((!TOPAZ_COMPARE_VERSION(check_cc_rw[0], ps_tpz_info->CCByteBuf[1])) ||
(check_cc_rw[1] != ps_tpz_info->CCByteBuf[2]) ||
(check_cc_rw[2] != ps_tpz_info->CCByteBuf[3]))
{