Implementing USB Host Controller Drivers (Windows CE 5.0)

Send Feedback

To support universal serial bus (USB) on a hardware platform, you must customize one of the sample HCD modules. Microsoft provides sample HCD modules that work with HCI-compliant USB host controllers. You must migrate the PDD of the appropriate sample HCD as part of the OAL implementation for your hardware platform.

To reduce the effort involved in migrating the sample HCD to your hardware platform, the HCD is divided into two layers, a model device driver (MDD) layer that is hardware platform independent, and a platform dependent driver (PDD) layer. Because the specifications for HCI hardware explicitly define the behavior of such hardware, the PDD layer does very little. The PDD layer for most HCD modules only locates the hardware address of the host controller within memory and provides the MDD layer with the hardware address and a pointer to a shared memory area.

The MDD and PDD layers in the HCD module interact more than the MDD and PDD layers in most device drivers. For example, in the majority of device drivers, the MDD layer calls DDSI functions exposed by the PDD layer. In the HCD module, the MDD layer not only calls the DDSI functions, but also exposes a set of functions that the PDD layer must call at specific times during initialization.

You must create a registry key within HKEY_LOCAL_MACHINE\Drivers\Builtin\OHCI so that the Device Manager loads the HCD module when the hardware platform starts. Device drivers that the Device Manager loads must expose the stream interface to get power management callbacks. Therefore, the PDD layer is required to include some additional functions, such as HcdPdd_Open and HcdPdd_IOControl, even though the HCD module is not purely a stream interface driver. The benefit of this approach is that the Device Manager calls the HCD module's HcdPdd_Init function, which in turn enables the HCD module to call the required MDD functions. The following example shows the registry key for the HCD module. It should contain the same values as other stream interface driver keys.

[HKEY_LOCAL_MACHINE\Drivers\Builtin\OHCI]
    "Prefix"="HCD"
    "Dll"="ohci.dll"
    "Index"=dword:1
    "Order"=dword:1

See Also

USB Device Driver Implementation | Loading USB Device Drivers | Installing, Attaching, and Detaching USB Drivers | Layered Drivers vs. Monolithic Drivers

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.