Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 1.16 KB

adddevice-routine-of-a-battery-miniclass-driver.md

File metadata and controls

18 lines (14 loc) · 1.16 KB
title description keywords ms.date
AddDevice Routine for Battery Miniclass Drivers
Discover the AddDevice routine and its role in initializing battery-specific state for battery miniclass drivers.
AddDevice routine WDK battery
battery miniclass drivers WDK, routines
10/04/2023

AddDevice routine for battery miniclass drivers

Every battery miniclass driver must have an AddDevice routine to initialize battery-specific state. The PnP Manager calls the AddDevice routine for each battery device controlled by this miniclass driver.

In addition to the tasks required of a PnP AddDevice routine, the AddDevice routine for a battery miniclass driver must also:

  1. Create an FDO for the battery and attach the FDO to the device stack for the controller.
  2. Initialize the BATTERY_MINIPORT_INFO structure and call BatteryClassInitializeDevice to register the miniclass driver with the battery class driver.
  3. Perform any other required initialization for the device.