// If we are signaled by registry event
if(WAIT_OBJECT_0 == dwResult)
{
RETAILMSG(BAK_DEBUG, (TEXT("BackLight waitefor registry signal\r\n")));
//重设注册表
// All we need to do is to read from registry and update the tick count
BL_ReadRegistry(&g_BLInfo);
// Always turn on the Backlight after a change to registry
BL_On(TRUE);
}
else if(dwResult == WAIT_OBJECT_0+1)
{
RETAILMSG(BAK_DEBUG, (TEXT("BackLight waitefor key or touch signal\r\n")));
//点击了触摸或按键
// User activity, depending on the situation, we may / may not update
// the tick count
if(bIsACOn)
{
if(g_BLInfo.m_bACAuto)
{
// Turn on backlight
BL_On(TRUE);
}
}
else
{
if(g_BLInfo.m_bBatteryAuto)
{
BL_On(TRUE);
}
}
}
else if(dwResult == WAIT_OBJECT_0+2)
{
RETAILMSG(BAK_DEBUG, (TEXT("BackLight waitefor power change signal\r\n")));
// When AC is plugged or un-plugged, we don't really need to do anything
// We continue the loop. The correct timeout value will be assigned at
// the top of the while loop.
//电源更换,暂时没做
}
else if(dwResult == WAIT_TIMEOUT)
{
RETAILMSG(BAK_DEBUG, (TEXT("BackLight waitefor close backlight signal\r\n")));
// Time out, let's turn the device off
BL_On(FALSE);
}