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

📄 debug.h

📁 RTL8139 网卡驱动源码 for WinCE.net CEPC
💻 H
字号:
//****************************************************************************
//                              File DEBUG.H
//
//                            Debugging support
//
//                     Copyright (c) APSoft, 1998-2002.
//                          All rights reserved.
//
//****************************************************************************

#ifndef _DEBUG_H_
#define _DEBUG_H_


//--------------------------------- Types ------------------------------------

typedef unsigned char  BYTE;
typedef unsigned short WORD;
typedef unsigned long  DWORD;


//------------------------- Debugging definitions ----------------------------

#if DBG
#define STRACE_PNPDRV           DbgPrint

extern char szAssertMsg[];                  // Assertion message
#define ASSERTS_PNPDRV(n)       {   if (!(n))                                       \
                                    {                                               \
                                        DbgPrint(szAssertMsg, __FILE__, __LINE__);  \
                                        __asm int 3                                 \
                                    }                                               \
                                }
#else                                       // #if DBG
#define STRACE_PNPDRV
#define ASSERTS_PNPDRV(n)
#endif                                      // #if DBG


//----------------------------- Trace methods --------------------------------

#if DBG


//****************************************************************************
//                      --- RetResourceOptionMsg ---
//
// Purpose: Return resource Option name
//   Input: UCHAR  uOption - Option code
//  Output: LPCSTR         - Pointer to the option name
//****************************************************************************
LPCSTR RetResourceOptionMsg(UCHAR uOption);


//****************************************************************************
//                       --- RetResourceTypeMsg ---
//
// Purpose: Return resource tyspe name
//   Input: CM_RESOURCE_TYPE Type - Resource type code
//  Output: LPCSTR                - Pointer to the resource type name
//****************************************************************************
LPCSTR RetResourceTypeMsg(CM_RESOURCE_TYPE Type);


//****************************************************************************
//                       --- RetResourceShareMsg ---
//
// Purpose: Return resource share disposition name
//   Input: CM_SHARE_DISPOSITION Share - share disposition code
//  Output: LPCSTR                     - pointer to the share disposition name
//****************************************************************************
LPCSTR RetResourceShareMsg(CM_SHARE_DISPOSITION Share);


//****************************************************************************
//                       --- RetResourceFlagMsg ---
//
// Purpose: Return resource flags description
//   Input: CM_RESOURCE_TYPE Type  - Type of resource
//          USHORT           Flags - Resource flags
//  Output: LPCSTR                 - Pointer to the flags description string
//****************************************************************************
LPCSTR RetResourceFlagMsg(CM_RESOURCE_TYPE Type, USHORT uFlags);


//****************************************************************************
//                         --- RetInterfaceMsg ---
//
// Purpose: Return pointer to the Interface description
//   Input: INTERFACE_TYPE IfaceType - Interface Type
//  Output: LPCSTR                   - Pointer to the error message
//****************************************************************************
LPCSTR RetInterfaceMsg(INTERFACE_TYPE IfaceType);


//****************************************************************************
//                     --- OutIoResourceDescriptor ---
//
// Purpose: Print resource descriptor
//   Input: PIO_RESOURCE_DESCRIPTOR pResourceDescriptor - Pointer to descriptor
//          LPCSTR                  szDescription       - Decription
//  Output: none
//****************************************************************************
void OutIoResourceDescriptor(PIO_RESOURCE_DESCRIPTOR pResourceDescriptor,
                             LPCSTR                  szDescription);


//****************************************************************************
//                        --- OutIoResourceList ---
//
// Purpose: Print an IO_RESOURCE_LIST to the serial monitor
//   Input: PIO_RESOURCE_LIST pResourceList - Pointer to the IO_RESOURCE_LIST
//          LPCSTR            szDescription - List description
//  Output: none
//****************************************************************************
void OutIoResourceList(PIO_RESOURCE_LIST pResourceList, LPCSTR szDescription);


//****************************************************************************
//                  --- OutIoResourceRequirementList ---
//
// Purpose: Print an IO_RESOURCE_REQUIREMENTS_LIST to the serial monitor
//   Input: PIO_RESOURCE_REQUIREMENTS_LIST pResourceRequirementsList - Pointer
//                                          to the resource requirements list
//          LPCSTR                         szDescription             - Description
//  Output: none
//****************************************************************************
void OutIoResourceRequirementList(PIO_RESOURCE_REQUIREMENTS_LIST pResourceRequirementsList,
                                  LPCSTR                         szDescription);


//****************************************************************************
//                 --- OutCMPartialResourceDescriptor ---
//
// Purpose: Print an CM_PARTIAL_RESOURCE_DESCRIPTOR to the serial monitor
//   Input: PCM_PARTIAL_RESOURCE_DESCRIPTOR pDecs         - Pointer to the
//                                                          partial resource
//                                                          descriptor
//          LPCSTR                          szDescription - Description
//  Output: none
//****************************************************************************
void OutCmPartialResourceDescriptor(PCM_PARTIAL_RESOURCE_DESCRIPTOR pDesc,
                                    LPCSTR                          szDescription);


//****************************************************************************
//                    --- OutCmPartialResourceList ---
//
// Purpose: Print an CM_PARTIAL_RESOURCE_LIST to the serial monitor
//   Input: PCM_PARTIAL_RESOURCE_LIST pList         - Pointer to list
//          LPCSTR                    szDescription - Description
//  Output: none
//****************************************************************************
void OutCmPartialResourceList(PCM_PARTIAL_RESOURCE_LIST pList,
                              LPCSTR                    szDescription);


//****************************************************************************
//                   --- OutCmFullResourceDescriptor ---
//
// Purpose: Print an CM_FULL_RESOURCE_DESCRIPTOR to the serial monitor
//   Input: PCM_FULL_RESOURCE_DESCRIPTOR pDesc         - Pointer to descriptor
//          LPCSTR                       szDescription - Description
//  Output: none
//****************************************************************************
void OutCmFullResourceDescriptor(PCM_FULL_RESOURCE_DESCRIPTOR pDesc,
                                 LPCSTR                       szDescription);


//****************************************************************************
//                        --- OutCmResourceList ---
//
// Purpose: Print a CM_RESOURCE_LIST to the serial monitor
//   Input: PCM_RESOURCE_LIST pList         - Pointer to the list
//          LPCSTR            szDescription - List description
//  Output: none
//****************************************************************************
void OutCmResourceList(PCM_RESOURCE_LIST pList, LPCSTR szDescription);

#endif                                      // #if DBG

#endif                                      // #ifndef _DEBUG_H_

⌨️ 快捷键说明

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