From 0cdd303a6e2ad061d6b59649988ed489859333f6 Mon Sep 17 00:00:00 2001 From: Jan Brands Date: Sat, 27 Nov 2010 01:14:14 +0100 Subject: Re-enable multi-protocol with improved MIFARE detection Change-Id: I45719cfb1db4d449895c0bb2c39d192ff57f059c --- src/phHal4Nfc_ADD.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/phHal4Nfc_ADD.c') diff --git a/src/phHal4Nfc_ADD.c b/src/phHal4Nfc_ADD.c index 54b7ac4..4da45e4 100644 --- a/src/phHal4Nfc_ADD.c +++ b/src/phHal4Nfc_ADD.c @@ -453,12 +453,21 @@ void phHal4Nfc_TargetDiscoveryComplete( Count++; } /*Check for Mifare Supported*/ - else if(Sak & MIFARE_BITMASK) + switch( Sak ) { + case 0x09: // Mini + case 0x08: // 1K + case 0x18: // 4K + case 0x88: // Infineon 1K + case 0x98: // Pro 4K + case 0xB8: // Pro 4K + case 0x28: // 1K emulation + case 0x38: // 4K emulation aRemoteDevTypes[Count] = phHal_eMifare_PICC; Count++; + break; } - else if((0 == Sak)&& (0 == Count)) + if((0 == Sak)&& (0 == Count)) { /*Mifare check*/ if((NXP_UID == @@ -476,7 +485,7 @@ void phHal4Nfc_TargetDiscoveryComplete( Count++; } else if ( !(Sak & ISO_14443_BITMASK) && - !(Sak & NFCIP_BITMASK) ) + !(Sak & NFCIP_BITMASK) && (0 == Count)) { aRemoteDevTypes[Count] = phHal_eISO14443_3A_PICC; Count++; -- cgit v1.1