KMDF Timer Objects

A KMDF driver can use a timer object to request a callback at repeated periodic intervals or only once after a driver-specified amount of time has elapsed. Drivers use timers for a variety of purposes. For example:

  • The Pcidrv sample creates a watchdog timer to aid in link detection on its device and to check for hardware hangs.

  • The Serial sample creates several timers to time out read and write operations.

  • The Toastmon sample creates a periodic timer to send requests to its I/O target at regular intervals.

Every timer object is associated with an EvtTimerFunc callback. The framework adds the callback to the system’s DPC queue when the timer expires.

If the device is powered down for idle or stopped to rebalance resources, the framework ...

Get Developing Drivers with the Windows® Driver Foundation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.