2 * Copyright (C) 2010 NXP Semiconductors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * \file phFriNfc_MapTools.h
19 * \brief NFC Internal Ndef Mapping File.
23 * $Date: Fri Oct 15 13:50:54 2010 $
30 #ifndef PHFRINFC_MAPTOOLS_H
31 #define PHFRINFC_MAPTOOLS_H
35 #include <phHal4Nfc.h>
39 #include <phNfcTypes.h>
40 #include <phNfcStatus.h>
41 #include <phFriNfc_NdefMap.h>
44 * \name phFriNfc_MapTools.h
45 * This file has functions which are used common across all the
46 typ1/type2/type3/type4 tags.
51 #define PH_FRINFC_NDEFMAP_TLVLEN_ZERO 0
53 /* NFC Device Major and Minor Version numbers*/
54 /* !!CAUTION!! these needs to be updated periodically.Major and Minor version numbers
55 should be compatible to the version number of currently implemented mapping document.
56 Example : NFC Device version Number : 1.0 , specifies
59 #define PH_NFCFRI_NDEFMAP_NFCDEV_MAJOR_VER_NUM 0x01
61 #define PH_NFCFRI_NDEFMAP_NFCDEV_MAJOR_VER_NUM_2 0x02
63 #define PH_NFCFRI_NDEFMAP_NFCDEV_MINOR_VER_NUM 0x00
65 /* Macros to find major and minor TAG : Ex:Type1/Type2/Type3/Type4 version numbers*/
66 #define PH_NFCFRI_NDEFMAP_GET_MAJOR_TAG_VERNO(a) (((a) & (0xf0))>>(4))
67 #define PH_NFCFRI_NDEFMAP_GET_MINOR_TAG_VERNO(a) ((a) & (0x0f))
69 /* NFC Device Major and Minor Version numbers*/
70 /* !!CAUTION!! these needs to be updated periodically.Major and Minor version numbers
71 should be compatible to the version number of currently implemented mapping document.
72 Example : NFC Device version Number : 1.0 , specifies
75 #define PH_NFCFRI_MFSTDMAP_NFCDEV_MAJOR_VER_NUM 0x40
76 #define PH_NFCFRI_MFSTDMAP_NFCDEV_MINOR_VER_NUM 0x00
78 /* Macros to find major and minor TAG : Ex:Type1/Type2/Type3/Type4 version numbers*/
79 #define PH_NFCFRI_MFSTDMAP_GET_MAJOR_TAG_VERNO(a) ((a) & (0x40)) // must be 0xC0
80 #define PH_NFCFRI_MFSTDMAP_GET_MINOR_TAG_VERNO(a) ((a) & (0x30))
83 * \name NDEF Mapping - states of the Finite State machine
89 NFCSTATUS phFriNfc_MapTool_ChkSpcVer( const phFriNfc_NdefMap_t *NdefMap,
90 uint8_t VersionIndex);
92 NFCSTATUS phFriNfc_MapTool_SetCardState(phFriNfc_NdefMap_t *NdefMap,
95 #endif //PHFRINFC_MAPTOOLS_H