error.h

来自「ADS下的bios工程」· C头文件 代码 · 共 95 行

H
95
字号
#ifndef _BIOS_ERROR_H
#define _BIOS_ERROR_H

#include <bios/types.h>

struct BIOS_ERR_STR
{
	u32  err_code;
	u8   *err_string;
};

extern u8 *errors(u32 err_code); 
extern void error_msg(char *err); 

#ifndef BIOS_CMD_ERR_STRS
#define BIOS_CMD_ERR_STRS

/* BIOS CLI Sysntax Error Code(Base = 0x10000) */
#define ERROR_BAD_COMMAND               0x10000
#define ERROR_TOO_FEW_ARGUMENT 	        0x10001
#define ERROR_TOO_MANY_ARGUMENT         0x10002
#define ERROR_TOO_LONG_COMMAND 	        0x10003
#define ERROR_ILLEGAL_ARGUMENT          0x10004
#define ERROR_ADDRSIZE_NEGATIVE         0x10005
#define ERROR_MISS_ARGUMENTS            0x10006
#define ERROR_MATCH_COMMAND             0x10007
#define ERROR_PREVIOUS_COMMAND          0x10008
#define ERROR_BOOT_DEV_INIT             0x10009
#define ERROR_BOOT_DEV_START            0x1000a
#define ERROR_BOOT_DEV_LOAD             0x1000b
#define ERROR_BOOT_FAIL                 0x1000c
#define ERROR_NO_BOOT_DEV               0x1000d
#define ERROR_NOT_SUPPORT               0x1000f
#endif /* BIOS_CMD_ERR_STRS */

#ifndef BIOS_DEV_ERR_STRS
#define BIOS_DEV_ERR_STRS

/* Manual BIOS Error from 0x20000  */
#define ERROR_MANDIAG_DRAM				0x20000
#define ERROR_MANDIAG_SRAM				0x20001
#define ERROR_MANDIAG_FLASH				0x20002
#define ERROR_MANDIAG_BOOT				0x20003
#define ERROR_MANDIAG_NVRAM				0x20004
#define ERROR_MANDIAG_FORCE				0x20005
#define ERROR_MANDIAG_SWRESET	        0x20006
#define ERROR_MANDIAG_UART				0x20007
#define ERROR_MANDIAG_CALLER	        0x20008
#define ERROR_ADDRLINE_DRAM				0x20009
#define ERROR_ADDRLINE_SRAM				0x2000a
#define ERROR_ADDRLINE_FLASH	        0x2000b
#define ERROR_ADDRLINE_NVRAM	        0x2000c
#define ERROR_DRAM_BURST 				0x2000d
#define ERROR_NVRAM_BURST				0x2000e
#define ERROR_DISPLAY_ADDRESS_BOUNDARY  0x2000f
#endif /* BIOS_DEV_ERR_STRS */

#ifndef BIOS_FS_ERR_STRS
#define BIOS_FS_ERR_STRS

/* File System Error Code Base = 0x50000 */
#define ERROR_OPEN_FILE					0x50000
#endif /* BIOS_FS_ERR_STRS */

#ifndef BIOS_TFTP_ERR_STRS
#define BIOS_TFTP_ERR_STRS

/* TFTP Download Error Code(Base = 0x60000)*/
#define ERROR_TFTP_DOWNLOALD_NOT_COMPLETE 0x60000
#endif /* BIOS_TFTP_ERR_STRS */



#ifndef BIOS_FLASH_ERR_STRS
#define BIOS_FLASH_ERR_STRS

/* Flash Driver Error Code(Base=0x70000) */
#define FLASH_NONVALID_VENDOR_ID        0x70000
#define FLASH_NONVALID_DEVICE           0x70001
#define FLASH_PROGRAM_FAIL              0x70002

#define	ERROR_CODE						0x8000b
#define NO_RES_ERROR					0x8000c   /* no responding error !! */
#define ERROR_RIB_BYTE_WRITE       		0x8000d
#define ERROR_RIB_BYTE_READ				0x8000e

#endif /* BIOS_FLASH_ERR_STRS */


/* MAC Driver Error Code(Base = 0x90000)*/
#define BIOS_SUCCESS						1
#define BIOS_ERROR							0

#endif /*  _BIOS_ERROR_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?