Nick Pelly | 5d9927b | 2010-09-23 12:47:58 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 NXP Semiconductors |
| 3 | * |
| 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 |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 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. |
| 15 | */ |
| 16 | |
| 17 | /* |
| 18 | * \file phFriNfc_IntNdefMap.h |
| 19 | * \brief NFC Internal Ndef Mapping File. |
| 20 | * |
| 21 | * Project: NFC-FRI |
| 22 | * |
| 23 | * $Date: Mon Sep 15 15:10:49 2008 $ |
| 24 | * $Author: ing08205 $ |
| 25 | * $Revision: 1.5 $ |
| 26 | * $Aliases: NFC_FRI1.1_WK838_R9_PREP2,NFC_FRI1.1_WK838_R9_1,NFC_FRI1.1_WK840_R10_PREP1,NFC_FRI1.1_WK840_R10_1,NFC_FRI1.1_WK842_R11_PREP1,NFC_FRI1.1_WK842_R11_PREP2,NFC_FRI1.1_WK842_R11_1,NFC_FRI1.1_WK844_PREP1,NFC_FRI1.1_WK844_R12_1,NFC_FRI1.1_WK846_PREP1,NFC_FRI1.1_WK846_R13_1,NFC_FRI1.1_WK848_PREP1,NFC_FRI1.1_WK848_R14_1,NFC_FRI1.1_WK850_PACK1,NFC_FRI1.1_WK851_PREP1,NFC_FRI1.1_WK850_R15_1,NFC_FRI1.1_WK902_PREP1,NFC_FRI1.1_WK902_R16_1,NFC_FRI1.1_WK904_PREP1,NFC_FRI1.1_WK904_R17_1,NFC_FRI1.1_WK906_R18_1,NFC_FRI1.1_WK908_PREP1,NFC_FRI1.1_WK908_R19_1,NFC_FRI1.1_WK910_PREP1,NFC_FRI1.1_WK910_R20_1,NFC_FRI1.1_WK912_PREP1,NFC_FRI1.1_WK912_R21_1,NFC_FRI1.1_WK914_PREP1,NFC_FRI1.1_WK914_R22_1,NFC_FRI1.1_WK914_R22_2,NFC_FRI1.1_WK916_R23_1,NFC_FRI1.1_WK918_R24_1,NFC_FRI1.1_WK920_PREP1,NFC_FRI1.1_WK920_R25_1,NFC_FRI1.1_WK922_PREP1,NFC_FRI1.1_WK922_R26_1,NFC_FRI1.1_WK924_PREP1,NFC_FRI1.1_WK924_R27_1,NFC_FRI1.1_WK926_R28_1,NFC_FRI1.1_WK928_R29_1,NFC_FRI1.1_WK930_R30_1,NFC_FRI1.1_WK934_PREP_1,NFC_FRI1.1_WK934_R31_1,NFC_FRI1.1_WK941_PREP1,NFC_FRI1.1_WK941_PREP2,NFC_FRI1.1_WK941_1,NFC_FRI1.1_WK943_R32_1,NFC_FRI1.1_WK949_PREP1,NFC_FRI1.1_WK943_R32_10,NFC_FRI1.1_WK943_R32_13,NFC_FRI1.1_WK943_R32_14,NFC_FRI1.1_WK1007_R33_1,NFC_FRI1.1_WK1007_R33_4,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1023_R35_1 $ |
| 27 | * |
| 28 | */ |
| 29 | |
| 30 | #ifndef PHFRINFC_INTNDEFMAP_H |
| 31 | #define PHFRINFC_INTNDEFMAP_H |
| 32 | |
| 33 | #include <phFriNfc.h> |
| 34 | #ifdef PH_HAL4_ENABLE |
| 35 | #include <phHal4Nfc.h> |
| 36 | #else |
| 37 | #include <phHalNfc.h> |
| 38 | #endif |
| 39 | #include <phNfcTypes.h> |
| 40 | #include <phNfcStatus.h> |
| 41 | #include <phFriNfc_NdefMap.h> |
| 42 | |
| 43 | |
| 44 | |
| 45 | /*! |
| 46 | * \name phFriNfc_IntNdefMap.h |
| 47 | * This file has functions which are used common across all the |
| 48 | typ1/type2/type3/type4 tags. |
| 49 | * |
| 50 | */ |
| 51 | /*@{*/ |
| 52 | |
| 53 | #define PH_FRINFC_NDEFMAP_TLVLEN_ZERO 0 |
| 54 | |
| 55 | /* NFC Device Major and Minor Version numbers*/ |
| 56 | /* !!CAUTION!! these needs to be updated periodically.Major and Minor version numbers |
| 57 | should be compatible to the version number of currently implemented mapping document. |
| 58 | Example : NFC Device version Number : 1.0 , specifies |
| 59 | Major VNo is 1, |
| 60 | Minor VNo is 0 */ |
| 61 | #define PH_NFCFRI_NDEFMAP_NFCDEV_MAJOR_VER_NUM 0x01 |
| 62 | #define PH_NFCFRI_NDEFMAP_NFCDEV_MINOR_VER_NUM 0x00 |
| 63 | |
| 64 | /* Macros to find major and minor TAG : Ex:Type1/Type2/Type3/Type4 version numbers*/ |
| 65 | #define PH_NFCFRI_NDEFMAP_GET_MAJOR_TAG_VERNO(a) (((a) & (0xf0))>>(4)) |
| 66 | #define PH_NFCFRI_NDEFMAP_GET_MINOR_TAG_VERNO(a) ((a) & (0x0f)) |
| 67 | |
| 68 | |
| 69 | /*! |
| 70 | * \name NDEF Mapping - states of the Finite State machine |
| 71 | * |
| 72 | */ |
| 73 | /*@{*/ |
| 74 | |
| 75 | NFCSTATUS phFriNfc_NdefMap_CheckSpecVersion(phFriNfc_NdefMap_t *NdefMap, |
| 76 | uint8_t VersionIndex); |
| 77 | |
| 78 | NFCSTATUS phFriNfc_NdefMap_SetCardState(phFriNfc_NdefMap_t *NdefMap, |
| 79 | uint16_t Length); |
| 80 | |
| 81 | #endif /* PHFRINFC_INTNDEFMAP_H */ |