bkli.h

来自「该BSP是基于PXA270+WINCE的BSP」· C头文件 代码 · 共 89 行

H
89
字号
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
//
//------------------------------------------------------------------------------
//
//  File: bkli.h
//
//  Backlight driver source code
//
#ifndef __BKLI_H
#define __BKLI_H

#pragma once


#ifdef  RETAIL_DEBUG
#ifndef DEBUG 
#define DEBUG 1
extern DBGPARAM dpCurSettings;
#undef DEBUGMSG
#define DEBUGMSG RETAILMSG
#endif
#endif


#ifdef DEBUG
#define ZONE_BACKLIGHT      DEBUGZONE(0)
#define ZONE_FUNCTION       DEBUGZONE(1)
#define ZONE_MISC           DEBUGZONE(2)
#define ZONE_WARN           DEBUGZONE(14)
#define ZONE_ERROR          DEBUGZONE(15)
#else
#define ZONE_BACKLIGHT      1
#define ZONE_ERROR          1
#endif


#define MAX_NAMELEN         128


typedef DWORD (WINAPI *PFN_GetSystemPowerStatusEx2) (
    PSYSTEM_POWER_STATUS_EX2 pSystemPowerStatusEx2,
    DWORD dwLen,
        BOOL fUpdate
    );


typedef struct
{
    TCHAR                   szName[MAX_NAMELEN];                // device name, eg "BKL1:"
    TCHAR                   szDisplayInterface[MAX_NAMELEN];   
    BOOL                    fBatteryTapOn;      // reg setting - do we turn on when screen/button tapped?
    BOOL                    fExternalTapOn;      // reg setting - do we turn on when screen/button tapped? 
    DWORD                   dwBattTimeout;  // reg setting - we only want this to deal with special cases 
                                                     // ('backlight off' currently, which PM doesn't know about)
    DWORD                   dwACTimeout; 
    BOOL                    fOnAC;              // are we currently on ac power?
    CEDEVICE_POWER_STATE    dwCurState;      // actual status (0=Off, 1=On)
    UCHAR                   ucSupportedStatesMask;  // which of D0-D4 driver supports
    HANDLE                  hExitEvent;
    HANDLE                  hBklThread;
    HANDLE                  hDDIPowerReq; // handle from PM for relasing display driver power requirement
    BOOL                    fExit; 
    DWORD                   dwPddContext; // Context for device specific PDD 

    PFN_GetSystemPowerStatusEx2 pfnGetSystemPowerStatusEx2;
    HINSTANCE                   hCoreDll;
} BKL_MDD_INFO;




DWORD fnBackLightThread(PVOID pvArgument);
BOOL IsTapOn(BKL_MDD_INFO *pBKLinfo);
void UpdateACStatus(BKL_MDD_INFO *pBKLinfo);
BOOL GetBestSupportedState(BKL_MDD_INFO *pBKLinfo, CEDEVICE_POWER_STATE ReqDx, CEDEVICE_POWER_STATE* SetDx);



#endif 

⌨️ 快捷键说明

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