All Forums
 Microsoft Windows CE
 CE Drivers
 Power Driver reinitialize?
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

ctacke

877 Posts

Posted - 04 Aug 2008 :  17:58:53  Show Profile  Email Poster
I'm working on a scenario where I need to intercept the sleep signal on a BitsyXb system (though the question would apply to all systems). In order to enable the eature, I realize that I need to set the following reg key:

[HKLM\Drivers\BuiltIn\Power]
"PowerOffFromApps"=dword:1

However it appears that this is read only when the driver loads, so if I change the value I have to restart the system to get it to take effect. Does Eurotech provide any API to allow me to tell the power driver to re-read these values? I considered calling DeactivateDevice on the driver handle in the registry (HKLM\Drivers\Active\) but that hack has been closed in CE 6, so it's not very maintainable. If you don't have such a feature, could I put in the request that it be added in future builds?

cbadr

154 Posts

Posted - 05 Aug 2008 :  19:26:48  Show Profile  Email Poster
The following IOCTL's are supported on BitsyXb. If they answer your request, please drop us a line for more info.

// Disable GPIO power button interrupt
POWER_IOCTL_GPIO_INT_DISABLE

// Enable GPIO power button interrupt
POWER_IOCTL_GPIO_INT_ENABLE

// Set an event when power switch is triggered instead of sleeping.
// Let an app handle powering off the system.
POWER_IOCTL_POWER_OFF_FROM_APP

// Sleep when the power switch is triggered. This is the
// default behavior.
POWER_IOCTL_POWER_OFF_FROM_GPIO
Go to Top of Page

ctacke

877 Posts

Posted - 05 Aug 2008 :  22:12:03  Show Profile  Email Poster
The power IOCTL looks quite promising. How does it interoperate with the registry setting (i.e. does it modify the registry entry for me to keep the behavior in sync, or do I need to do that piece)?
Go to Top of Page

cbadr

154 Posts

Posted - 07 Aug 2008 :  11:58:52  Show Profile  Email Poster
The registry keys are read at initialization phase, so you can put the default settings there, while you can use the IOCTL's to modify the settings at runtime. The IOCTL's will not modify the keys in the registry.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000