code update
[adaptation/devices/nfc-plugin-nxp.git] / src / phFriNfc_ISO15693Format.h
1 /*\r
2  * Copyright (C) 2010 NXP Semiconductors\r
3  *\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
7  *\r
8  *      http://www.apache.org/licenses/LICENSE-2.0\r
9  *\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
15  */\r
16 \r
17 /*!\r
18 * \file  phFriNfc_ISO15693Format.h\r
19 * \brief ISO-15693 Smart card formatting.\r
20 *\r
21 * Project: NFC-FRI\r
22 *\r
23 * $Date:  $\r
24 * $Author: ing02260 $\r
25 * $Revision: 1.0 $\r
26 * $Aliases:  $\r
27 *\r
28 */\r
29 \r
30 #ifndef PHFRINFC_ISO15693FORMAT_H\r
31 #define PHFRINFC_ISO15693FORMAT_H\r
32 \r
33 /****************************** Macro definitions start ********************************/\r
34 \r
35 /****************************** Macro definitions end ********************************/\r
36 \r
37 /****************************** Data structures start ********************************/\r
38 \r
39 /****************************** Data structures end ********************************/\r
40 \r
41 /*********************** External function declarations start ***********************/\r
42 /*!\r
43 * \brief \copydoc page_reg Resets the component instance to the initial state and lets the component forget about\r
44 *        the list of registered items. Moreover, the lower device is set.\r
45 *\r
46 * \param[in] NdefSmtCrdFmt Pointer to a valid or uninitialized instance of \ref phFriNfc_sNdefSmtCrdFmt_t.\r
47 *\r
48 * \note  This function has to be called at the beginning, after creating an instance of\r
49 *        \ref phFriNfc_sNdefSmtCrdFmt_t. Use this function to reset the instance of smart card\r
50 formatting context variables.\r
51 */\r
52 void \r
53 phFriNfc_ISO15693_FmtReset (\r
54     phFriNfc_sNdefSmtCrdFmt_t *psNdefSmtCrdFmt);\r
55 \r
56 /*!\r
57 * \ingroup grp_fri_smart_card_formatting\r
58 *\r
59 * \brief Initiates the card formatting procedure for Remote Smart Card Type.\r
60 *\r
61 * \copydoc page_ovr The function initiates and formats the ISO-15693 Card.After this \r
62 *                   operation,remote card would be properly initialized and \r
63 *                   Ndef Compliant.Depending upon the different card type, this \r
64 *                   function handles formatting procedure.This function also handles\r
65 *                   the different recovery procedures for different types of the cards. \r
66 *                   For both Format and Recovery Management same API is used.\r
67\r
68 * \param[in] phFriNfc_sNdefSmartCardFmt_t Pointer to a valid instance of the \ref phFriNfc_sNdefSmartCardFmt_t\r
69 *                             structure describing the component context.\r
70 *\r
71 * \retval NFCSTATUS_SUCCESS                  Card formatting has been successfully completed.\r
72 * \retval NFCSTATUS_PENDING                  The action has been successfully triggered.\r
73 * \retval NFCSTATUS_FORMAT_ERROR             Error occured during the formatting procedure.\r
74 * \retval NFCSTATUS_INVALID_REMOTE_DEVICE    Card Type is unsupported.\r
75 * \retval NFCSTATUS_INVALID_DEVICE_REQUEST   Command or Operation types are mismatching.\r
76 *\r
77 */\r
78 NFCSTATUS \r
79 phFriNfc_ISO15693_Format (\r
80     phFriNfc_sNdefSmtCrdFmt_t *psNdefSmtCrdFmt);\r
81 \r
82 /**\r
83 *\ingroup grp_fri_smart_card_formatting\r
84 *\r
85 * \brief Smart card Formatting \b Completion \b Routine or \b Process function\r
86 *\r
87 * \copydoc page_ovr Completion Routine: This function is called by the lower layer (OVR HAL)\r
88 *                  when an I/O operation has finished. The internal state machine decides\r
89 *                  whether to call into the lower device again or to complete the process\r
90 *                  by calling into the upper layer's completion routine, stored within this\r
91 *                  component's context (\ref phFriNfc_sNdefSmtCrdFmt_t).\r
92 *\r
93 * The function call scheme is according to \ref grp_interact. No State reset is performed during\r
94 * operation.\r
95 *\r
96 * \param[in] Context The context of the current (not the lower/upper) instance, as set by the lower,\r
97 *            calling layer, upon its completion.\r
98 * \param[in] Status  The completion status of the lower layer (to be handled by the implementation of\r
99 *                    the state machine of this function like a regular return value of an internally\r
100 *                    called function).\r
101 *\r
102 * \note For general information about the completion routine interface please see \ref pphFriNfc_Cr_t . \r
103 * The Different Status Values are as follows\r
104 *\r
105 */\r
106 void \r
107 phFriNfc_ISO15693_FmtProcess (\r
108     void        *pContext,\r
109     NFCSTATUS   Status);\r
110 \r
111 /*********************** External function declarations end ***********************/\r
112 \r
113 #endif /* #define PHFRINFC_ISO15693FORMAT_H */\r
114 \r
115 \r
116 \r