Drivers for PC Card Devices

Installable device drivers for PC Cards are more complicated than drivers for serial devices, because PC Cards themselves tend to be more complex. Recall that the System Architecture for Installable Device Drivers dictates that installable device drivers access their peripheral devices through some built-in hardware. For PC Cards, the built in hardware is the PC Card slot(s) available on the Windows CE platform. Specifically, such sockets are PCMCIA Type II sockets. These sockets are driven by the built-in PC Card slot driver, which implements many functions, the PC Card Socket Functions, that you use to write installable device drivers for PC Cards.

Most of the PC Card Socket Functions have a parameter which represents a Socket/Function pair. This is to support Windows CE platforms that have more than one PC Card socket, as well as multi-function PC Cards. A Socket/Function pair, then, is a combination of one particular PC Card socket and one particular function of a PC Card. Drivers for multi-function cards should probably register one device filename for each function. Drivers for all PC Cards should be written to work with any PC Card socket, since different Windows CE platforms have different numbers of sockets.

If you are writing a generic PC Card driver, one which can drive a whole class of PC Cards that adhere to some operating standard, you will need an additional entry point in your DLL for a detection function. This detection function is used by the Device Manager when an unknown PC Card (one with no Plug-and-Play ID) is inserted into the Windows CE platform. This function must conform to the CARD_ISR prototype. For more information on PC Card detection functions, see the Device Manager and The [Drivers\PCMCIA\Detect] Key.