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_Jewel.h *
\r
22 * \brief HCI Jewel Management Routines. *
\r
25 * Project: NFC-FRI-1.1 *
\r
27 * $Date: Mon Mar 29 17:34:50 2010 $ *
\r
28 * $Author: ing04880 $ *
\r
29 * $Revision: 1.3 $ *
\r
30 * $Aliases: 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_JEWEL_H
\r
36 #define PHHCINFC_JEWEL_H
\r
44 * File: \ref phHciNfc_Jewel.h
\r
48 #define PHHCINFC_JEWEL_FILEREVISION "$Revision: 1.3 $" /**< \ingroup grp_file_attributes */
\r
49 #define PHHCINFC_JEWEL_FILEALIASES "$Aliases: 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 /* Commands exposed to the upper layer */
\r
64 /* Enable the Jewel */
\r
65 #define HCI_JEWEL_ENABLE 0x01U
\r
66 #define HCI_JEWEL_INFO_SEQ 0x02U
\r
68 /* Jewel read write commands */
\r
69 #define NXP_JEWEL_RAW 0x23U
\r
72 ******************** Enumeration and Structure Definition **********************
\r
74 typedef enum phHciNfc_Jewel_Seq{
\r
75 JEWEL_READID_SEQUENCE,
\r
78 } phHciNfc_Jewel_Seq_t;
\r
80 /* Information structure for the Jewel Gate */
\r
81 typedef struct phHciNfc_Jewel_Info{
\r
82 /* Current running Sequence of the Jewel Management */
\r
83 phHciNfc_Jewel_Seq_t current_seq;
\r
84 /* Next running Sequence of the Jewel Management */
\r
85 phHciNfc_Jewel_Seq_t next_seq;
\r
86 /* Pointer to the Jewel pipe information */
\r
87 phHciNfc_Pipe_Info_t *p_pipe_info;
\r
89 /* Flag to say about the multiple targets */
\r
90 uint8_t multiple_tgts_found;
\r
91 /* Jewel information */
\r
92 phHal_sRemoteDevInformation_t s_jewel_info;
\r
93 /* Enable or disable reader gate */
\r
94 uint8_t enable_jewel_gate;
\r
95 /* UICC re-activation status */
\r
96 uint8_t uicc_activation;
\r
97 } phHciNfc_Jewel_Info_t;
\r
100 *********************** Function Prototype Declaration *************************
\r
104 * \brief Allocates the resources of Jewel management gate.
\r
106 * This function Allocates the resources of the Jewel management
\r
107 * gate Information Structure.
\r
112 phHciNfc_Jewel_Init_Resources(
\r
113 phHciNfc_sContext_t *psHciContext
\r
117 * \ingroup grp_hci_nfc
\r
119 * The phHciNfc_Jewel_Get_PipeID function gives the pipe id of the Jewel
\r
122 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
123 * context Structure.
\r
124 * \param[in] pHwRef pHwRef is the Information of
\r
125 * the Device Interface Link
\r
127 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
128 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
129 * could not be interpreted properly.
\r
134 phHciNfc_Jewel_Get_PipeID(
\r
135 phHciNfc_sContext_t *psHciContext,
\r
141 * \ingroup grp_hci_nfc
\r
143 * The phHciNfc_Jewel_Update_PipeInfo function updates the pipe_id of the Jewel
\r
144 * gate management Structure.
\r
146 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
147 * context Structure.
\r
148 * \param[in] pipeID pipeID of the Jewel gate
\r
149 * \param[in] pPipeInfo Update the pipe Information of the reader
\r
152 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
153 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
154 * could not be interpreted properly.
\r
160 phHciNfc_Jewel_Update_PipeInfo(
\r
161 phHciNfc_sContext_t *psHciContext,
\r
163 phHciNfc_Pipe_Info_t *pPipeInfo
\r
167 * \ingroup grp_hci_nfc
\r
169 * The phHciNfc_Jewel_Update_Info function updated the jewel gate info.
\r
171 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
172 * context Structure.
\r
173 * \param[in] infotype To enable the jewel gate
\r
174 * \param[in] jewel_info Jewel gate info
\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
182 phHciNfc_Jewel_Update_Info(
\r
183 phHciNfc_sContext_t *psHciContext,
\r
189 * \ingroup grp_hci_nfc
\r
191 * The phHciNfc_Jewel_Info_Sequence function executes the sequence of operations, to
\r
194 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
195 * context Structure.
\r
196 * \param[in] pHwRef pHwRef is the Information of
\r
197 * the Device Interface Link
\r
199 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
200 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
201 * could not be interpreted properly.
\r
206 phHciNfc_Jewel_Info_Sequence (
\r
212 * \ingroup grp_hci_nfc
\r
214 * The phHciNfc_Send_Jewel_Command function executes the command sent by the
\r
215 * upper layer, depending on the commands defined.
\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] pipe_id pipeID of the jewel gate
\r
222 * \param[in] cmd command that needs to be sent to the device
\r
223 * \param[in] length information length sent by the caller
\r
224 * \param[in] params information related to the command
\r
226 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
227 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
228 * could not be interpreted properly.
\r
232 phHciNfc_Send_Jewel_Command(
\r
233 phHciNfc_sContext_t *psContext,
\r
240 * \ingroup grp_hci_nfc
\r
242 * The phHciNfc_Jewel_GetRID function executes the command to read the ID
\r
244 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
\r
245 * context Structure.
\r
246 * \param[in] pHwRef pHwRef is the Information of
\r
247 * the Device Interface Link
\r
249 * \retval NFCSTATUS_SUCCESS Function execution is successful.
\r
250 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
251 * could not be interpreted properly.
\r
255 phHciNfc_Jewel_GetRID(
\r
256 phHciNfc_sContext_t *psHciContext,
\r
259 #endif /* #ifndef PHHCINFC_JEWEL_H */
\r