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. |
|
10/04/2023 |
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:
- Create an FDO for the battery and attach the FDO to the device stack for the controller.
- Initialize the BATTERY_MINIPORT_INFO structure and call BatteryClassInitializeDevice to register the miniclass driver with the battery class driver.
- Perform any other required initialization for the device.