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