Power Capabilities

[Previous] [Next]

The fourth step in the wizard (shown in Figure C-6) allows you to specify some miscellaneous power management capabilities. With the exception of the Idle Detection option, I haven't debugged all the interactions between this page and the driver options on other pages. Be prepared to sort this out yourself if you set any option other than Idle Detection.

click to view at full size.

Figure C-6. Page for specifying power management capabilities.

The capabilities in this page are as follows:

  • Queue Reads And Writes While Power Is Off  Set this option if your driver will accept and queue read and write IRPs even while your device is powered down. Clear this option if your driver will reject new read and write IRPs during such periods.
  • Device Supports System Wakeup  Set this option if your device has system wake-up capability. Otherwise, clear the option. Setting the option generates skeletal support for generating IRP_MN_WAIT_WAKE requests at appropriate points.
  • Device Can Be Stopped While Busy With An IRP  If your driver has some way to halt an active read or write IRP when an IRP_MN_STOP_DEVICE comes along, you can set this option if you want. Otherwise, leave the option clear.
  • Idle Detection  Set this option if you want your device to automatically power down after a user-prescribed period of inactivity. If you're using GENERIC.SYS with your driver, you'll automatically get support for a set of IOCTLs that my POWCPL.DLL uses, thereby gaining a user interface for free.
  • Power On Only While Handles Open  This option is available for USB devices only. Set it if you want your device powered on only while an application has an open handle.
  • Power Inrush During Power-On  Set this option if your device is an inrush device that demands a large spike of current when powering on.


Programming the Microsoft Windows Driver Model
Programming the Microsoft Windows Driver Model
ISBN: 0735618038
EAN: 2147483647
Year: 1999
Pages: 93
Authors: Walter Oney

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net