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