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
19 * =========================================================================== *
\r
22 * \file phHciNfc_Sequence.h *
\r
23 * \brief State Machine Management for the HCI and the Function Sequence *
\r
24 * for a particular State. *
\r
27 * Project: NFC-FRI-1.1 *
\r
29 * $Date: Fri Aug 14 17:01:28 2009 $ *
\r
30 * $Author: ing04880 $ *
\r
31 * $Revision: 1.12 $ *
\r
32 * $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
34 * =========================================================================== *
\r
38 #ifndef PHHCINFC_SEQUENCE_H
\r
39 #define PHHCINFC_SEQUENCE_H
\r
47 * File: \ref phHciNfc_Sequence.h
\r
52 #define PHHCINFC_SEQUENCE_FILEREVISION "$Revision: 1.12 $" /**< \ingroup grp_file_attributes */
\r
53 #define PHHCINFC_SEQUENCE_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
58 ################################################################################
\r
59 ***************************** Header File Inclusion ****************************
\r
60 ################################################################################
\r
63 #include <phHciNfc_Generic.h>
\r
66 ################################################################################
\r
67 ****************************** Macro Definitions *******************************
\r
68 ################################################################################
\r
72 ################################################################################
\r
73 ************************* Function Prototype Declaration ***********************
\r
74 ################################################################################
\r
79 * \ingroup grp_hci_nfc
\r
81 * The phHciNfc_FSM_Update function Validates the HCI State to
\r
82 * the next operation ongoing.
\r
84 * \param[in] psHciContext psHciContext is the context of
\r
86 * \param[in] state state is the state to which the
\r
87 * current HCI Layer state is validated.
\r
88 * \param[in] validate_type validate the state by the type of the
\r
89 * validation required.
\r
91 * \retval NFCSTATUS_SUCCESS FSM Validated successfully .
\r
92 * \retval NFCSTATUS_INVALID_STATE The supplied state parameter is invalid.
\r
98 phHciNfc_FSM_Validate(
\r
99 phHciNfc_sContext_t *psHciContext,
\r
100 phHciNfc_eState_t state,
\r
101 uint8_t validate_type
\r
105 * \ingroup grp_hci_nfc
\r
107 * The phHciNfc_FSM_Update function Checks and Updates the HCI State to
\r
108 * the next valid State.
\r
110 * \param[in] psHciContext psHciContext is the context of
\r
112 * \param[in] next_state next_state is the state to which
\r
113 * we the HCI Layer.
\r
114 * \param[in] transition transiton of the state whether
\r
115 * ongoing or complete .
\r
117 * \retval NFCSTATUS_SUCCESS FSM Updated successfully .
\r
118 * \retval NFCSTATUS_INVALID_STATE The supplied state parameter is invalid.
\r
124 phHciNfc_FSM_Update(
\r
125 phHciNfc_sContext_t *psHciContext,
\r
126 phHciNfc_eState_t next_state
\r
130 * \ingroup grp_hci_nfc
\r
132 * The phHciNfc_FSM_Complete function completes the ongoing state transition
\r
133 * from the current state to the next state.
\r
135 * \param[in] psHciContext psHciContext is the context of
\r
138 * \retval NFCSTATUS_SUCCESS FSM Updated successfully .
\r
139 * \retval NFCSTATUS_INVALID_STATE The supplied state parameter is invalid.
\r
145 phHciNfc_FSM_Complete(
\r
146 phHciNfc_sContext_t *psHciContext
\r
151 * \ingroup grp_hci_nfc
\r
153 * The phHciNfc_FSM_Rollback function rolls back to previous valid state
\r
154 * and abort the ongoing state transition.
\r
156 * \param[in] psHciContext psHciContext is the context of
\r
165 phHciNfc_FSM_Rollback(
\r
166 phHciNfc_sContext_t *psHciContext
\r
172 * \ingroup grp_hci_nfc
\r
174 * The phHciNfc_Initialise_Sequence function sequence initialises the
\r
175 * HCI layer and the remote device by performing the operations required
\r
176 * setup the reader and discovery functionality.
\r
178 * \param[in] psHciContext psHciContext is the context of
\r
180 * \param[in] pHwRef pHwRef is the Information of
\r
181 * the Device Interface Link .
\r
183 * \retval NFCSTATUS_SUCCESS HCI current initialise sequence successful.
\r
184 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
185 * could not be interpreted properly.
\r
186 * \retval Other errors Other related errors
\r
193 phHciNfc_Initialise_Sequence(
\r
194 phHciNfc_sContext_t *psHciContext,
\r
199 * \ingroup grp_hci_nfc
\r
201 * The phHciNfc_PollLoop_Sequence function sequence starts the
\r
202 * discovery sequence of device.
\r
204 * \param[in] psHciContext psHciContext is the context of
\r
206 * \param[in] pHwRef pHwRef is the Information of
\r
207 * the Device Interface Link .
\r
209 * \retval NFCSTATUS_SUCCESS HCI Discovery Configuration sequence successful.
\r
210 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
211 * could not be interpreted properly.
\r
212 * \retval Other errors Other related errors
\r
218 phHciNfc_PollLoop_Sequence(
\r
219 phHciNfc_sContext_t *psHciContext,
\r
225 * \ingroup grp_hci_nfc
\r
227 * The phHciNfc_EmulationCfg_Sequence function sequence configures the
\r
228 * device for different types of emulation supported.
\r
230 * \param[in] psHciContext psHciContext is the context of
\r
232 * \param[in] pHwRef pHwRef is the Information of
\r
233 * the Device Interface Link .
\r
235 * \retval NFCSTATUS_SUCCESS HCI Emulation Configuration
\r
236 * sequence successful.
\r
237 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
238 * could not be interpreted properly.
\r
239 * \retval Other errors Other related errors
\r
245 phHciNfc_EmulationCfg_Sequence(
\r
246 phHciNfc_sContext_t *psHciContext,
\r
252 * \ingroup grp_hci_nfc
\r
254 * The phHciNfc_SmartMx_Mode_Sequence function sequence configures the
\r
255 * SmartMx device for different modes by enabling and disabling polling.
\r
257 * \param[in] psHciContext psHciContext is the context of
\r
259 * \param[in] pHwRef pHwRef is the Information of
\r
260 * the Device Interface Link .
\r
262 * \retval NFCSTATUS_SUCCESS HCI SmartMX Mode Configuration
\r
263 * sequence successful.
\r
264 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
265 * could not be interpreted properly.
\r
266 * \retval Other errors Other related errors
\r
272 phHciNfc_SmartMx_Mode_Sequence(
\r
273 phHciNfc_sContext_t *psHciContext,
\r
279 * \ingroup grp_hci_nfc
\r
281 * The phHciNfc_Connect_Sequence function sequence selects the
\r
282 * discovered target for performing the transaction.
\r
284 * \param[in] psHciContext psHciContext is the context of
\r
286 * \param[in] pHwRef pHwRef is the Information of
\r
287 * the Device Interface Link .
\r
289 * \retval NFCSTATUS_SUCCESS HCI target selection sequence successful.
\r
290 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
291 * could not be interpreted properly.
\r
292 * \retval Other errors Other related errors
\r
298 phHciNfc_Connect_Sequence(
\r
299 phHciNfc_sContext_t *psHciContext,
\r
305 * \ingroup grp_hci_nfc
\r
307 * The phHciNfc_Disconnect_Sequence function sequence de-selects the
\r
308 * selected target .
\r
310 * \param[in] psHciContext psHciContext is the context of
\r
312 * \param[in] pHwRef pHwRef is the Information of
\r
313 * the Device Interface Link .
\r
315 * \retval NFCSTATUS_SUCCESS HCI target de-selection sequence successful.
\r
316 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
317 * could not be interpreted properly.
\r
318 * \retval Other errors Other related errors
\r
324 phHciNfc_Disconnect_Sequence(
\r
325 phHciNfc_sContext_t *psHciContext,
\r
330 * \ingroup grp_hci_nfc
\r
332 * The phHciNfc_Error_Sequence function sequence notifies the
\r
333 * error in the HCI sequence to the upper layer .
\r
335 * \param[in] psHciContext psHciContext is the context of
\r
337 * \param[in] pHwRef pHwRef is the Information of
\r
338 * the Device Interface Link .
\r
339 * \param[in] status Notify status information from the
\r
340 * HCI layer to the Upper Layer.
\r
343 * \retval NFCSTATUS_SUCCESS HCI Error sequence Notification successful.
\r
344 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
345 * could not be interpreted properly.
\r
346 * \retval Other errors Other related errors
\r
351 phHciNfc_Error_Sequence(
\r
354 NFCSTATUS error_status,
\r
361 * \ingroup grp_hci_nfc
\r
363 * The phHciNfc_Resume_Sequence function sequence resumes the
\r
364 * previous pending sequence of HCI .
\r
366 * \param[in] psHciContext psHciContext is the context of
\r
368 * \param[in] pHwRef pHwRef is the Information of
\r
369 * the Device Interface Link .
\r
371 * \retval NFCSTATUS_SUCCESS HCI sequence resume successful.
\r
372 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
373 * could not be interpreted properly.
\r
374 * \retval Other errors Other related errors
\r
380 phHciNfc_Resume_Sequence(
\r
381 phHciNfc_sContext_t *psHciContext,
\r
387 * \ingroup grp_hci_nfc
\r
389 * The phHciNfc_Release_Sequence function sequence releases the
\r
390 * HCI layer and the remote device by performing the operations required
\r
391 * release the reader and discovery functionality.
\r
393 * \param[in] psHciContext psHciContext is the context of
\r
395 * \param[in] pHwRef pHwRef is the Information of
\r
396 * the Device Interface Link .
\r
398 * \retval NFCSTATUS_SUCCESS HCI current release sequence successful.
\r
399 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
\r
400 * could not be interpreted properly.
\r
401 * \retval Other errors Other related errors
\r
408 phHciNfc_Release_Sequence(
\r
409 phHciNfc_sContext_t *psHciContext,
\r
415 ################################################################################
\r
416 ***************************** Function Definitions *****************************
\r
417 ################################################################################
\r