Home | History | Annotate | Download | only in src
      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  phLibNfc_ndef_raw.h
     19  *
     20  * Project: NFC-FRI 1.1
     21  *
     22  * $Workfile:: phLibNfc_1.1.h  $
     23  * $Modtime::         $
     24  * $Author: ing07299 $
     25  * $Revision: 1.15 $
     26  *
     27  */
     28 #ifndef PHLIBNFC_NDEF_RAW_H
     29 #define PHLIBNFC_NDEF_RAW_H
     30 
     31 /*Check for type of NDEF Calls*/
     32 typedef enum phLibNfc_Last_Call{
     33                     ChkNdef   = 0x00,
     34                     NdefRd,
     35                     NdefWr,
     36                     NdefFmt,
     37 #ifdef LIBNFC_READONLY_NDEF
     38                     NdefReadOnly,
     39 #endif /* #ifdef LIBNFC_READONLY_NDEF */
     40                     RawTrans
     41 } phLibNfc_Last_Call_t;
     42 
     43 #define TAG_MIFARE       0x01
     44 #define TAG_FELICA       0x02
     45 #define TAG_JEWEL        0x04
     46 #define TAG_ISO14443_4A  0x08
     47 #define TAG_ISO14443_4B  0x10
     48 #define TAG_NFC_IP1      0x20
     49 
     50 #define     NDEF_READ_TIMER_TIMEOUT          60U
     51 #define     CHK_NDEF_TIMER_TIMEOUT           60U
     52 #define     NDEF_SENDRCV_BUF_LEN            252U
     53 #define     NDEF_TEMP_RECV_LEN              256U
     54 #define     NDEF_MIFARE_UL_LEN               46U
     55 #define     NDEF_FELICA_LEN                   0U/*len to be set when supported*/
     56 #define     NDEF_JEWEL_TOPAZ_LEN              0U
     57 #define     NDEF_ISO14443_4A_LEN           4096U
     58 #define     NDEF_ISO14443_4B_LEN              0U
     59 #define     NDEF_MIFARE_4K_LEN             3356U
     60 #define     NDEF_MIFARE_1K_LEN              716U
     61 #define     MIFARE_STD_DEFAULT_KEY          {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
     62 #define     MIFARE_STD_KEY_LEN              6
     63 #define     ISO_SAK_VALUE                   0x20U
     64 
     65 
     66 #define UNKNOWN_BLOCK_ADDRESS       0xFF /**<Unknown BLOCK address>*/
     67 #define SESSION_OPEN                0x01
     68 
     69 
     70 extern void phLibNfc_Ndef_Init(void);
     71 extern void phLibNfc_Ndef_DeInit(void);
     72 extern phLibNfc_Ndef_Info_t NdefInfo;
     73 extern phFriNfc_NdefRecord_t *pNdefRecord;
     74 
     75 #endif
     76 
     77