注册 登录
电子工程世界-论坛 返回首页 EEWORLD首页 频道 EE大学堂 下载中心 Datasheet 专题
jiereliyi的个人空间 https://home.eeworld.com.cn/space-uid-53209.html [收藏] [复制] [分享] [RSS]
日志

InterruptInitialize()翻译

已有 1951 次阅读2010-7-28 18:36

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.

该函数初始化硬件中断和内核,使设备驱动注册事件并使能中断。该函数可以在内核态和用户态被调用。

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指向的数据块大小。

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.

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

Header

pkfuncs.h

Library

coredll.lib

Windows Embedded CE

Windows CE 2.10 and later

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

热门文章