Re: SystemIdleTimerReset() question
- From: "Graeme Wintle" <graememsng@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 25 Apr 2008 16:02:27 +0100
You need to put the backlight/screen into D0 full power mode, this should
work as well:
SystemIdleTimerReset();
SetSystemPowerState(NULL, POWER_STATE_ON, POWER_FORCE);
--
--
GraemeW
Web - http://www.bytesnap.co.uk
Blog - http://ce4all.blogspot.com
"Sagaert Johan" <REMOVEsagaert_j@xxxxxxxxxxx> wrote in message
news:%23Grkd1tpIHA.4816@xxxxxxxxxxxxxxxxxxxxxxx
Hi
If i call SystemIdleTimerReset() should the backlight then turn on again
?
It tried calling this api but it does not turn on the backlight.
(could this be a bug on the OS (embedded winCE5 module)
I guess it will only prevent the device going into suspend mode.
I want to turn on the backlight again after it went off .
I triied the ExtEscape(dc, SETPOWERMANAGEMENT,.. function , but it does
not enable / disable the backlight.
It only seems to disable/enable the bitstream and framing signals on the
TFT hardware .
Maybe this is a bug in the OS image ? ( I am getting convinced since the
same code on another brnad of CE5 device seems to perform as expected.)
Any hints ?
Johan
included : source code of my managed wrapper
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Runtime;
namespace Utilitys
{
public class Tools
{
const int SETPOWERMANAGEMENT = 6147;
const uint VideoPowerOff = 4;
const uint VideoPowerOn = 1;
[StructLayout(LayoutKind.Sequential)]
private struct VIDEO_POWER_MANAGEMENT
{
public uint Length;
public uint DPMSVersion;
public uint PowerState;
} ;
public static void DisplayPower(bool poweron)
{
VIDEO_POWER_MANAGEMENT vpm;
vpm.Length = 12;
vpm.PowerState = poweron == true ? VideoPowerOn : VideoPowerOff;
vpm.DPMSVersion = 0x0001;
IntPtr dc;
dc = GetDC(IntPtr.Zero);
IntPtr si = Marshal.AllocHGlobal(Marshal.SizeOf(vpm));
Marshal.StructureToPtr(vpm, si, false);
ExtEscape(dc, SETPOWERMANAGEMENT, Marshal.SizeOf(vpm), si, 0,
IntPtr.Zero);
Marshal.FreeHGlobal(si);
}
[DllImport(@"coredll.dll")]
public static extern int ExtEscape(IntPtr hdc, int escfunc, int structlen,
IntPtr instruct, int szoutput, IntPtr lpod);
[DllImport(@"coredll.dll")]
public static extern IntPtr GetDC(IntPtr hdc);
}
}
.
- Follow-Ups:
- Re: SystemIdleTimerReset() question
- From: Dean Ramsier
- Re: SystemIdleTimerReset() question
- References:
- SystemIdleTimerReset() question
- From: Sagaert Johan
- SystemIdleTimerReset() question
- Prev by Date: SystemIdleTimerReset() question
- Next by Date: Platform Builder freezes when building
- Previous by thread: SystemIdleTimerReset() question
- Next by thread: Re: SystemIdleTimerReset() question
- Index(es):
Relevant Pages
|
|