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_RFReaderB.h *
\r
22 * \brief HCI Reader B 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.5 $ *
\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
35 #ifndef PHHCINFC_RFREADERB_H
\r
36 #define PHHCINFC_RFREADERB_H
\r
44 * File: \ref phHciNfc_ReaderB.h
\r
48 #define PHHCINFC_RFREADERB_FILEREVISION "$Revision: 1.5 $" /**< \ingroup grp_file_attributes */
\r
49 #define PHHCINFC_RFREADERB_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
53 ***************************** Header File Inclusion ****************************
\r
56 #include <phHciNfc_Generic.h>
\r
59 ****************************** Macro Definitions *******************************
\r
62 /* Enable the reader B */
\r
63 #define HCI_READER_B_ENABLE 0x01U
\r
64 #define HCI_READER_B_INFO_SEQ 0x02U
\r
67 ******************** Enumeration and Structure Definition **********************
\r
69 typedef enum phHciNfc_ReaderB_Seq{
\r
73 RDR_B_HIGHER_LAYER_RESP,
\r
74 RDR_B_HIGHER_LAYER_DATA,
\r
77 } phHciNfc_ReaderB_Seq_t;
\r
79 /* Information structure for the reader B Gate */
\r
80 typedef struct phHciNfc_ReaderB_Info{
\r
81 /* Current running Sequence of the reader B Management */
\r
82 phHciNfc_ReaderB_Seq_t current_seq;
\r
83 /* Next running Sequence of the reader B Management */
\r
84 phHciNfc_ReaderB_Seq_t next_seq;
\r
85 /* Pointer to the reader B pipe information */
\r
86 phHciNfc_Pipe_Info_t *p_pipe_info;
\r
88 /* Flag to say about the multiple targets */
\r
89 uint8_t multiple_tgts_found;
\r
90 /* Reader B information */
\r
91 phHal_sRemoteDevInformation_t reader_b_info;
\r
92 /* Enable or disable reader gate */
\r
93 uint8_t enable_rdr_b_gate;
\r
94 /* UICC re-activation status */
\r
95 uint8_t uicc_activation;
\r
96 } phHciNfc_ReaderB_Info_t;
\r
99 *********************** Function Prototype Declaration *************************
\r
103 * \brief Allocates the resources of reader B management gate.
\r
105 * This function Allocates the resources of the reader B management
\r
106 * gate Information Structure.
\r
111 phHciNfc_ReaderB_Init_Resources(
\r
112 phHciNfc_sContext_t *psHciContext
\r
116 * \ingroup grp_hci_nfc
\r
118 * The phHciNfc_ReaderB_Get_PipeID function gives the pipe id of the reader B
\r
121 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
122 * context Structure.
\r
123 * \param[in] pHwRef pHwRef is the Information of
\r
124 * the Device Interface Link
\r
126 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
127 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
128 * could not be interpreted properly.
\r
133 phHciNfc_ReaderB_Get_PipeID(
\r
134 phHciNfc_sContext_t *psHciContext,
\r
140 * \ingroup grp_hci_nfc
\r
142 * The phHciNfc_ReaderB_Update_PipeInfo function updates the pipe_id of the reader B
\r
143 * gate management Structure.
\r
145 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
146 * context Structure.
\r
147 * \param[in] pipeID pipeID of the reader B gate
\r
148 * \param[in] pPipeInfo Update the pipe Information of the reader
\r
151 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
152 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
153 * could not be interpreted properly.
\r
159 phHciNfc_ReaderB_Update_PipeInfo(
\r
160 phHciNfc_sContext_t *psHciContext,
\r
162 phHciNfc_Pipe_Info_t *pPipeInfo
\r
166 * \ingroup grp_hci_nfc
\r
168 * The phHciNfc_ReaderB_Info_Sequence function executes the sequence of operations, to
\r
169 * get the PUPI, AFI, APPLICATION_DATA etc.
\r
171 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
172 * context Structure.
\r
173 * \param[in] pHwRef pHwRef is the Information of
\r
174 * the Device Interface Link
\r
176 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
177 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
178 * could not be interpreted properly.
\r
183 phHciNfc_ReaderB_Info_Sequence (
\r
189 * \ingroup grp_hci_nfc
\r
191 * The phHciNfc_ReaderB_Update_Info function updates the reader B information.
\r
193 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
194 * context Structure.
\r
195 * \param[in] infotype To enable the reader B gate
\r
196 * \param[in] rdr_b_info reader B gate info
\r
198 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
199 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
200 * could not be interpreted properly.
\r
205 phHciNfc_ReaderB_Update_Info(
\r
206 phHciNfc_sContext_t *psHciContext,
\r
212 * \ingroup grp_hci_nfc
\r
214 * The phHciNfc_ReaderB_Set_LayerData function updates higher layer data
\r
217 * \param[in] psContext psContext is the pointer to HCI Layer
\r
218 * context Structure.
\r
219 * \param[in] pHwRef pHwRef is the Information of
\r
220 * the Device Interface Link
\r
221 * \param[in] layer_data_info layer data information
\r
223 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
224 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
225 * could not be interpreted properly.
\r
230 phHciNfc_ReaderB_Set_LayerData(
\r
233 phNfc_sData_t *layer_data_info
\r
237 * \ingroup grp_hci_nfc
\r
239 * The phHciNfc_ReaderB_Set_AFI function updates application family
\r
240 * identifier registry
\r
242 * \param[in] psContext psContext 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
246 * \param[in] afi_value to afi value update
\r
248 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
249 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
250 * could not be interpreted properly.
\r
255 phHciNfc_ReaderB_Set_AFI(
\r
260 #endif /* #ifndef PHHCINFC_RFREADERB_H */
\r