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 * =========================================================================== *
     19 *                                                                             *
     20 *                                                                             *
     21 * \file  phHciNfc_Emulation.h                                                 *
     22 * \brief HCI emulation management routines.                                   *
     23 *                                                                             *
     24 *                                                                             *
     25 * Project: NFC-FRI-1.1                                                        *
     26 *                                                                             *
     27 * $Date: Fri Aug 14 17:01:26 2009 $                                           *
     28 * $Author: ing04880 $                                                         *
     29 * $Revision: 1.10 $                                                            *
     30 * $Aliases: 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 $                                                                *
     31 *                                                                             *
     32 * =========================================================================== *
     33 */
     34 
     35 
     36 #ifndef PHHCINFC_EMULATION_H
     37 #define PHHCINFC_EMULATION_H
     38 
     39 /*@}*/
     40 
     41 
     42 /**
     43 *  \name HCI
     44 *
     45 * File: \ref phHciNfc_Emulation.h
     46 *
     47 */
     48 /*@{*/
     49 #define PHHCINFC_EMULATION_FILEREVISION "$Revision: 1.10 $" /**< \ingroup grp_file_attributes */
     50 #define PHHCINFC_EMULATION_FILEALIASES  "$Aliases: 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 $"     /**< \ingroup grp_file_attributes */
     51 /*@}*/
     52 
     53 /*
     54 ***************************** Header File Inclusion ****************************
     55 */
     56 
     57 #include <phHciNfc_Generic.h>
     58 
     59 /*
     60 ****************************** Macro Definitions *******************************
     61 */
     62 /* Connectivity Gate Command Support */
     63 #define PRO_HOST_REQUEST            (0x10U)
     64 
     65 /* Connectivity Gate Event Support */
     66 #define EVT_CONNECTIVITY            (0x10U)
     67 #define EVT_END_OF_TRANSACTION      (0x11U)
     68 #define EVT_TRANSACTION             (0x12U)
     69 #define EVT_OPERATION_ENDED         (0x13U)
     70 
     71 #define TRANSACTION_MIN_LEN         (0x03U)
     72 #define TRANSACTION_AID             (0x81U)
     73 #define TRANSACTION_PARAM           (0x82U)
     74 
     75 #define HOST_CE_MODE_ENABLE         (0x02U)
     76 #define HOST_CE_MODE_DISABLE        (0xFFU)
     77 
     78 #define NXP_PIPE_CONNECTIVITY       (0x60U)
     79 
     80 
     81 /* Card Emulation Gate Events */
     82 #define CE_EVT_NFC_SEND_DATA        (0x10U)
     83 #define CE_EVT_NFC_FIELD_ON         (0x11U)
     84 #define CE_EVT_NFC_DEACTIVATED      (0x12U)
     85 #define CE_EVT_NFC_ACTIVATED        (0x13U)
     86 #define CE_EVT_NFC_FIELD_OFF        (0x14U)
     87 
     88 /*
     89 ******************** Enumeration and Structure Definition **********************
     90 */
     91 
     92 
     93 
     94 /*
     95 *********************** Function Prototype Declaration *************************
     96 */
     97 
     98 extern
     99 NFCSTATUS
    100 phHciNfc_Uicc_Update_PipeInfo(
    101                                 phHciNfc_sContext_t     *psHciContext,
    102                                 uint8_t                 pipe_id,
    103                                 phHciNfc_Pipe_Info_t    *pPipeInfo
    104                         );
    105 
    106 extern
    107 NFCSTATUS
    108 phHciNfc_EmuMgmt_Update_Seq(
    109                                 phHciNfc_sContext_t     *psHciContext,
    110                                 phHciNfc_eSeqType_t     seq_type
    111                         );
    112 
    113 extern
    114 NFCSTATUS
    115 phHciNfc_EmuMgmt_Initialise(
    116                             phHciNfc_sContext_t     *psHciContext,
    117                             void                    *pHwRef
    118                         );
    119 
    120 extern
    121 NFCSTATUS
    122 phHciNfc_EmuMgmt_Release(
    123                             phHciNfc_sContext_t     *psHciContext,
    124                             void                    *pHwRef
    125                         );
    126 
    127 
    128 extern
    129 NFCSTATUS
    130 phHciNfc_Emulation_Cfg (
    131                         phHciNfc_sContext_t     *psHciContext,
    132                         void                    *pHwRef,
    133                         phHciNfc_eConfigType_t  cfg_type
    134                     );
    135 
    136 extern
    137 NFCSTATUS
    138 phHciNfc_Uicc_Get_PipeID(
    139                             phHciNfc_sContext_t     *psHciContext,
    140                             uint8_t                 *ppipe_id
    141                         );
    142 
    143 extern
    144 NFCSTATUS
    145 phHciNfc_Uicc_Connect_Status(
    146                                phHciNfc_sContext_t      *psHciContext,
    147                                void                 *pHwRef
    148                       );
    149 
    150 extern
    151 void
    152 phHciNfc_Uicc_Connectivity(
    153                             phHciNfc_sContext_t     *psHciContext,
    154                             void                    *pHwRef
    155                         );
    156 
    157 
    158 #endif /* PHHCINFC_EMULATION_H */
    159