为什么"PowerManager/ActivityTimer/UserActivity"这个输入事件有的时候捕捉不到?

shellgo 2011-09-25 06:31:45
为什么"PowerManager/ActivityTimer/UserActivity"这个输入事件有的时候捕捉不到?
在做backlight的地方
...全文
236 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
shellgo 2011-09-30
  • 打赏
  • 举报
回复
谢谢楼上的,目前的解决方式:
PowerManager/ActivityTimer/UserActivity等待的线程的优先级设置高点,基本是每次都能够捕捉到,大家可以试验下,这边的板子现象是这样的,环境不一样,可能结果也不一样,
Ei 2011-09-26
  • 打赏
  • 举报
回复
cenewman 2011-09-26
  • 打赏
  • 举报
回复
//1
const TCHAR szevtUserInput[] = TEXT("PowerManager/ActivityTimer/UserActivity");
//2
g_evtSignal[1] = CreateEvent(NULL, FALSE, FALSE, szevtUserInput);
//3
dwResult = WaitForMultipleObjects(NUM_EVENTS, &g_evtSignal[0], FALSE, dwTimeout);

// If we are signaled by registry event
if (WAIT_OBJECT_0 == dwResult)
{
//。。。 }
else if (dwResult == WAIT_OBJECT_0+1)
{
// User activity, depending on the situation, we may / may not update
// the tick count
//DEBUGMSG(1, (TEXT("2...WAIT_OBJECT_0+1!\r\n")));
if (IsACOn())
{
if (g_BLInfo.m_bACAuto)
{
// Turn on backlight
BL_On(TRUE);
}
}
else
{
if (g_BLInfo.m_bBatteryAuto)
{
BL_On(TRUE);
}
}
}
woshi_ziyu 2011-09-25
  • 打赏
  • 举报
回复
[Quote=引用楼主 shellgo 的回复:]
为什么"PowerManager/ActivityTimer/UserActivity"这个输入事件有的时候捕捉不到?
在做backlight的地方
[/Quote]
不是很清楚

19,518

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 嵌入开发(WinCE)
社区管理员
  • 嵌入开发(WinCE)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧