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