summaryrefslogtreecommitdiffstats
path: root/src/phFriNfc_DesfireMap.c
diff options
context:
space:
mode:
authorJan Brands <jan.r.brands@nxp.com>2010-11-30 23:26:26 +0100
committerNick Pelly <npelly@google.com>2010-12-05 13:14:53 -0800
commite57ef4170474a0929b25bbdc8eb75f316ebffd56 (patch)
tree66b14c29ef2aaabef2da875b7e06e238d50319fb /src/phFriNfc_DesfireMap.c
parent794aa72f7bd1e5b1fb51efb957cb925c7cfed746 (diff)
downloadexternal_libnfc-nxp-e57ef4170474a0929b25bbdc8eb75f316ebffd56.zip
external_libnfc-nxp-e57ef4170474a0929b25bbdc8eb75f316ebffd56.tar.gz
external_libnfc-nxp-e57ef4170474a0929b25bbdc8eb75f316ebffd56.tar.bz2
Fixed combined T4Tv2 & T4Tv1 support
Change-Id: I9d39a014aafa4464d022a0fd2776a23bbb4a766e
Diffstat (limited to 'src/phFriNfc_DesfireMap.c')
-rw-r--r--src/phFriNfc_DesfireMap.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/phFriNfc_DesfireMap.c b/src/phFriNfc_DesfireMap.c
index 0c303a2..6f132ea 100644
--- a/src/phFriNfc_DesfireMap.c
+++ b/src/phFriNfc_DesfireMap.c
@@ -625,9 +625,6 @@ void phFriNfc_Desfire_Process(void *Context,
uint16_t NLength = 0,
SendRecLen=0;
uint32_t BytesRead = 0;
-#ifdef DESFIRE_EV1
- static uint8_t card_type = PH_FRINFC_NDEFMAP_ISO14443_4A_CARD;
-#endif /* #ifdef DESFIRE_EV1 */
/* Sujatha P: Fix for 0000255/0000257:[gk] MAP:Handling HAL Errors */
@@ -692,8 +689,7 @@ void phFriNfc_Desfire_Process(void *Context,
(NdefMap->SendRecvBuf[(*(NdefMap->SendRecvLength) - 1)] ==
PH_FRINFC_NDEFMAP_DESF_RAPDU_SW2_BYTE))
{
- card_type = PH_FRINFC_NDEFMAP_ISO14443_4A_CARD_EV1;
- NdefMap->CardType = card_type;
+ NdefMap->CardType = PH_FRINFC_NDEFMAP_ISO14443_4A_CARD_EV1;
Status = phFriNfc_Desfire_SelectFile(NdefMap);
@@ -819,7 +815,7 @@ void phFriNfc_Desfire_Process(void *Context,
{
NdefMap->DespOpFlag = PH_FRINFC_NDEFMAP_DESF_GET_LEN_OP;
#ifdef DESFIRE_EV1
- if (PH_FRINFC_NDEFMAP_ISO14443_4A_CARD_EV1 == card_type)
+ if (PH_FRINFC_NDEFMAP_ISO14443_4A_CARD_EV1 == NdefMap->CardType)
{
Status = phFriNfc_Desfire_SelectFile(NdefMap);
}
@@ -899,9 +895,7 @@ void phFriNfc_Desfire_Process(void *Context,
if ( Status == NFCSTATUS_SUCCESS )
{
/*Set the card type to Desfire*/
-#ifdef DESFIRE_EV1
- NdefMap->CardType = card_type;
-#else
+#ifndef DESFIRE_EV1
NdefMap->CardType = PH_FRINFC_NDEFMAP_ISO14443_4A_CARD;
#endif /* #ifdef DESFIRE_EV1 */
/*Set the state to specify True for Ndef Compliant*/