This function initializes a hardware interrupt with the kernel. This initialization enables the device driver to register an event and enable the interrupt. This function can be called from kernel-mode drivers and user-mode drivers. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
该函数初始化硬件中断和内核,使设备驱动注册事件并使能中断。该函数可以在内核态和用户态被调用。
<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /> Syntax
BOOL InterruptInitialize(
DWORD idInt,
HANDLE hEvent,
LPVOID pvData,
DWORD cbData
);
Parameters
idInt
[in] Interrupt identifier for the interrupt service thread (IST).
【输入】中断标示符,指定中断服务线程
hEvent
[in] Event to be signaled when the interrupt is triggered.
【输入】当中断触发时,被注册的时间。
pvData
[in] Used as a pointer to a block of data that is passed to OEMInterruptEnable. The block of data can be initialization data, scratch space, and so on.
【输入】指向一个有OEMInterruptEnable()传递的数据块,该数据块可以用于初始化数据,暂存数据等。
cbData
[in] Size of data pointed to by pvData.
【输入】由pvData指向的数据块大小。
[in] Interrupt identifier for the interrupt service thread (IST).
hEvent
[in] Event to be signaled when the interrupt is triggered.
pvData
[in] Used as a pointer to a block of data that is passed to OEMInterruptEnable. The block of data can be initialization data, scratch space, and so on.
cbData
[in] Size of data pointed to by pvData.
Return Value
TRUE indicates success. FALSE indicates failure.
TRUE表示成功,FALSE表示失败。
Remarks
备注
This function must be called before using the hEvent parameter, which provides a link between the idInt parameter and the SYSINTR value returned by an ISR.
该函数必须在使用hEvent参数之前被调用,提供一个连接,在idInt参数和由ISR返回值SYSINTR之间。
The hEvent parameter can be used only in a WaitForSingleObject call to wait for the event to be triggered by the kernel.
hEvent参数只能用于WaitForSingleObject调用等待事件被内核触发。
If you use hEvent in a call to WaitForSingleObject before you call InterruptInitialize, InterruptInitialize fails.
如果你在调用InterruptInitialize之前在WaitForSingleObject函数中调用hEvent参数,InterruptInitialize失败。
InterruptInitialize is used with device drivers and user-mode drivers. For more information about user-mode drivers, see User Mode Driver Framework.
InterruptInitialize被用于设备驱动和用户态驱动,欲了解用户态驱动详情请参考User Mode Driver Framework.
Requirements
pkfuncs.h | |
Library | coredll.lib |
Windows Embedded CE | Windows CE 2.10 and later |
文章评论(0条评论)
登录后参与讨论