阅读:4219回复:12
关于背光----50分用户被禁言,该主题自动屏蔽! |
|
沙发#
发布于:2003-09-12 17:18
上铺的兄弟:
你说的背光驱动流程很正确,我也做过一样的工作,我都能控制背光了。再仔细点看看程序有其他问题么。比如说是unicode格式的问题: HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, TEXT(\"BackLightChangeEvent\")); :P Good Luck! 头一次来,希望能跟大家交个朋友。 [编辑 - 9/12/03 by amonxie] |
|
板凳#
发布于:2003-09-15 09:24
用户被禁言,该主题自动屏蔽! |
|
地板#
发布于:2003-09-15 11:46
要在控制面板里修改了背光TimeOut的值并保存,这个事件才会被触发!
|
|
|
地下室#
发布于:2003-09-15 13:37
用户被禁言,该主题自动屏蔽! |
|
5楼#
发布于:2003-09-15 15:30
能说说是什么问题吗?
|
|
|
6楼#
发布于:2003-09-15 15:51
用户被禁言,该主题自动屏蔽! |
|
7楼#
发布于:2003-10-02 00:10
很久没来,抱歉,出去做别的项目了。这个是我的backligt的实现,FYI.
Add background light drivers to our platform. 1.Enable background light: in ...\\Merlin\\public\\wpc\\oak\\misc\\Cesysgen.bat add set CPLMAIN_COMPONENTS=%CPLMAIN_COMPONENTS% backlight 2.Use the thread and the event object dealing /******************************************* * BacklightDriverThread: * Add by Amon. 2002/1/5, for backlight driver thread. * Return Value: Never returns. ********************************************/ DWORD BacklightDriverThread(PVOID pArg) { ... HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, TEXT(\"BackLightChangeEvent\")); while(1){ BacklightDrvGetRegistryData(); // judge the power source: AC or Battery GetSystemPowerStatusEx(&pStatus, TRUE); if(pStatus.ACLineStatus == AC_LINE_ONLINE){ ACStatus = TRUE; TimeOut = Backlight_ACTimeOut; } else{ ACStatus = FALSE; TimeOut = Backlight_BatteryTimeOut; } if(TimeOut){ RetValue = WaitForSingleObject(hEvent, 1000*TimeOut); //backlight not be put off by hand if(!backlightoff){ if(RetValue == WAIT_OBJECT_0){ //Backlight reset/on here! if ( !(REG32(TENERIFE_IOBASE+CC_BASE+12) & 0x00080000) ) (REG32(TENERIFE_IOBASE+CC_BASE+12)) |= (0x00080000); } if(RetValue == WAIT_TIMEOUT){ //Time out,backlight off here! if ((REG32(TENERIFE_IOBASE+CC_BASE+12) & 0x00080000)) (REG32(TENERIFE_IOBASE+CC_BASE+12)) &= (0xFFF7FFFF); } } }//if (timeout) } exit: NKDbgPrintfW(TEXT(\"Backlight driver thread terminating.\\r\\n\")); return 0; } 3.The backlight event can be toggled by keybd and touchpanel interrupt.That is to say, when key pressed or touchp touched, backlight will turn on if it is off. //Add by Amon. 2002/1/5, for toogle the backlight change Event HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, TEXT(\"BackLightChangeEvent\")); SetEvent(hEvent); :P |
|
8楼#
发布于:2004-07-06 15:26
Dear Sir,
你们这个程序用不着ddk里的东西吗?我好像没有看到。请指点一下为什么这样就可以控制背光灯了?谢谢! |
|
9楼#
发布于:2008-05-15 16:11
er..请问操作系统是怎么和背光驱动连接在一起的?
|
|
|
10楼#
发布于:2008-05-20 02:12
操作系统和背光
主要是通过全局事件交互,事件有1,控制面板里修改注册表;2用户输入,3电源改变(电池<->AC输入的改变) 1.在控制面板修改注册表关于背光的配置后会SetEvent *BackLightChangeEvent*事件通知背光驱动 2.用户输入活动是从GWES获得,也是事件通知 3.电源改变,AC和电池变化,是电源管理模块发出event通知. ---------- 进一步的,如果有能力定制电源管理模块pm.dll,其实背光驱动是多余的.直接在pm.dll中可以处理所有的逻辑. |
|
11楼#
发布于:2008-06-02 21:44
谢谢楼上的,请问是不是要多看看操作系统原理之类的书?
能否留一个邮箱给我,我的是mulitatuli@yahoo.com.cn |
|
|
12楼#
发布于:2010-01-13 15:17
为什么我的系统就不可以创建名字中有反斜杠的事件呢?我的是
gGlobeTestEvent=CreateEvent(NULL,FALSE,FALSE,TEXT(\"BackLightChangeEvent\")); 请达人指点 |
|