1a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/*
2a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * Copyright (C) 2010 NXP Semiconductors
3a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
4a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * Licensed under the Apache License, Version 2.0 (the "License");
5a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * you may not use this file except in compliance with the License.
6a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * You may obtain a copy of the License at
7a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
8a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *      http://www.apache.org/licenses/LICENSE-2.0
9a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
10a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * Unless required by applicable law or agreed to in writing, software
11a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * distributed under the License is distributed on an "AS IS" BASIS,
12a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * See the License for the specific language governing permissions and
14a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * limitations under the License.
15a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly */
16a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
17a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/**
18a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * \file  phNfcStatus.h
19a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * \brief NFC Status Values - Function Return Codes
20a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
21a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * Project: NFC MW / HAL
22a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
23a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * $Date: Wed Apr 29 16:28:21 2009 $
24a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * $Author: ing04880 $
25a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * $Revision: 1.31 $
26a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * $Aliases: NFC_FRI1.1_WK918_R24_1,NFC_FRI1.1_WK920_PREP1,NFC_FRI1.1_WK920_R25_1,NFC_FRI1.1_WK922_PREP1,NFC_FRI1.1_WK922_R26_1,NFC_FRI1.1_WK924_PREP1,NFC_FRI1.1_WK924_R27_1,NFC_FRI1.1_WK926_R28_1,NFC_FRI1.1_WK928_R29_1,NFC_FRI1.1_WK930_R30_1,NFC_FRI1.1_WK934_PREP_1,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 $
27a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
28a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly */
29a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
30a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#ifndef PHNFCSTATUS_H /* */
31a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define PHNFCSTATUS_H/* */
32a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
33a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#ifndef PH_FRINFC_EXCLUDE_FROM_TESTFW /* */
34a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
35a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/**
36a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  \name NFC Status
37a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
38a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * File: \ref phNfcStatus.h
39a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
40a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *\defgroup grp_retval ERROR Status Codes
41a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly */
42a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/*@{*/
43a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define PHNFCSTATUS_FILEREVISION "$Revision: 1.31 $" /**< \ingroup grp_file_attributes */
44a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define PHNFCSTATUS_FILEALIASES  "$Aliases: NFC_FRI1.1_WK918_R24_1,NFC_FRI1.1_WK920_PREP1,NFC_FRI1.1_WK920_R25_1,NFC_FRI1.1_WK922_PREP1,NFC_FRI1.1_WK922_R26_1,NFC_FRI1.1_WK924_PREP1,NFC_FRI1.1_WK924_R27_1,NFC_FRI1.1_WK926_R28_1,NFC_FRI1.1_WK928_R29_1,NFC_FRI1.1_WK930_R30_1,NFC_FRI1.1_WK934_PREP_1,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 */
45a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/*@}*/
46a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
47a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#endif /* PH_FRINFC_EXCLUDE_FROM_TESTFW */
48a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
49a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#include <phNfcTypes.h>
50a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
51a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/* Internally required by \ref PHNFCSTVAL. */
52a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define PHNFCSTSHL8                          (8U)
53a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/* Required by \ref PHNFCSTVAL. */
54a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define PHNFCSTBLOWER                        ((NFCSTATUS)(0x00FFU))
55a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
56a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/**
57a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  \name NFC Status Composition Macro
58a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
59a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  This is the macro which must be used to compose status values.
60a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
61a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  \param[in] phNfcCompID Component ID, as defined in \ref phNfcCompId.h .
62a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  \param[in] phNfcStatus Status values, as defined in \ref phNfcStatus.h .
63a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
64a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  \note The macro is not required for the \ref NFCSTATUS_SUCCESS value. This is the only
65a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *        return value to be used directly.
66a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *        For all other values it shall be used in assigment and conditional statements e.g.:
67a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *        - NFCSTATUS status = PHNFCSTVAL(phNfcCompID, phNfcStatus); ...
68a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *        - if (status == PHNFCSTVAL(phNfcCompID, phNfcStatus)) ...
69a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
70a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly */
71a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define PHNFCSTVAL(phNfcCompID, phNfcStatus)                                \
72a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly            ( ((phNfcStatus) == (NFCSTATUS_SUCCESS)) ? (NFCSTATUS_SUCCESS) :  \
73a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly                ( (((NFCSTATUS)(phNfcStatus)) & (PHNFCSTBLOWER)) |          \
74a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly                    (((uint16_t)(phNfcCompID)) << (PHNFCSTSHL8)) ) )     /**< \ingroup grp_retval
75a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly                                                                              Use this macro for return value composition. */
76a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define PHNFCSTATUS(phNfcStatus)  ((phNfcStatus) & 0x00FFU)
77a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define PHNFCCID(phNfcStatus)  (((phNfcStatus) & 0xFF00U)>>8)
78a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
79a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/**
80a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  \name Status Codes
81a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
82a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  Generic Status codes for the NFC components. Combined with the Component ID
83a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  they build the value (status) returned by each
84a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  function. Some Specific E.g.:\n
85a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  <UL>
86a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *      <LI> \ref grp_comp_id "Component ID" -  e.g. 0x10, plus                 </LI>
87a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *      <LI> status code as listed in this file - e.g. 0x03                     </LI>
88a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  </UL>
89a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  result in a status value of 0x0003.
90a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *
91a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  \note The \ref grp_comp_id "Component ID" used for return codes
92a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly     must not be \ref CID_NFC_NONE
93a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *        except for the value \ref NFCSTATUS_SUCCESS.
94a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly */
95a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/*@{*/
96a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
97a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
98a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The function indicates successful completion. */
99a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_SUCCESS                                       (0x0000)
100a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
101a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
102a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    At least one paramter could not be properly interpreted. */
103a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_INVALID_PARAMETER                             (0x0001)
104a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
105a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
106a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The buffer provided by the caller is too small. */
107a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_BUFFER_TOO_SMALL                              (0x0003)
108a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
109a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
110a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Device specifier/handle value is invalid for the operation. */
111a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_INVALID_DEVICE                                (0x0006)
112a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
113a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
114a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The function executed successfully but could have returned
115a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    more information than space provided by the caller. */
116a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_MORE_INFORMATION                              (0x0008)
117a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
118a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
119a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    No response from the remote device received: Time-out.*/
120a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_RF_TIMEOUT                                    (0x0009)
121a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
122a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
123a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    RF Error during data transaction with the remote device.*/
124a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_RF_ERROR                                      (0x000A)
125a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
126a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
127a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Not enough resources (e.g. allocation failed.). */
128a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_INSUFFICIENT_RESOURCES                        (0x000C)
129a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
130a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
131a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    A non-blocking function returns this immediately to indicate
132a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    that an internal operation is in progress. */
133a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_PENDING                                       (0x000D)
134a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
135a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
136a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    A board communication error occurred
137a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    (e.g. configuration went wrong). */
138a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_BOARD_COMMUNICATION_ERROR                     (0x000F)
139a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
140a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
141a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Invalid State of the particular state machine
142a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly */
143a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_INVALID_STATE									(0x0011)
144a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
145a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
146a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
147a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    This Layer is Not initialised, hence initialisation required.
148a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly */
149a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_NOT_INITIALISED								(0x0031)
150a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
151a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
152a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
153a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The Layer is already initialised, hence initialisation repeated.
154a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly */
155a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_ALREADY_INITIALISED							(0x0032)
156a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
157a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
158a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
159a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Feature not supported . */
160a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_FEATURE_NOT_SUPPORTED                         (0x0033)
161a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
162a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
163a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The Unregistration command has failed because the user wants to unregister on
164a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    an element for which he was not registered*/
165a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_NOT_REGISTERED								(0x0034)
166a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
167a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
168a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
169a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The Registration command has failed because the user wants to register on
170a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    an element for which he is already registered*/
171a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_ALREADY_REGISTERED							(0x0035)
172a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
173a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
174a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Single Tag with Multiple
175a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly	Protocol support detected. */
176a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_MULTIPLE_PROTOCOLS	 	                    (0x0036)
177a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
178a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
179a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Feature not supported . */
180a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_MULTIPLE_TAGS	 	                            (0x0037)
181a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
182a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
183a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    A DESELECT event has occurred. */
184a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_DESELECTED                                    (0x0038)
185a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
186a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
187a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    A RELEASE event has occurred. */
188a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_RELEASED                                      (0x0039)
189a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
190a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
191a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The operation is currently not possible or not allowed */
192a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_NOT_ALLOWED                                   (0x003A)
193a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
194a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
195a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly     The sytem is busy with the previous operation.
196a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly*/
197a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_BUSY											(0x006F)
198a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
199a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
200a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/* NDEF Mapping error codes */
201a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
202a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
203a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The remote device (type) is not valid for this request. */
204a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_INVALID_REMOTE_DEVICE                         (0x001D)
205a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
206a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
207a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Smart tag functionality not supported */
208a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_SMART_TAG_FUNC_NOT_SUPPORTED                  (0x0013)
209a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
210a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
211a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Read operation failed */
212a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_READ_FAILED                                   (0x0014)
213a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
214a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
215a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Write operation failed */
216a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_WRITE_FAILED                                  (0x0015)
217a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
218a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
219a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Non Ndef Compliant */
220a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_NO_NDEF_SUPPORT                               (0x0016)
221a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
222a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
223a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Could not proceed further with the write operation: reached card EOF*/
224a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_EOF_NDEF_CONTAINER_REACHED                    (0x001A)
225a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
226a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
227a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Incorrect number of bytes received from the card*/
228a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_INVALID_RECEIVE_LENGTH                        (0x001B)
229a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
230a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
231a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The data format/composition is not understood/correct. */
232a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_INVALID_FORMAT                                (0x001C)
233a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
234a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
235a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
236a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    There is not sufficient storage available. */
237a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_INSUFFICIENT_STORAGE                          (0x001F)
238a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
239a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
240a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The Ndef Format procedure has failed. */
241a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_FORMAT_ERROR                                  (0x0023)
242a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
243a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
244a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/*
245a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly * Macros Required for FRI Stack
246a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_INVALID_PARAMETER
247a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_CMD_ABORTED
248a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_FORMAT_STATUS
249a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFSTATUS_SUCCESS
250a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_INVALID_REMOTE_DEVICE
251a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_PENDING
252a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_EOF_NDEF_CONTAINED_REACHED
253a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_NO_NDEF_SUPPORT
254a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_SMART_TAG_FUNC_NOT_SUPPORTED
255a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_READ_FAILED
256a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_WRITE_FAILED
257a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_INVALID_RECEIVE_LENGTH
258a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_BUFFER_TOO_SMALL
259a5086a29ed4333070c7488765c22b6d3a8eef296Nick PellyNFCSTATUS_NODE_NOT_FOUND
260a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly*/
261a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
262a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
263a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/* 0x70 to 0xCF Values are Component Specific Error Values */
264a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
265a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
266a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
267a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Max number of Status Codes*/
268a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_FAILED										(0x00FF)
269a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
270a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/*@}*/
271a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
272a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#ifdef RFU_STATUS_CODES  /* To Be Removed later */
273a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
274a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
275a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The function/command has been aborted. */
276a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_CMD_ABORTED                                   (0x0002)
277a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
278a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
279a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  Repeated call of the connecting function is not allowed.
280a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *   \if hal
281a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *     \sa \ref phHalNfc_Connect
282a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *   \endif */
283a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_ALREADY_CONNECTED                             (0x0004)
284a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
285a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
286a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  Calling the polling function is not allowed when remote device
287a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *  are allready connected.
288a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *   \if hal
289a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *     \sa \ref phHalNfc_Poll
290a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly *   \endif */
291a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_MULTI_POLL_NOT_SUPPORTED                      (0x0005)
292a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
293a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
294a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
295a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    No target found after poll.*/
296a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_NO_DEVICE_FOUND                               (0x000A)
297a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
298a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
299a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    No target found after poll.*/
300a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_NO_TARGET_FOUND                               (0x000A)
301a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
302a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
303a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Attempt to disconnect a not connected remote device. */
304a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_NO_DEVICE_CONNECTED                           (0x000B)
305a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
306a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
307a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    External RF field detected. */
308a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_EXTERNAL_RF_DETECTED                          (0x000E)
309a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
310a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
311a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    Message is not allowed by the state machine
312a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    (e.g. configuration went wrong). */
313a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_MSG_NOT_ALLOWED_BY_FSM                        (0x0010)
314a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
315a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
316a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    No access has been granted. */
317a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_ACCESS_DENIED                                 (0x001E)
318a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
319a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
320a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    No registry node matches the specified input data. */
321a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_NODE_NOT_FOUND                                (0x0017)
322a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
323a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
324a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The current module is busy ; one might retry later */
325a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_SMX_BAD_STATE									(0x00F0)
326a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
327a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
328a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
329a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The Abort mechanism has failed for unexpected reason: user can try again*/
330a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_ABORT_FAILED									(0x00F2)
331a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
332a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
333a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly/** \ingroup grp_retval
334a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    The Registration command has failed because the user wants to register as target
335a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly    on a operating mode not supported*/
336a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#define NFCSTATUS_REG_OPMODE_NOT_SUPPORTED						(0x00F5)
337a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
338a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
339a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#endif
340a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
341a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
342a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly#endif /* PHNFCSTATUS_H */
343a5086a29ed4333070c7488765c22b6d3a8eef296Nick Pelly
344