capdebug.h

来自「pci 底层驱动」· C头文件 代码 · 共 61 行

H
61
字号
//==========================================================================;
//
//  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
//  PURPOSE.
//
//  Copyright (c) 1992 - 1996  Microsoft Corporation.  All Rights Reserved.
//
//==========================================================================;


#ifndef __CAPDEBUG_H
#define __CAPDEBUG_H

extern "C" {

#define DRIVER_POOL_TAG     'Cnxt'

#define DEBUG_PREFIX_ERROR  "cx88ir (error): "
#define DEBUG_PREFIX_INFO   "cx88ir: "
#define DEBUG_PREFIX_TRACE  "cx88ir: "
#define DEBUG_PREFIX        "cx88ir: "

extern LONG g_debug_level;
extern BOOLEAN g_break_on_error;

#if DBG

	// Debug Logging
	// 0 = Errors only
	// 1 = Info, stream state changes, stream open close
	// 2 = Verbose trace

#define DbgLog(x)       { if( g_debug_level >= 0)  {KdPrint((DEBUG_PREFIX));KdPrint(x);} }
#define dbgLogInfo(x)   { if( g_debug_level >= 1)  {KdPrint((DEBUG_PREFIX_INFO));KdPrint(x);} }
#define dbgLogTrace(x)  { if( g_debug_level >= 2)  {KdPrint((DEBUG_PREFIX_TRACE));KdPrint(x);} }

#define dbgLogError(x) {                \
					   if (g_debug_level >= 0) {             \
					   KdPrint((DEBUG_PREFIX_ERROR));  \
					   KdPrint(x);                     \
					   if (g_break_on_error) {            \
					   KdBreakPoint();             \
					   }                               \
					   }                                   \
}

#else //_DEBUG

#define DbgLog(x)
#define dbgLogInfo(x)
#define dbgLogTrace(x)
#define dbgLogError(x)

#endif //_DEBUG

}

#endif // #ifndef __CAPDEBUG_H

⌨️ 快捷键说明

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