blob: cf1ac3a86b3c73953f531daec7b90fc4810e9fc9 [file] [log] [blame]
Nick Pelly5d9927b2010-09-23 12:47:58 -07001/*
2 * Copyright (C) 2010 NXP Semiconductors
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17/*!
18* =========================================================================== *
19* *
20* *
21* \file phHciNfc_AdminMgmt.h *
22* \brief HCI Header for the Admin Gate Management. *
23* *
24* *
25* Project: NFC-FRI-1.1 *
26* *
27* $Date: Mon Mar 29 17:34:48 2010 $ *
28* $Author: ing04880 $ *
29* $Revision: 1.7 $ *
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 $ *
31* *
32* =========================================================================== *
33*/
34
35
36#ifndef PHHCINFC_ADMINMGMT_H
37#define PHHCINFC_ADMINMGMT_H
38
39/*@}*/
40
41
42/**
43 * \name HCI
44 *
45 * File: \ref phHciNfc_AdminMgmt.h
46 *
47 */
48/*@{*/
49#define PHHCINFC_ADMINMGMT_FILEREVISION "$Revision: 1.7 $" /**< \ingroup grp_file_attributes */
50#define PHHCINFC_ADMINMGMT_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 */
51/*@}*/
52
53/*
54***************************** Header File Inclusion ****************************
55*/
56
57#include <phHciNfc_Generic.h>
58
59/*
60****************************** Macro Definitions *******************************
61*/
62
63#define EVT_HOT_PLUG 0x03
64
65/*
66******************** Enumeration and Structure Definition **********************
67*/
68
69/** \defgroup grp_hci_nfc HCI Component
70 *
71 *
72 */
73
74
75/*
76*********************** Function Prototype Declaration *************************
77*/
78
79/**
80 * \ingroup grp_hci_nfc
81 *
82 * The phHciNfc_Admin_Initialise function Initialises the AdminGate and opens the
83 * Admin Gate pipe
84 *
85 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
86 * context Structure.
87 * \param[in] pHwRef pHwRef is the Information of
88 * the Device Interface Link .
89 *
90 * \retval NFCSTATUS_PENDING AdminGate Initialisation is pending.
91 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
92 * could not be interpreted properly.
93 * \retval Other errors Errors related to the other layers
94 *
95 */
96
97extern
98NFCSTATUS
99phHciNfc_Admin_Initialise(
100 phHciNfc_sContext_t *psHciContext,
101 void *pHwRef
102 );
103
104/**
105 * \ingroup grp_hci_nfc
106 *
107 * The phHciNfc_Admin_Release function closes the opened pipes between
108 * the Host Controller Device and the NFC Device.
109 *
110 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
111 * context Structure.
112 * \param[in] pHwRef pHwRef is the Information of
113 * the Device Interface Link .
114 * \param[in] host_type host_type is the type of the host
115 * to be released.
116 *
117 * \retval NFCSTATUS_PENDING Release of the Admingate resources are
118 * pending.
119 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
120 * could not be interpreted properly.
121 * \retval Other errors Errors related to the other layers
122 *
123 */
124
125extern
126NFCSTATUS
127phHciNfc_Admin_Release(
128 phHciNfc_sContext_t *psHciContext,
129 void *pHwRef,
130 phHciNfc_HostID_t host_type
131 );
132
133
134/**
135 * \ingroup grp_hci_nfc
136 *
137 * The phHciNfc_Send_Admin_Cmd function Sends the Particular AdminGate
138 * command to the Host Controller Device.
139 *
140 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
141 * context Structure.
142 * \param[in] pHwRef pHwRef is the Information of
143 * the Device Interface Link .
144 * \param[in] cmd cmd to be sent to the Admin gate of the
145 * Host controller.
146 * \param[in] length Size of the data sent in the parameter.
147 * \param[in,out] params params contains the parameters that are
148 * required by the particular HCI command.
149 *
150 * \retval None
151 *
152 */
153
154extern
155NFCSTATUS
156phHciNfc_Send_Admin_Cmd (
157 phHciNfc_sContext_t *psHciContext,
158 void *pHwRef,
159 uint8_t cmd,
160 uint8_t length,
161 void *params
162 );
163
164
165/**
166 * \ingroup grp_hci_nfc
167 *
168 * The phHciNfc_Send_Admin_Cmd function Sends the Particular AdminGate
169 * command to the Host Controller Device.
170 *
171 * \param[in] psHciContext psHciContext is the pointer to HCI Layer
172 * context Structure.
173 * \param[in] pHwRef pHwRef is the Information of
174 * the Device Interface Link .
175 * \param[in] Event Event to be sent to the Admin gate of the
176 * Host controller.
177 * \param[in] length Size of the data sent in the parameter.
178 * \param[in,out] params params contains the parameters that are
179 * required by the particular HCI command.
180 *
181 * \retval None
182 *
183 */
184
185extern
186NFCSTATUS
187phHciNfc_Send_Admin_Event (
188 phHciNfc_sContext_t *psHciContext,
189 void *pHwRef,
190 uint8_t event,
191 uint8_t length,
192 void *params
193 );
194
195extern
196NFCSTATUS
197phHciNfc_Admin_CE_Init(
198 phHciNfc_sContext_t *psHciContext,
199 void *pHwRef,
200 phHciNfc_GateID_t ce_gate
201 );
202
203
204#endif
205