error.h
来自「基于ARM和uC/OS-II实现的串口控制台」· C头文件 代码 · 共 78 行
H
78 行
/*******************************************************************************
**
** File Name: error.h
** Author: Zhoudan
** Last Modified: 2007-02-05
** Last Version: 0.1
** Environment: LPC2214/RVDSv2.2/uCOS-II2.52
** Descriptions:
**
*******************************************************************************/
#ifndef __ERROR_H__
#define __ERROR_H__
#define ERR_OK 0
#define SST39_NOT_FIND -1 // SST39VF3291没有找到
#define SST39_NOT_REG -2 // SST39VF3291没有注册
#define SST39_DATAPOLL_ERR -3 // SST39VF3291 DQ7翻转操作超时
#define FPGAINF0_NOT_REG -4 // fpgainf0_dev没挂接上去
#define FPGAINF1_NOT_REG -5 // fpgainf1_dev没挂接上去
#define FPGA_NOT_FIND -8 // fpga没找到
#define ARMINFLASH_NOT_FIND -6 // SST39VF3291没有找到
#define ARMINFLASH_NOT_REG -7 // SST39VF3291没有注册
/* 错误状态*/
#define CMS_ES_NOTERR 0 // 没有错误
#define CMS_ES_ETHERR ((uint32)1<<0) // 以太网芯片异常
#define CMS_ES_FPGAER ((uint32)1<<1) // FPGA芯片异常
#define CMS_ES_ICSERR ((uint32)1<<2) // 系统卡数据损坏
#define CMS_ES_ICUERR ((uint32)1<<3) // 用户卡数据损坏
#define CMS_ES_ERAMER ((uint32)1<<4) // 片外SRAM异常
#define CMS_ES_EFSHER ((uint32)1<<5) // 片外FLASH异常
#define CMS_ES_IFSHER ((uint32)1<<6) // 片内FLASH异常
/* 异常定义*/
#define ERR_WRITECFG -1 // 写规则配置错误
#define ERR_DATALEN -2 // 数据长度错误
#define ERR_CMDCRC -3 // 命令体CRC校验错误
#define ERR_DATACRC -4 // 数据体CRC校验错误
#define ERR_CFGCRC -5 // 规则配置CRC校验错误
#define ERR_DEKCRC -6 // DEK数据CRC校验错误
#define ERR_SN -7 // SN错误
#define ERR_WRITEDEK -8 // 写DEK数据错误
#define ERR_NULLPOINTER -9 // 空指针
#define ERR_BUFEMPTY -10 // buf为空
#define ERR_ETHTXQFULL -11 // 以太网发送队列满
#define ERR_FPGAERR -12 // FPGA错误
#define ERR_RECORD_ERR -13 //记录标志错误
/* Error Code */
#define ERR_NMP_SENDOK 0 //
#define ERR_NMP_RECVOK 0 // NMP packet is successful received
#define ERR_NMP_TTL -101 // TTL expend over
#define ERR_NMP_UNREACH -102 // destination address is unreachable
#define ERR_NMP_APPQFULL -103 // application layer message queue is full
#define ERR_NMP_APPERR -104 // error application layer flag
#define ERR_NMP_TAG -105 // forward interface is receive interface
#define ERR_NMP_ADD -106 // error destination network address
#define ERR_NMP_DEV_OPEN -107 // deveice can not be open
#define ERR_RTE_SUBNET -201 // invalid start or end subnet
#define ERR_RTE_POLICY -202 // invalid policy code
#define ERR_RTE_INTF -203 // invalid interface code
#define ERR_RTE_FLAG -204 // invalid flag code
#define ERR_RTE_MAXITEM -205 // routing table is full
#define ERR_RTE_DST -206 // can't find the subnet
#define ERR_CLI_SEARCHOK 0 //
#define ERR_CLI_PARA_OK 0
#define ERR_CLI_SEARCHERR -301
#define ERR_CLI_SEARCH_PARA_ERR -302
#define ERR_CLI_CMD_NOT_UNIQUE -303
#endif /* __ERROR_H__ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?