⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zformaterror.c

📁 zilog的实时操作系统RZK,可以移植到多种处理器上
💻 C
字号:
/*
* File				:	Zformaterror.c
*
* Description		:	This file contains code to return RZK error numbers
*
* Dependencies		:	None.
*
* Copyright 2004 ZiLOG Inc.  ALL RIGHTS RESERVED.
*
* This file contains unpublished confidential and proprietary information
* of ZiLOG, Inc.
* NO PART OF THIS WORK MAY BE DUPLICATED, STORED, PUBLISHED OR DISCLOSED 
* IN ANY FORM WITHOUT THE PRIOR WRITTEN CONSENT OF ZiLOG, INC.
* This is not a license and no use of any kind of this work is authorized
* in the absence of a written license granted by ZiLOG, Inc. in ZiLOG's 
* sole discretion 
*/
#include <stdio.h>
#include "ZSysgen.h"
#include "ZTypes.h"
#include "ZThread.h"

#define pCurrentThread ((RZK_TCB_t *) hCurrentThread)

extern RZK_THREADHANDLE_t hCurrentThread;


static INT8 *err_str[] = {
	"RZKERR_SUCCESS",
	"RZKERR_INVALID_HANDLE",
	"RZKERR_INVALID_ARGUMENTS",
	"RZKERR_INVALID_OPERATION",
	"RZKERR_CB_UNAVAILABLE",
	"RZKERR_QUEUE_EMPTY",
	"RZKERR_OBJECT_DELETED",
	"RZKERR_TIMEOUT",
	"RZKERR_INVALID_SIZE",
	"RZKERR_OBJECT_RESET",
	"RZKERR_OBJECT_IN_USE",
	"RZKERR_INVALID_STACK",
	"RZKERR_INVALID_PRIORITY",
	"RZKERR_QUEUE_FULL",
	"RZKERR_SCB_UNAVAILABLE",
	"RZKERR_OUT_OF_MEMORY",
	"RZKERR_CB_BUSY",
	"RZKERR_FATAL",
	"RZKERR_PREEMPTION_DISABLED",
	"RZKERR_INVALID_ERROR_NUMBER",
	"RZKERR_DEV_NOT_FOUND",      
	"RZKERR_DEV_IOERR",			
	"RZKERR_DEV_BUSY",			
	"RZKERR_DEV_INVALID_NAME",	
	"RZKERR_DEV_TIMEOUT",			
	"RZKERR_OPERATION_NOT_SUPPORTED", 
	"RZKERR_MEDIA",
	"RZKERR_EOF",
	"RZKERR_UNEXPECTED",
	"RZKERR_DEV_ALREADY_OPENED",
	"RZKERR_MAILBOX_FULL",
	"RZKERR_SEM_NOTOWNED",
	"RZKERR_DEV_NOT_INITIALIZED",
	"RZKERR_DEV_READ_BUSY",
	"RZKERR_DEV_WRITE_BUSY",
	"RZKERR_MSG_PRESENT"
};

/*
* Function			:	RZKFormatError
*
* Description		:	This function returns the string format of the given
*						error number
* 
* Inputs			:	num - Error number
*							
* Outputs			:	None.
*/
void RZKFormatError(RZK_STATUS_t num)	// IAR changed.
{
#ifdef RZK_KERNEL_AWARE
	printf("\nThread %s Status %s\n", pCurrentThread->szName, err_str[num]); 
#endif
} /* End of RZKFormatError */

⌨️ 快捷键说明

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