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 * =========================================================================== *
21 * \file phHciNfc_Pipe.h *
22 * \brief HCI Header for the Pipe Management. *
25 * Project: NFC-FRI-1.1 *
27 * $Date: Fri Aug 14 17:01:27 2009 $ *
28 * $Author: ing04880 $ *
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 $
32 * =========================================================================== *
37 #ifndef PHHCINFC_PIPE_H
38 #define PHHCINFC_PIPE_H
46 * File: \ref phHciNfc_Pipe.h
50 #define PHHCINFC_PIPE_FILEREVISION "$Revision: 1.17 $" /**< \ingroup grp_file_attributes */
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 */
55 ***************************** Header File Inclusion ****************************
59 #include <phHciNfc_Generic.h>
62 ****************************** Macro Definitions *******************************
65 #define PIPEINFO_SIZE 0x04U
66 #define PIPEID_LEN 0x01U
68 #define RESPONSE_GATEID_OFFSET 0x03U
69 #define RESPONSE_PIPEID_OFFSET 0x04U
72 #define PIPETYPE_STATIC_LINK 0x00U
73 #define PIPETYPE_STATIC_ADMIN 0x01U
74 #define PIPETYPE_DYNAMIC 0x02U
77 ******************** Enumeration and Structure Definition **********************
80 typedef enum phHciNfc_PipeMgmt_Seq{
81 /* Pipe for Identitiy Management */
82 PIPE_IDMGMT_CREATE = 0x00U,
83 /* Pipe for Configuring PN544 Nfc Device */
84 PIPE_PN544MGMT_CREATE,
85 /* Pipe for Configuring Polling Wheel */
86 PIPE_POLLINGLOOP_CREATE,
87 /* Pipes for Configuring the RF Readers */
91 PIPE_READER_JWL_CREATE,
92 PIPE_READER_ISO15693_CREATE,
93 /* Pipes for configuring the Card Emulation */
100 /* Pipes for Peer to Peer Communication */
101 PIPE_NFC_INITIATOR_CREATE,
102 PIPE_NFC_TARGET_CREATE,
103 /* Secure Element Commands */
106 /* Connectiviy Gate Pipe */
109 /* Clearing all the created Pipes */
112 } phHciNfc_PipeMgmt_Seq_t;
114 /** \defgroup grp_hci_nfc HCI Component
120 *********************** Function Prototype Declaration *************************
124 * \brief Creates the Pipes of all the Supported Gates .
126 * This function Creates the pipes for all the supported gates
131 phHciNfc_Create_All_Pipes(
132 phHciNfc_sContext_t *psHciContext,
134 phHciNfc_PipeMgmt_Seq_t *p_pipe_seq
138 * \brief Deletes the Pipes of all the Supported Gates .
140 * This function Deletes the pipes for all the supported gates
144 phHciNfc_Delete_All_Pipes(
145 phHciNfc_sContext_t *psHciContext,
147 phHciNfc_PipeMgmt_Seq_t pipeSeq
151 * \brief Updates the Information of Pipes of all the Supported Gates .
153 * This function Updates the pipe information for all the supported gates
158 phHciNfc_Update_PipeInfo(
159 phHciNfc_sContext_t *psHciContext,
160 phHciNfc_PipeMgmt_Seq_t *pPipeSeq,
162 phHciNfc_Pipe_Info_t *pPipeInfo
166 * \ingroup grp_hci_nfc
168 * The phHciNfc_Open_Pipe function opens
171 * \param[in] psContext psContext is pointer to the context
172 * Structure of the HCI Layer.
173 * \param[in] pHwRef pHwRef is the Information of
174 * the Device Interface Link .
175 * \param[in] pPipeHandle pPipeHandle is the handle used to open
176 * the Static or Dynamically Created Pipe.
178 * \retval NFCSTATUS_PENDING Pipe Open is pending.
179 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
180 * could not be interpreted properly.
181 * \retval Other errors Errors related to the lower layers
188 phHciNfc_sContext_t *psContext,
190 phHciNfc_Pipe_Info_t *pPipeHandle
194 * \ingroup grp_hci_nfc
196 * The phHciNfc_Close_Pipe function closes
199 * \param[in] psContext psContext is pointer to the context
200 * Structure of the HCI Layer.
201 * \param[in] pHwRef pHwRef is the Information of
202 * the Device Interface Link .
203 * \param[in] pPipeHandle pPipeHandle is the handle used to closes
204 * the Static or Dynamically Created Pipe.
206 * \retval NFCSTATUS_PENDING Pipe close is pending.
207 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
208 * could not be interpreted properly.
209 * \retval Other errors Errors related to the lower layers
215 phHciNfc_Close_Pipe (
216 phHciNfc_sContext_t *psContext,
218 phHciNfc_Pipe_Info_t *pPipeHandle
222 * \ingroup grp_hci_nfc
224 * The phHciNfc_Delete_Pipe function deletes the dynamically created pipe
225 * using the supplied pipe handle.
227 * \param[in] psContext psContext is pointer to the context
228 * Structure of the HCI Layer.
229 * \param[in] pHwRef pHwRef is the Information of
230 * the Device Interface Link .
231 * \param[in] pPipeHandle pPipeHandle is the handle used to delete
232 * the Dynamically Created Pipe.
234 * \retval NFCSTATUS_PENDING Pipe Deletion is pending.
235 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
236 * could not be interpreted properly.
242 phHciNfc_Delete_Pipe(
243 phHciNfc_sContext_t *psHciContext,
245 phHciNfc_Pipe_Info_t *pPipeHandle
249 * \brief Creates and Update the Pipes during the Session
251 * This function Creates and Update the Pipes of all the Supported Gates
252 * for the already initialised session.
257 phHciNfc_Update_Pipe(
258 phHciNfc_sContext_t *psHciContext,
260 phHciNfc_PipeMgmt_Seq_t *p_pipe_seq
266 phHciNfc_CE_Pipes_OP(
267 phHciNfc_sContext_t *psHciContext,
269 phHciNfc_PipeMgmt_Seq_t *p_pipe_seq