2 * Copyright (C) 2010 NXP Semiconductors
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
18 * =========================================================================== *
\r
21 * \file phHciNfc_Pipe.h *
\r
22 * \brief HCI Header for the Pipe Management. *
\r
25 * Project: NFC-FRI-1.1 *
\r
27 * $Date: Fri Aug 14 17:01:27 2009 $ *
\r
28 * $Author: ing04880 $ *
\r
29 * $Revision: 1.17 $ *
\r
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 $
\r
32 * =========================================================================== *
\r
37 #ifndef PHHCINFC_PIPE_H
\r
38 #define PHHCINFC_PIPE_H
\r
46 * File: \ref phHciNfc_Pipe.h
\r
50 #define PHHCINFC_PIPE_FILEREVISION "$Revision: 1.17 $" /**< \ingroup grp_file_attributes */
\r
51 #define PHHCINFC_PIPE_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 */
\r
55 ***************************** Header File Inclusion ****************************
\r
58 #include <phHciNfc.h>
\r
59 #include <phHciNfc_Generic.h>
\r
62 ****************************** Macro Definitions *******************************
\r
65 #define PIPEINFO_SIZE 0x04U
\r
66 #define PIPEID_LEN 0x01U
\r
68 #define RESPONSE_GATEID_OFFSET 0x03U
\r
69 #define RESPONSE_PIPEID_OFFSET 0x04U
\r
72 #define PIPETYPE_STATIC_LINK 0x00U
\r
73 #define PIPETYPE_STATIC_ADMIN 0x01U
\r
74 #define PIPETYPE_DYNAMIC 0x02U
\r
77 ******************** Enumeration and Structure Definition **********************
\r
80 typedef enum phHciNfc_PipeMgmt_Seq{
\r
81 /* Pipe for Identitiy Management */
\r
82 PIPE_IDMGMT_CREATE = 0x00U,
\r
83 /* Pipe for Configuring PN544 Nfc Device */
\r
84 PIPE_PN544MGMT_CREATE,
\r
85 /* Pipe for Configuring Polling Wheel */
\r
86 PIPE_POLLINGLOOP_CREATE,
\r
87 /* Pipes for Configuring the RF Readers */
\r
88 PIPE_READER_A_CREATE,
\r
89 PIPE_READER_B_CREATE,
\r
90 PIPE_READER_F_CREATE,
\r
91 PIPE_READER_JWL_CREATE,
\r
92 PIPE_READER_ISO15693_CREATE,
\r
93 /* Pipes for configuring the Card Emulation */
\r
100 /* Pipes for Peer to Peer Communication */
\r
101 PIPE_NFC_INITIATOR_CREATE,
\r
102 PIPE_NFC_TARGET_CREATE,
\r
103 /* Secure Element Commands */
\r
106 /* Connectiviy Gate Pipe */
\r
109 /* Clearing all the created Pipes */
\r
112 } phHciNfc_PipeMgmt_Seq_t;
\r
114 /** \defgroup grp_hci_nfc HCI Component
\r
120 *********************** Function Prototype Declaration *************************
\r
124 * \brief Creates the Pipes of all the Supported Gates .
\r
126 * This function Creates the pipes for all the supported gates
\r
131 phHciNfc_Create_All_Pipes(
\r
132 phHciNfc_sContext_t *psHciContext,
\r
134 phHciNfc_PipeMgmt_Seq_t *p_pipe_seq
\r
138 * \brief Deletes the Pipes of all the Supported Gates .
\r
140 * This function Deletes the pipes for all the supported gates
\r
144 phHciNfc_Delete_All_Pipes(
\r
145 phHciNfc_sContext_t *psHciContext,
\r
147 phHciNfc_PipeMgmt_Seq_t pipeSeq
\r
151 * \brief Updates the Information of Pipes of all the Supported Gates .
\r
153 * This function Updates the pipe information for all the supported gates
\r
158 phHciNfc_Update_PipeInfo(
\r
159 phHciNfc_sContext_t *psHciContext,
\r
160 phHciNfc_PipeMgmt_Seq_t *pPipeSeq,
\r
162 phHciNfc_Pipe_Info_t *pPipeInfo
\r
166 * \ingroup grp_hci_nfc
\r
168 * The phHciNfc_Open_Pipe function opens
\r
171 * \param[in] psContext psContext is pointer to the context
\r
172 * Structure of the HCI Layer.
\r
173 * \param[in] pHwRef pHwRef is the Information of
\r
174 * the Device Interface Link .
\r
175 * \param[in] pPipeHandle pPipeHandle is the handle used to open
\r
176 * the Static or Dynamically Created Pipe.
\r
178 * \retval NFCSTATUS_PENDING Pipe Open is pending.
\r
179 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
180 * could not be interpreted properly.
\r
181 * \retval Other errors Errors related to the lower layers
\r
187 phHciNfc_Open_Pipe (
\r
188 phHciNfc_sContext_t *psContext,
\r
190 phHciNfc_Pipe_Info_t *pPipeHandle
\r
194 * \ingroup grp_hci_nfc
\r
196 * The phHciNfc_Close_Pipe function closes
\r
199 * \param[in] psContext psContext is pointer to the context
\r
200 * Structure of the HCI Layer.
\r
201 * \param[in] pHwRef pHwRef is the Information of
\r
202 * the Device Interface Link .
\r
203 * \param[in] pPipeHandle pPipeHandle is the handle used to closes
\r
204 * the Static or Dynamically Created Pipe.
\r
206 * \retval NFCSTATUS_PENDING Pipe close is pending.
\r
207 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
208 * could not be interpreted properly.
\r
209 * \retval Other errors Errors related to the lower layers
\r
215 phHciNfc_Close_Pipe (
\r
216 phHciNfc_sContext_t *psContext,
\r
218 phHciNfc_Pipe_Info_t *pPipeHandle
\r
222 * \ingroup grp_hci_nfc
\r
224 * The phHciNfc_Delete_Pipe function deletes the dynamically created pipe
\r
225 * using the supplied pipe handle.
\r
227 * \param[in] psContext psContext is pointer to the context
\r
228 * Structure of the HCI Layer.
\r
229 * \param[in] pHwRef pHwRef is the Information of
\r
230 * the Device Interface Link .
\r
231 * \param[in] pPipeHandle pPipeHandle is the handle used to delete
\r
232 * the Dynamically Created Pipe.
\r
234 * \retval NFCSTATUS_PENDING Pipe Deletion is pending.
\r
235 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
236 * could not be interpreted properly.
\r
242 phHciNfc_Delete_Pipe(
\r
243 phHciNfc_sContext_t *psHciContext,
\r
245 phHciNfc_Pipe_Info_t *pPipeHandle
\r
249 * \brief Creates and Update the Pipes during the Session
\r
251 * This function Creates and Update the Pipes of all the Supported Gates
\r
252 * for the already initialised session.
\r
257 phHciNfc_Update_Pipe(
\r
258 phHciNfc_sContext_t *psHciContext,
\r
260 phHciNfc_PipeMgmt_Seq_t *p_pipe_seq
\r
266 phHciNfc_CE_Pipes_OP(
\r
267 phHciNfc_sContext_t *psHciContext,
\r
269 phHciNfc_PipeMgmt_Seq_t *p_pipe_seq
\r