Installing an ISR and Waiting for Interrupt Events (Windows CE 5.0)
Built-in device drivers that do not export the stream interface must find a convenient time during initialization to register their ISRs and spawn ISTs. Drivers that expose the stream interface generally perform these activities in their XXX_Init (Device Manager) function, which Device Manager calls.
Note Not all hardware platforms support sharable IRQs, and the binary image builder (.bib) file information for GIISR is not in the Common.bib file, so you may have to manually include the following .bib file information in your Platform.bib file.
; @CESYSGEN IF CE_MODULES_GIISR
GIISR.dll $(_FLATRELEASEDIR)\GIISR.dll NK SHK
; @CESYSGEN ENDIF CE_MODULES_GIISR
The following list shows one way for a driver to install an ISR and wait for interrupt events:
- The driver calls LoadIntChainHandler to install an ISR.
- The default ISR, installed by the OAL, executes first in response to an interrupt.
- The OAL calls NKCallIntChain to execute the ISR that the driver installed.
- The driver spawns an IST, which registers to receive interrupt event notifications. The IST must call InterruptInitialize before the IST uses the hEvent parameter, which provides a link between the idInt parameter and the SYSINTR value return by an ISR.
- The driver calls the WaitForSingleObject function to wait for interrupt events generated by the ISR.
See Also
Defining an Interrupt Identifier | Implementing an ISR | Loader | PCI Bus Driver | Real-Time Priority System
Send Feedback on this topic to the authors