Interrupt Processing in Installable Device Drivers

Some peripheral devices are capable of causing or signaling interrupts on the Windows CE platform's bus. Typically such peripherals are PC Cards, but not exclusively. Installable device drivers for such peripherals therefore need code to process such interrupt events.

The recommended method is for the installable device driver to spawn a new thread called an Interrupt Service Thread (IST) during its processing of the xxx_Init call. ISTs typically run at a high priority, so that they can respond quickly to interrupt events. Depending on the type of driver you are writing, this thread should register to receive interrupt notifications by means of the InterruptInitialize function, or CardRequestIRQ for PC Card drivers. PC Card drivers do not process interrupts directly, since the built-in PC Card socket driver gets the raw interrupts generated by the PC Card socket. CardRequestIRQ allows you to specify a callback function that the PC Card socket driver will call when an interrupt occurs.

When the appropriate interrupt occurs, Windows CE will signal your IST. Your IST can then interact with your peripheral device to perform whatever processing is necessary to handle the interrupt.