📄 errcode.h
字号:
/**************************************Copyright (c)*************************************
** 广州周立功单片机发展有限公司
** 研 究 所
** 产品一部
**
** http://www.zlgmcu.com
**
**--------------文件信息----------------------------------------------------------------
** 文 件 名: StatusCode.h
** 文件描述: 状态代码
** 版 本: V1.0
** 创 建 人: 曾本森
** 创建日期: 2007.09.24
** 最后修改日期:
**=======================================================================================
**-----------------修改记录--------------------------------------------------------------
** 修改内容:
** 当前版本:
** 修 改 人:
** 修改日期:
** 注 意:
****************************************************************************************/
#ifndef __STATUS_CODE_H__
#define __STATUS_CODE_H__ /* */
/* S U C C E S S */
/*! \name Success
\ingroup error */
/*@{*/
#define MI_OK (0)
#define STATUS_SUCCESS (0) /*!< Returned in case of no error when there
isn't any more appropriate code. */
/*@}*/
/* C O M M U N I C A T I O N */
/*! \name Communication Errors/Status Values
\ingroup error */
/*@{*/
#define STATUS_IO_TIMEOUT (-1) /*!< No reply received, e.g. PICC removal. */
#define STATUS_CRC_ERROR (-2) /*!< Wrong CRC detected by RC or library. */
#define STATUS_PARITY_ERROR (-3) /*!< Parity error detected by RC or library. */
#define STATUS_BITCOUNT_ERROR (-4) /*!< Typically, the RC reports such an error. */
#define STATUS_FRAMING_ERROR (-5) /*!< Invalid frame format. */
#define STATUS_COLLISION_ERROR (-6) /*!< Typically, the RC repors such an error. */
#define STATUS_BUFFER_TOO_SMALL (-7) /*!< Communication buffer size insufficient. */
#define STATUS_ACCESS_DENIED (-8) /*!< Access has not been granted (readonly?). */
#define STATUS_BUFFER_OVERFLOW (-9) /*!< Attempt to write beyond the end of a
buffer. */
#define STATUS_PROTOCOL_ERROR (-10) /*!< Mifare start bit wrong, buffer length
error. */
#define STATUS_ERROR_NY_IMPLEMENTED (-11) /*!< Feature not yet implemented. */
#define STATUS_FIFO_WRITE_ERROR (-12) /*!< Error caused because of interface conflict
during write access to FIFO. */
#define STATUS_USERBUFFER_FULL (-13) /*!< The user buffer is full, the calling
application/routine gets the chance to
save user buffer data and start over. */
/*@}*/
/* I N T E R F A C E (Device as well as function parameters) errors: */
/*! \name Interface Errors/Status Values
\ingroup error */
/*@{*/
#define STATUS_INVALID_PARAMETER (-14) /*!< Parameter is invalid (range, format). */
#define STATUS_UNSUPPORTED_PARAMETER (-15) /*!< Parameter value/format is correct but not
supported in the current configuration. */
#define STATUS_UNSUPPORTED_COMMAND (-16) /*!< The device does not support the command. */
#define STATUS_INTERFACE_ERROR (-17) /*!< Host-peripheral interface error. */
#define STATUS_INVALID_FORMAT (-18) /*!< The data format does not match the spec. */
#define STATUS_INTERFACE_NOT_ENABLED (-19) /*!< This interface is currently(!) not
supported (e.g. function ptr. to NULL). */
/*@}*/
/* M F errors: */
/*! \name Mifare Errors/Status Values
\ingroup error */
/*@{*/
#define STATUS_AUTHENT_ERROR (-20) /*!< Authentication failure (e.g. key
mismatch). */
#define STATUS_ACK_SUPPOSED (-21) /*!< Single byte or nibble received, CRC error
detected, possibly MF (N)ACK response. */
/*@}*/
/* I S O 1 4 4 4 3 . 4 Level specific errors: */
/*! \name ISO 14443-4 Errors/Status Values
\ingroup error */
/*@{*/
#define STATUS_BLOCKNR_NOT_EQUAL (-22) /*!< Frame OK, but Blocknumber mismatch. */
/*@}*/
/* N F C Errors and Stati: */
/*! \name NFC Errors
\ingroup error */
/*@{*/
#define STATUS_TARGET_DEADLOCKED (-23) /*!< Target has not sent any data, but RF
(generated by the Target) is still switched on. */
#define STATUS_TARGET_SET_TOX (-24) /*!< Target has sent Timeout Extension Request. */
#define STATUS_TARGET_RESET_TOX (-25) /*!< Reset timeout-value after Timeout Extension. */
/*@}*/
/* I S O 1 4 4 4 3 . 3 Level specific errors: */
/*! \name ISO 14443-3 Errors/Status Values
\ingroup error */
/*@{*/
#define STATUS_WRONG_UID_CHECKBYTE (-26) /*!< UID check byte is wrong. */
#define STATUS_WRONG_HALT_FORMAT (-27) /*!< HALT Format error. */
/*@}*/
/* I D M A N A G E R specific errors: */
/*! \name ID-Manager Errors/Status Values
\ingroup error */
/*@{*/
#define STATUS_ID_ALREADY_IN_USE (-28) /*!< ID cannot be assigned because it is already used. */
#define STATUS_INSTANCE_ALREADY_IN_USE (-29) /*!< INSTANCE cannot be assigned because it is already used. */
#define STATUS_ID_NOT_IN_USE (-30) /*!< Specified ID is not in use. */
#define STATUS_NO_ID_AVAILABLE (-31) /*!< No ID is available, all are occupied. */
/*@}*/
/* O T H E R E R R O R S : */
/*! \name Other Errors/Status Values
\ingroup error */
/*@{*/
#define STATUS_OTHER_ERROR (-32) /*!< Unspecified, error, non-categorised. */
#define STATUS_INSUFFICIENT_RESOURCES (-33) /*!< The system runs low of resources! */
#define STATUS_INVALID_DEVICE_STATE (-34) /*!< The (sub-)system is in a state which
does not allow the operation. */
#define STATUS_RC522_TEMP_ERROR (-35) /*!< Temperature error indicated by Joiner HW.*/
/*@}*/
#define STATUS_INIT_ERROR (-36)
#define STATUS_NOBITWISEANTICOLL (-37)
#define STATUS_SERNR_ERROR (-38)
#define STATUS_NY_IMPLEMENTED (-39)
#define STATUS_ACCESS_TIMEOUT (-40)
#define MI_CHK_OK 0
#define MI_CRC_ZERO 0
#define MI_CRC_NOTZERO 1
#define MI_NOTAGERR (-1)
#define MI_CHK_FAILED (-1)
#define MI_CRCERR (-2)
#define MI_CHK_COMPERR (-2)
#define MI_EMPTY (-3)
#define MI_AUTHERR (-4)
#define MI_PARITYERR (-5)
#define MI_CODEERR (-6)
#define MI_SERNRERR (-8)
#define MI_KEYERR (-9)
#define MI_NOTAUTHERR (-10)
#define MI_BITCOUNTERR (-11)
#define MI_BYTECOUNTERR (-12)
#define MI_IDLE (-13)
#define MI_TRANSERR (-14)
#define MI_WRITEERR (-15)
#define MI_INCRERR (-16)
#define MI_DECRERR (-17)
#define MI_READERR (-18)
#define MI_OVFLERR (-19)
#define MI_POLLING (-20)
#define MI_FRAMINGERR (-21)
#define MI_ACCESSERR (-22)
#define MI_UNKNOWN_COMMAND (-23)
#define MI_COLLERR (-24)
#define MI_RESETERR (-25)
#define MI_INITERR (-25)
#define MI_INTERFACEERR (-26)
#define MI_ACCESSTIMEOUT (-27)
#define MI_NOBITWISEANTICOLL (-28)
#define MI_QUIT (-30)
#define MI_RECBUF_OVERFLOW (-50)
#define MI_SENDBYTENR (-51)
#define MI_SENDBUF_OVERFLOW (-53)
#define MI_BAUDRATE_NOT_SUPPORTED (-54)
#define MI_SAME_BAUDRATE_REQUIRED (-55)
#define MI_WRONG_PARAMETER_VALUE (-60)
#define MI_BREAK (-99)
#define MI_NY_IMPLEMENTED (-100)
#define MI_NO_MFRC (-101)
#define MI_MFRC_NOTAUTH (-102)
#define MI_WRONG_DES_MODE (-103)
#define MI_HOST_AUTH_FAILED (-104)
#define MI_WRONG_LOAD_MODE (-106)
#define MI_WRONG_DESKEY (-107)
#define MI_MKLOAD_FAILED (-108)
#define MI_FIFOERR (-109)
#define MI_WRONG_ADDR (-110)
#define MI_DESKEYLOAD_FAILED (-111)
#define MI_WRONG_SEL_CNT (-114)
#define MI_WRONG_TEST_MODE (-117)
#define MI_TEST_FAILED (-118)
#define MI_TOC_ERROR (-119)
#define MI_COMM_ABORT (-120)
#define MI_INVALID_BASE (-121)
#define MI_MFRC_RESET (-122)
#define MI_WRONG_VALUE (-123)
#define MI_VALERR (-124)
//=======================================================================================
#endif // __STATUS_CODE_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -