ODALID Librairie Carte MIFARE
v0.5
Chargement...
Recherche...
Aucune correspondance
MfErrNo.h
Aller à la documentation de ce fichier.
1
/*
2
*
3
* Copyright (c) 2009-2021 ODALID - https://odalid.com
4
*
5
*/
6
15
#ifndef MFERRNO_H
16
#define MFERRNO_H
17
18
#ifdef __cplusplus
19
extern
"C"
{
20
#endif
21
23
// INCLUDES
25
//#include <OsDefs.h>
26
28
// Reader Error Codes Base Address Start: 0000
29
// Base Address End: -999
31
#define READER_ERR_BASE_START 0
32
#define MI_OK 0
33
#define MI_CHK_OK 0
34
#define MI_CRC_ZERO 0
35
// ICODE1 Error Codes
36
#define I1_OK 0
37
#define I1_NO_ERR 0
39
#define MI_CRC_NOTZERO 1
41
#define MI_NOTAGERR (-1)
42
#define MI_CHK_FAILED (-1)
43
#define MI_CRCERR (-2)
44
#define MI_CHK_COMPERR (-2)
45
#define MI_EMPTY (-3)
46
#define MI_AUTHERR (-4)
47
#define MI_PARITYERR (-5)
48
#define MI_CODEERR (-6)
50
#define MI_SERNRERR (-8)
51
#define MI_KeyERR (-9)
52
#define MI_NOTAUTHERR (-10)
53
#define MI_BITCOUNTERR (-11)
54
#define MI_BYTECOUNTERR (-12)
55
#define MI_IDLE (-13)
56
#define MI_TRANSERR (-14)
57
#define MI_WRITEERR (-15)
58
#define MI_INCRERR (-16)
59
#define MI_DECRERR (-17)
60
#define MI_READERR (-18)
61
#define MI_OVFLERR (-19)
62
#define MI_POLLING (-20)
63
#define MI_FRAMINGERR (-21)
64
#define MI_ACCESSERR (-22)
65
#define MI_UNKNOWN_COMMAND (-23)
66
#define MI_COLLERR (-24)
67
#define MI_RESETERR (-25)
68
#define MI_INITERR (-25)
69
#define MI_INTERFACEERR (-26)
70
#define MI_ACCESSTIMEOUT (-27)
71
#define MI_NOBITWISEANTICOLL (-28)
72
#define MI_QUIT (-30)
73
#define MI_CODINGERR (-31)
74
#define MI_SENDBYTENR (-51)
75
#define MI_CASCLEVEX (-52)
76
#define MI_SENDBUF_OVERFLOW (-53)
77
#define MI_BAUDRATE_NOT_SUPPORTED (-54)
78
#define MI_SAME_BAUDRATE_REQUIRED (-55)
80
#define MI_WRONG_PARAMETER_VALUE (-60)
82
// ICODE1 Error Codes
83
#define I1_WRONGPARAM (-61)
84
#define I1_NYIMPLEMENTED (-62)
85
#define I1_TSREADY (-63)
87
#define I1_TIMEOUT (-70)
88
#define I1_NOWRITE (-71)
89
#define I1_NOHALT (-72)
90
#define I1_MISS_ANTICOLL (-73)
92
#define MI_TCL_PROTOCOL (-78)
94
#define I1_COMM_ABORT (-82)
96
#define MI_BREAK (-99)
97
#define MI_NY_IMPLEMENTED (-100)
98
#define MI_NO_MFRC (-101)
99
#define MI_MFRC_NOTAUTH (-102)
100
#define MI_WRONG_DES_MODE (-103)
101
#define MI_HOST_AUTH_FAILED (-104)
103
#define MI_WRONG_LOAD_MODE (-106)
104
#define MI_WRONG_DESKey (-107)
105
#define MI_MKLOAD_FAILED (-108)
106
#define MI_FIFOERR (-109)
107
#define MI_WRONG_ADDR (-110)
108
#define MI_DESKeyLOAD_FAILED (-111)
109
#define MI_RECBUF_OVERFLOW (-112)
110
#define MI_WRONG_SEL_CNT (-114)
112
#define MI_WRONG_TEST_MODE (-117)
113
#define MI_TEST_FAILED (-118)
114
#define MI_TOC_ERROR (-119)
115
#define MI_COMM_ABORT (-120)
116
#define MI_INVALID_BASE (-121)
117
#define MI_MFRC_RESET (-122)
118
#define MI_WRONG_VALUE (-123)
119
#define MI_VALERR (-124)
121
/* Status -129 to -255 are set by the library */
122
/* ------------------------------------------ */
123
124
#define MI_CARD_NOT_TCL (-131)
125
#define MI_RESPONSE_OVERFLOW (-132)
126
#define MI_RESPONSE_INVALID (-133)
127
#define MI_COMMAND_OVERFLOW (-134)
129
#define MI_WRONG_MAC_TOKEN (-149)
130
#define MI_WRONG_TOKEN (-150)
131
#define MI_NO_VALUE (-151)
132
#define MI_MFRC150 (-152)
133
#define MI_MFRC170 (-153)
135
#define MI_WRONG_BASEADDR (-180)
137
#define MI_NO_ERROR_TEXT_AVAIL (-199)
139
#define MI_FUNCTION_NOT_AVAILABLE (-240)
140
#define MI_SER_LENGTH_ERR (-241)
141
#define MI_SER_CHECKSUM_ERR (-242)
142
#define MI_SER_PROTO_ERR (-243)
143
#define MI_SER_PROTO_NAK (-244)
144
#define MI_SER_ACCESS_ERR (-245)
145
#define MI_SER_TIMEOUT_ERR (-246)
146
#define MI_SER_NORESP_ERR (-247)
147
#define MI_LIB_CALL_ERROR (-248)
148
#define MI_OUT_OF_MEMORY_ERROR (-249)
150
#define MI_DRIVER_FAILURE (-254)
152
#define MI_INTERFACE_FAILURE (-255)
153
#define MI_PROTOCOL_FAILURE (-256)
155
#define MI_SERERR (-260)
156
#define MI_CALLOPEN (-261)
157
#define MI_RESERVED_pBuffer_OVERFLOW (-262)
159
#define READER_ERR_BASE_END (-999)
162
// HostRdCom Error Codes Base Address Start: -1000
163
// Base Address End: -1100
165
#define COM_ERR_BASE_START (-1000)
166
#define COM_SUCCESS 0
167
#define COM_ERROR (COM_ERR_BASE_START -1)
168
#define COM_NO_INTERFACE_HANDLE (COM_ERR_BASE_START -2)
169
#define COM_INTERFACE_OPEN (COM_ERR_BASE_START -3)
170
#define COM_INTERFACE_NOT_OPEN (COM_ERR_BASE_START -4)
171
#define COM_CREATE_FILE_FAILED (COM_ERR_BASE_START -5)
172
#define COM_PURGE_COMM_FAILED (COM_ERR_BASE_START -6)
173
#define COM_GET_COMM_STATE_FAILED (COM_ERR_BASE_START -7)
174
#define COM_SETUP_COMM_FAILED (COM_ERR_BASE_START -8)
175
#define COM_SET_COMM_STATE_FAILED (COM_ERR_BASE_START -9)
176
#define COM_SET_COMM_MASK_FAILED (COM_ERR_BASE_START -10)
177
#define COM_SET_COMM_TIMEOUTS_FAILED (COM_ERR_BASE_START -11)
178
#define COM_WRONG_VALUE (COM_ERR_BASE_START -12)
179
#define COM_WSASTARTUP_FAILED (COM_ERR_BASE_START -13)
180
#define COM_WSA_SOCKET_FAILED (COM_ERR_BASE_START -14)
181
#define COM_GETSOCKOPT_FAILED (COM_ERR_BASE_START -15)
182
#define COM_READER_NOT_IN_RANGE (COM_ERR_BASE_START -16)
183
#define COM_CONNECT_FAILED (COM_ERR_BASE_START -17)
184
#define COM_NEW_FAILED (COM_ERR_BASE_START -18)
185
#define COM_INVALID_WT_HANDLE (COM_ERR_BASE_START -19)
186
#define COM_START_WT_FAILED (COM_ERR_BASE_START -20)
187
#define COM_INVALID_CB_HANDLE (COM_ERR_BASE_START -21)
188
#define COM_LEN_OVERFLOW (COM_ERR_BASE_START -22)
189
#define COM_RS232_SERCOM_ERR (COM_ERR_BASE_START -23)
190
#define COM_RS232_SEND_CMD_NO_DLE_ERR (COM_ERR_BASE_START -24)
191
#define COM_RS232_SEND_DEVICE_ERR (COM_ERR_BASE_START -25)
192
#define COM_RS232_RESP_CMD_NAK_ERR (COM_ERR_BASE_START -26)
193
#define COM_TIMEOUT (COM_ERR_BASE_START -27)
194
#define COM_RS232_RESP_TO_ERR (COM_ERR_BASE_START -28)
195
#define COM_RS232_RESP_OVERFLOW_ERR (COM_ERR_BASE_START -29)
196
#define COM_RS232_RECV_DEVICE_ERR (COM_ERR_BASE_START -30)
197
#define COM_RS232_RESP_UNDERFLOW_ERR (COM_ERR_BASE_START -31)
198
#define COM_RS232_DATALENGTH_ERR (COM_ERR_BASE_START -32)
199
#define COM_RS232_CHECKSUM_ERR (COM_ERR_BASE_START -33)
200
#define COM_RS232_TX_RX_SEQ_ERR (COM_ERR_BASE_START -34)
201
#define COM_RS232_COPY_DATA_ERR (COM_ERR_BASE_START -35)
202
#define COM_IRDA_SELECT_FAILED (COM_ERR_BASE_START -36)
203
#define COM_IRDA_SEND_TIMEOUT (COM_ERR_BASE_START -37)
204
#define COM_IRDA_SOCKET_NOT_READY (COM_ERR_BASE_START -38)
205
#define COM_IRDA_SEND_DEVICE_ERR (COM_ERR_BASE_START -39)
206
#define COM_IRDA_RECV_DEVICE_ERR (COM_ERR_BASE_START -40)
207
#define COM_IRDA_RECV_TIMEOUT (COM_ERR_BASE_START -41)
208
#define COM_IRDA_TX_RX_SEQ_ERR (COM_ERR_BASE_START -42)
209
#define COM_IRDA_COPY_DATA_ERR (COM_ERR_BASE_START -43)
210
#define COM_IRDA_LEN_ERR (COM_ERR_BASE_START -44)
211
#define COM_NO_PROTOCOL_SET (COM_ERR_BASE_START -45)
212
#define COM_USB_DLL_LOAD_ERR (COM_ERR_BASE_START -46)
213
#define COM_USB_MISSING_FCT_ADDR (COM_ERR_BASE_START -47)
214
#define COM_USB_SEND_DEVICE_ERR (COM_ERR_BASE_START -48)
215
#define COM_USB_RECV_DEVICE_ERR (COM_ERR_BASE_START -49)
216
#define COM_USB_TX_RX_SEQ_ERR (COM_ERR_BASE_START -50)
217
#define COM_USB_LEN_ERR (COM_ERR_BASE_START -51)
218
#define COM_USB_COPY_DATA_ERR (COM_ERR_BASE_START -52)
219
#define COM_USB_NO_DEVICE_FOUND (COM_ERR_BASE_START -53)
220
#define COM_USB_SEND_TIMEOUT (COM_ERR_BASE_START -54)
221
#define COM_USB_RECV_TIMEOUT (COM_ERR_BASE_START -55)
222
#define COM_USB_FILE_NOT_FOUND (COM_ERR_BASE_START -56)
223
#define COM_USB_ACCESS_DENIED (COM_ERR_BASE_START -57)
224
#define COM_RS232_ETX_DLE_EXPECTED (COM_ERR_BASE_START -58)
225
#define COM_TCP_RECV_DEVICE_ERR (COM_ERR_BASE_START -59)
226
#define COM_TCP_SEND_DEVICE_ERR (COM_ERR_BASE_START -60)
227
#define COM_ERROR_CRC (COM_ERR_BASE_START -70)
228
#define COM_ERROR_WRONG_SIZE (COM_ERR_BASE_START -71)
229
#define COM_ERR_BASE_END (COM_ERR_BASE_START -99)
232
// T=CL Error Codes Base Address Start: -1100
233
// Base Address End: -1150
235
#define TCL_ERR_BASE_START (COM_ERR_BASE_END -1)
237
#define TCL_OK 0
238
#define TCL_NOTAGERR (TCL_ERR_BASE_START -1)
239
#define TCL_CRCERR (TCL_ERR_BASE_START -2)
240
#define TCL_PRITYERR (TCL_ERR_BASE_START -3)
241
#define TCL_OTHERERR (TCL_ERR_BASE_START -4)
242
#define TCL_SERNRERR (TCL_ERR_BASE_START -5)
243
#define TCL_BITCOUNTERR (TCL_ERR_BASE_START -6)
244
#define TCL_POLLING (TCL_ERR_BASE_START -7)
245
#define TCL_RF_CHANNEL (TCL_ERR_BASE_START -8)
246
#define TCL_MULTACT_DISABLED (TCL_ERR_BASE_START -9)
247
#define TCL_MULTACT_ENABLED (TCL_ERR_BASE_START -10)
248
#define TCL_CID_NOT_ACTIVE (TCL_ERR_BASE_START -11)
249
#define TCL_BITANTICOLL (TCL_ERR_BASE_START -12)
250
#define TCL_UIDLEN (TCL_ERR_BASE_START -13)
251
#define TCL_CIDINVALID (TCL_ERR_BASE_START -14)
252
#define TCL_ATSLEN (TCL_ERR_BASE_START -15)
253
#define TCL_NO_ATS_AVAILABLE (TCL_ERR_BASE_START -16)
254
#define TCL_ATS_ERROR (TCL_ERR_BASE_START -17)
255
#define TCL_FATAL_PROTOCOL (TCL_ERR_BASE_START -18)
256
#define TCL_RECBUF_OVERFLOW (TCL_ERR_BASE_START -19)
257
#define TCL_SENDBYTENR (TCL_ERR_BASE_START -20)
258
#define TCL_TRANSMERR_HALTED (TCL_ERR_BASE_START -21)
259
#define TCL_TRANSMERR_NOTAG (TCL_ERR_BASE_START -22)
260
#define TCL_BAUDRATE_NOT_SUPPORTED_PICC (TCL_ERR_BASE_START -23)
261
#define TCL_CID_NOT_SUPPORTED (TCL_ERR_BASE_START -24)
262
#define TCL_NAD_NOT_SUPPORTED (TCL_ERR_BASE_START -25)
263
#define TCL_PROTOCOL_NOT_SUPPORTED (TCL_ERR_BASE_START -26)
264
#define TCL_PPS_FORMAT (TCL_ERR_BASE_START -27)
265
#define TCL_ERROR (TCL_ERR_BASE_START -28)
266
#define TCL_NADINVALID (TCL_ERR_BASE_START -30)
267
#define TCL_OTHER_ERR (TCL_ERR_BASE_START -31)
268
#define TCL_BAUDRATE_NOT_SUPPORTED_PCD (TCL_ERR_BASE_START -32)
269
#define TCL_CID_ACTIVE (TCL_ERR_BASE_START -33)
271
#define TCL_ERR_BASE_END (TCL_ERR_BASE_START -49)
274
// RdMUXError Codes Base Address Start: -1200
275
// Base Address End: -1250
276
// author: TR
278
#define RdMUX_ERR_BASE_START (TCL_ERR_BASE_END -51)
280
#define RdMUX_OK 0
281
#define RdMUX_NO_RD_AVAIL (RdMUX_ERR_BASE_START -1)
282
#define RdMUX_RdINDEX_OUT_OF_RANGE (RdMUX_ERR_BASE_START -2)
283
#define RdMUX_MUXMODE_NOT_SUPPORTED_RM (RdMUX_ERR_BASE_START -3)
284
#define RdMUX_SELECTED_RD_NAVAIL (RdMUX_ERR_BASE_START -4)
285
#define RdMUX_UNKNOWN_PARAMIDX (RdMUX_ERR_BASE_START -5)
286
#define RdMUX_SELECTIONLIST_EMPTY (RdMUX_ERR_BASE_START -6)
287
#define RdMUX_CHANGES_TREATED (RdMUX_ERR_BASE_START -7)
289
#define RdMUX_ERR_BASE_END (RdMUX_ERR_BASE_START -49)
292
// CardExchange and Base Address Start: -1250
293
// CardExchangeProtocol Error Codes Base Address End: -1300
295
#define CARDEX_ERR_BASE_START (RdMUX_ERR_BASE_END -1)
297
#define CARDEX_SUCCESS 0
298
#define CARDEX_INTERNAL_ERROR (CARDEX_ERR_BASE_START -1)
299
#define CARDEX_COMMUNICATION_ERROR (CARDEX_ERR_BASE_START -2)
300
#define CARDEX_TIMEOUT_ERROR (CARDEX_ERR_BASE_START -3)
301
#define CARDEX_NOT_SUPPORTED (CARDEX_ERR_BASE_START -4)
303
// Only for CardExchangeProtocol.
304
#define CARDEX_PROT_USERpBuffer_FULL (CARDEX_ERR_BASE_START -4)
306
#define CARDEX_ERR_BASE_END (CARDEX_ERR_BASE_START -49)
309
// ISO1444_4 Error Codes Base Address Start: -1300
310
// Base Address End: -1350
312
#define ISO14443_4_ERR_BASE_START (CARDEX_ERR_BASE_END -1)
314
#define ISO14443_4_SUCCESS 0
315
#define ISO14443_4_INVALID_PARAMETER (ISO14443_4_ERR_BASE_START -1)
316
#define ISO14443_4_BlockNR_NOT_EQUAL (ISO14443_4_ERR_BASE_START -2)
317
#define ISO14443_4_INVALID_FORMAT (ISO14443_4_ERR_BASE_START -3)
318
#define ISO14443_4_USERpBuffer_FULL (ISO14443_4_ERR_BASE_START -4)
320
#define ISO14443_4_ERR_BASE_END (ISO14443_4_ERR_BASE_START -49)
323
// CIDManager Error Codes Base Address Start: -1350
324
// Base Address End: -1400
326
#define CIDMAN_ERR_BASE_START (ISO14443_4_ERR_BASE_END -1)
328
#define CIDMAN_SUCCESS 0
329
#define CIDMAN_NO_CID_AVAILABLE (CIDMAN_ERR_BASE_START -1)
330
#define CIDMAN_CID_ALREADY_IN_USE (CIDMAN_ERR_BASE_START -2)
331
#define CIDMAN_INSTANCE_ALREADY_IN_USE (CIDMAN_ERR_BASE_START -3)
332
#define CIDMAN_CID_NOT_IN_USE (CIDMAN_ERR_BASE_START -4)
333
#define CIDMAN_INVALID_PARAMETER (CIDMAN_ERR_BASE_START -5)
335
#define CIDMAN_ERR_BASE_END (CIDMAN_ERR_BASE_START -49)
341
// Don't forget to provide error messages for added errors in MfErrNo.c!!
342
// At the end of a new added error Block specify the next base Address!!
343
344
// Next Base: -1400
345
346
347
348
// ---------------------------------------------------------------------------
349
// FUNCTION: GetErrMsg
350
// IN: err_nr Error number for which the appropriate error message
351
// is needed
352
// OUT: -
353
// RETURN: Appropriate error message for passed error number
354
// COMMENT: Searches the ErrList for the passed error number.
355
// If the error number is found, the approriate error number is
356
// return, otherwise "Unknown error" is returned.
357
// ---------------------------------------------------------------------------
358
//DLLEXP_IMP uint8_t* GetErrMsg(short err_nr);
359
360
#ifdef __cplusplus
361
}
362
#endif
363
364
#endif
// MFERRNO_H
365
367
// End of File
source
Common
MfErrNo.h
Généré par
1.12.0