다음을 통해 공유


Bus Agnostic Drivers (Windows Embedded CE 6.0)

1/6/2010

Implementing a bus agnostic device driver allows the device driver to execute on different buses. For example, a bus agnostic driver can execute on a PCI bus, a 16-bit PC Card bus, a 32-bit PC Card bus, or a bus that is specific to a hardware platform. Typically, you can migrate bus agnostic drivers more easily between hardware platforms than other types of drivers.

A bus agnostic driver does not call functions that are specific to a hardware platform. Each driver gets its resources from the registry, requests configuration information from its parent bus driver, sets power states through its parent bus driver, and translates bus addresses to system addresses through its parent bus driver.

A bus agnostic driver is a standard driver that is relatively simple to implement and can be shared by various bus implementations for the same hardware chipset. For example, the bus agnostic PCI NE2000 driver works correctly for the NE2000 PCMCIA card. The NE2000 PCMCIA card functions the same with the PCI NE2000 driver as it would with the PCMCIA NE2000 driver.

To develop a bus agnostic driver

  1. Open the device key by calling the OpenDeviceKey function.

  2. Obtain ISR information by calling the DDKReg_GetIsrInfo function.

  3. Obtain hardware I/O or memory window information by calling the DDKReg_GetWindowInfo function.

  4. Obtain a hardware and by calling the HalTranslateBusAddress function to translate the bus-specific address to a system physical address.

  5. Obtain a virtual address by calling the MnMapIoSpace function to map the system physical address

  6. Reset your hardware and disable the interrupt.

  7. Load the installable ISR by calling the LoadIntChainHandler function with information obtained from DDKReg_GetIsrInfo. You should assume that your ISR will access the card register to identify the interrupt. TransBusAddrToStatic is needed to map the system physical address for hardware.

  8. Begin the IST and enable the interrupt.

See Also

Concepts

Device Driver Development Concepts

Other Resources

Device Driver Development Helper Libraries
PC Card Drivers