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

📄 dbgtrace.h

📁 Xcale270Bsp包,wince平台
💻 H
字号:
#ifndef __DBGTRACE_H__
#define __DBGTRACE_H__

/*++
** INTEL CONFIDENTIAL
** Copyright 2000-2003 Intel Corporation All Rights Reserved.
**
** The source code contained or described herein and all documents
** related to the source code (Material) are owned by Intel Corporation
** or its suppliers or licensors.  Title to the Material remains with
** Intel Corporation or its suppliers and licensors. The Material contains
** trade secrets and proprietary and confidential information of Intel
** or its suppliers and licensors. The Material is protected by worldwide
** copyright and trade secret laws and treaty provisions. No part of the
** Material may be used, copied, reproduced, modified, published, uploaded,
** posted, transmitted, distributed, or disclosed in any way without Intel抯
** prior express written permission.
**
** No license under any patent, copyright, trade secret or other intellectual
** property right is granted to or conferred upon you by disclosure or
** delivery of the Materials, either expressly, by implication, inducement,
** estoppel or otherwise. Any license under such intellectual property rights
** must be express and approved by Intel in writing.

Module Name:  dbgTrace.h

Abstract:  
    Macros for debug tracing.  Details may vary by BSP and platform. 
    - Conditionally defined so that the source code does not need to be
      modified whether the traces are enabled or not.
--*/

/******************************************************************************
                            Usage Notes

    Invoke int DelayInit(void) in the initialization code for the driver.  
    The SHOW_DBGTRACE_SR_WAIT macro ultimately uses the system timer and 
    therefore needs a VirtualAlloc() call to obtain access to it.  
    Calling DelayInit() during initialization guarantees that this system 
    call will not be made during suspend-resume time, which would be illegal.

        If DelayInit() is not available in the BSP, call msWait(1), which 
        performs the same initialization at the cost of one millisecond抯 
        unecessary delay.

    In the batch file, the line "set DBGTRACE_SR_STR=1" must have no trailing 
    whitespace, such as a tab.  That has been found to prevent the setting 
    from taking effect.

******************************************************************************/


#ifndef __WAIT_H__
    // Make sure wait.h is always included if debug macros are used in a file
    //  because of the requirement for using DelayInit()
   #include "wait.h"
#endif  // ndef __WAIT_H__


#ifdef DBGTRACE_SR_STR
    #ifndef DBGTRACE_SR
        #define DBGTRACE_SR
    #endif
#endif

    // Default for this macro is to swallow parameter and have
    //  no presence in executable code
#define    SHOW_DBGTRACE_SR(indicator) ((void)0)
    // Brief delay to permit debug string transmission
#define    SHOW_DBGTRACE_SR_WAIT() ((void)0)

#ifdef DBGTRACE_SR

    #ifdef DBGTRACE_SR_STR

        #undef    SHOW_DBGTRACE_SR
        #undef    SHOW_DBGTRACE_SR_WAIT

        #define    SHOW_DBGTRACE_SR(indicator)  NKDbgPrintfW(indicator)
        #define    SHOW_DBGTRACE_SR_WAIT()  DriverSleep(500, TRUE)

        // #define Show_Dbgtrace_Sr_Indicator ("SDSI_") constants here
            // for pwrbuttonpdd.c
        #define    SDSI_PWR_BUTTON_UP_START   TEXT("+PWR_PowerUp\r\n")
        #define    SDSI_PWR_BUTTON_UP_END     TEXT("-PWR_PowerUp\r\n")
        #define    SDSI_PWR_BUTTON_DOWN_START TEXT("+PWR_PowerDown\r\n")
        #define    SDSI_PWR_BUTTON_DOWN_END   TEXT("-PWR_PowerDown\r\n")

            // for touch handler
        #define    SDSI_TCH_PPD_ON_START      TEXT("+TouchPddPowerHandler ON\r\n")
        #define    SDSI_TCH_PPD_ON_END        TEXT("-TouchPddPowerHandler ON\r\n")
        #define    SDSI_TCH_PPD_OFF_START     TEXT("+TouchPddPowerHandler OFF\r\n")
        #define    SDSI_TCH_PPD_OFF_END       TEXT("-TouchPddPowerHandler OFF\r\n")


            // for Keypad handler
        #define    SDSI_KYPD_PPD_ON_START      TEXT("+KeypadPddPowerHandler ON\r\n")
        #define    SDSI_KYPD_PPD_ON_END        TEXT("-KeypadPddPowerHandler ON\r\n")
        #define    SDSI_KYPD_PPD_OFF_START     TEXT("+KeypadPddPowerHandler OFF\r\n")
        #define    SDSI_KYPD_PPD_OFF_END      TEXT("-KeypadPddPowerHandler OFF\r\n")

            // for battery driver
        #define    SDSI_BAT_PPD_ON_START      TEXT("+BatteryPddPowerHandler ON\r\n")
        #define    SDSI_BAT_PPD_ON_END        TEXT("-BatteryPddPowerHandler ON\r\n")
        #define    SDSI_BAT_PPD_OFF_START     TEXT("+BatteryPddPowerHandler OFF\r\n")
        #define    SDSI_BAT_PPD_OFF_END       TEXT("-BatteryPddPowerHandler OFF\r\n")

        #define    SDSI_BAT_PPD_RSM_STUB      TEXT(" BatteryPDDResume(Stub)\r\n")

    #else
        // Other options, like LED dsplay, go here.
        // At first, no other options.

    #endif // DBGTRACE_SR_STR

#endif  // #ifdef DBGTRACE_SR


#endif  // #define __DBGTRACE_H__

⌨️ 快捷键说明

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