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_CE_B.h *
\r
22 * \brief HCI card emulation management routines. *
\r
25 * Project: NFC-FRI-1.1 *
\r
27 * $Date: Fri Aug 14 17:01:26 2009 $ *
\r
28 * $Author: ing04880 $ *
\r
29 * $Revision: 1.4 $ *
\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
36 #ifndef PHHCINFC_CE_B_H
\r
37 #define PHHCINFC_CE_B_H
\r
45 * File: \ref phHciNfc_CE_B.h
\r
49 #define PHHCINFC_CE_B_FILEREVISION "$Revision: 1.4 $" /**< \ingroup grp_file_attributes */
\r
50 #define PHHCINFC_CE_B_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
54 ***************************** Header File Inclusion ****************************
\r
57 #include <phHciNfc_Generic.h>
\r
60 ****************************** Macro Definitions *******************************
\r
62 #define HOST_CE_B_MODE_INDEX (0x01U)
\r
63 #define HOST_CE_B_PUPI_INDEX (0x02U)
\r
64 #define HOST_CE_B_AFI_INDEX (0x03U)
\r
65 #define HOST_CE_B_ATQB_INDEX (0x04U)
\r
66 #define HOST_CE_B_HIGH_LAYER_RESP_INDEX (0x05U)
\r
67 #define HOST_CE_B_DATA_RATE_MAX_INDEX (0x05U)
\r
70 ******************** Enumeration and Structure Definition **********************
\r
74 typedef enum phHciNfc_CE_B_Seq{
\r
75 HOST_CE_B_INVALID_SEQ,
\r
76 HOST_CE_B_PIPE_OPEN,
\r
79 HOST_CE_B_ENABLE_SEQ,
\r
80 HOST_CE_B_DISABLE_SEQ,
\r
81 HOST_CE_B_PIPE_CLOSE,
\r
82 HOST_CE_B_PIPE_DELETE
\r
83 }phHciNfc_CE_B_Seq_t;
\r
85 /* Information structure for the card emulation B gate */
\r
86 typedef struct phHciNfc_CE_B_Info{
\r
87 phHciNfc_CE_B_Seq_t current_seq;
\r
88 phHciNfc_CE_B_Seq_t next_seq;
\r
89 /* Pointer to the card emulation B pipe information */
\r
90 phHciNfc_Pipe_Info_t *p_pipe_info;
\r
93 } phHciNfc_CE_B_Info_t;
\r
96 *********************** Function Prototype Declaration *************************
\r
100 * \brief Allocates the resources of card emulation B management gate.
\r
102 * This function Allocates the resources of the card emulation B management
\r
103 * gate Information Structure.
\r
108 phHciNfc_CE_B_Init_Resources(
\r
109 phHciNfc_sContext_t *psHciContext
\r
113 * \ingroup grp_hci_nfc
\r
115 * The phHciNfc_CE_B_Get_PipeID function gives the pipe id of the card
\r
118 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
119 * context Structure.
\r
120 * \param[in] pHwRef pHwRef is the Information of
\r
121 * the Device Interface Link
\r
123 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
124 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
125 * could not be interpreted properly.
\r
130 phHciNfc_CE_B_Get_PipeID(
\r
131 phHciNfc_sContext_t *psHciContext,
\r
136 * \ingroup grp_hci_nfc
\r
138 * The phHciNfc_CE_B_Update_PipeInfo function updates the pipe_id of the card
\r
139 * emulation B gate management Structure.
\r
141 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
142 * context Structure.
\r
143 * \param[in] pipeID pipeID of the card emulation A gate
\r
144 * \param[in] pPipeInfo Update the pipe Information of the reader
\r
147 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
148 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
149 * could not be interpreted properly.
\r
155 phHciNfc_CE_B_Update_PipeInfo(
\r
156 phHciNfc_sContext_t *psHciContext,
\r
158 phHciNfc_Pipe_Info_t *pPipeInfo
\r
162 * \ingroup grp_hci_nfc
\r
164 * The phHciNfc_CE_B_SendData_Event function sends data to the PN544
\r
166 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
167 * context Structure.
\r
168 * \param[in] pHwRef pHwRef is the Information of
\r
169 * the Device Interface Link
\r
170 * \param[in] pipeID pipeID of the card emulation B gate
\r
171 * \param[in] pPipeInfo Update the pipe Information of the card
\r
174 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
175 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
176 * could not be interpreted properly.
\r
179 #ifdef CE_B_SEND_EVENT
\r
182 phHciNfc_CE_B_SendData_Event(
\r
188 #endif /* #ifdef CE_B_SEND_EVENT */
\r
191 * \ingroup grp_hci_nfc
\r
193 * The phHciNfc_CE_B_Mode function sends data to the set the card emulation mode
\r
195 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
196 * context Structure.
\r
197 * \param[in] pHwRef pHwRef is the Information of
\r
198 * the Device Interface Link
\r
199 * \param[in] enable_type type to enable
\r
201 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
202 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
203 * could not be interpreted properly.
\r
207 phHciNfc_CE_B_Mode(
\r
210 uint8_t enable_type
\r
214 * \ingroup grp_hci_nfc
\r
216 * The phHciNfc_CE_B_Initialise function opens the CE B and set all the
\r
217 * required parameters for CE B
\r
219 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
220 * context Structure.
\r
221 * \param[in] pHwRef pHwRef is the Information of
\r
222 * the Device Interface Link
\r
224 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
225 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
226 * could not be interpreted properly.
\r
231 phHciNfc_CE_B_Initialise(
\r
232 phHciNfc_sContext_t *psHciContext,
\r
237 * \ingroup grp_hci_nfc
\r
239 * The phHciNfc_CE_B_Initialise function close the CE B and reset all the
\r
240 * required parameters to default value of CE B
\r
242 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
243 * context Structure.
\r
244 * \param[in] pHwRef pHwRef is the Information of
\r
245 * the Device Interface Link
\r
247 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
248 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
249 * could not be interpreted properly.
\r
254 phHciNfc_CE_B_Release(
\r
255 phHciNfc_sContext_t *psHciContext,
\r
260 * \ingroup grp_hci_nfc
\r
262 * The phHciNfc_CE_B_Update_Seq function to update CE B sequence depending on the
\r
263 * specified \ref seq_type
\r
265 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
266 * context Structure.
\r
267 * \param[in] seq_type sequence type specified in
\r
268 * \ref phHciNfc_eSeqType_t
\r
270 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
271 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
272 * could not be interpreted properly.
\r
277 phHciNfc_CE_B_Update_Seq(
\r
278 phHciNfc_sContext_t *psHciContext,
\r
279 phHciNfc_eSeqType_t seq_type
\r
282 #endif /* PHHCINFC_CE_B_H */
\r