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

📄 dbglog.h

📁 windows mobile 6.13 dnldr下载源码
💻 H
字号:
/*******************************************************************************
 * Copyright:   Copyright (c) 2007. Hisilicon Technologies, CO., LTD. 
 * Version:     V300R001B04
 * Filename:    DbgLog.h
 * Description: 实现将字符串型调试信息输出到COM口或LCD上
 * History:
                1.Created by SunShaoJie on 2007/12/25
*******************************************************************************/

#ifndef DBG_LOG_H
#define DBG_LOG_H

#include "sys.h"

#ifdef DEBUG

/*******************************************************************************
Function:           WriteDebugString
Description:        将字符串输出到串口
*******************************************************************************/
void WriteDebugString(UINT8 *string);

/*******************************************************************************
  Function:     DbgLogSerial
  Description:  将带参数的调试信息先转换成字符串,再通过串口输出
*******************************************************************************/
void DbgLogSerial(UINT8 *format, ...);

/*******************************************************************************
  Function:     DbgLogMessage
  Description:  将带参数的调试信息先转换成字符串,再通过LCD或串口输出
*******************************************************************************/
void DbgLogMessage(UINT8 *format, ...);

	
	#define ZONEID_FUNCTION     29
	#define ZONEID_WARN         30
	#define ZONEID_ERROR        31
	
	#define DEBUGZONE(x)	(1<<(x))
	
	#define TEXT(x)			(x)

	#define ZONE_FUNCTION   0		//DEBUGZONE(ZONEID_FUNCTION)
	#define ZONE_WARN       DEBUGZONE(ZONEID_WARN)
	#define ZONE_ERROR      DEBUGZONE(ZONEID_ERROR)

	#define DEBUGMSG(cond, exp)  ((void)((cond)?(DbgLogMessage exp): FALSE ))


#ifdef HISI3610_CHIP
	#define OALMSG(cond, exp)  	 ((void)((cond)?(DbgLogSerial exp): FALSE ))
#else
	#define OALMSG(cond, exp)
#endif
	
    #define ASSERT(cond,exp) \
        if(!(cond)) {DbgLogMessage((UINT8 *)exp);while(TRUE);}
#else
	#define DEBUGMSG(cond, exp)
	#define OALMSG(cond, exp)
    #define ASSERT(cond, exp)
#endif


#endif

⌨️ 快捷键说明

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