Windows CE installable Interrupt service mechanism

Windows Embedded CE 4 or late has an Installable interrupt service mechanism. Microsoft implement a GIISR driver to support the feature, you can found out source code under ‘%WINCE%PUBLICCOMMONOAKDRIVERS" directory.

The function beginning to call HANDLE LoadIntChainHandler( LPCWSTR lpFilename, LPCWSTR lpszFunctionName, BYTE bIRQ ) in your device drivers, usually it like "LoadIntChainHander(L"GIISR.DLL", L"ISRHandler", nIrqNum)". when use the function equal you to written following code.

hLib = LoadLibrary(L"GIISR.DLL")

pFunc = GetProcAddress(hLibName, L"ISRHandle");

pFunc(nIrqNum);

Each Platform/BSP own an "OEMInterruptHandler" required OAL function. It handling hardware interrupt and mapping to OS interrupt service routine, so you can found to call DWORD NKCallIntChain( BYTE irq ) in the function, if the platform implement "installable interrupt service" feature. it translation IRQ to SysIntr and trigger interrupt event.

Device driver should to create a monitor thread for interrupt event. The thread call "IST"(Interrupt Service Thread) usually like below code pattern.

DWORD drvIST()

{

…….

while (bDrvISTRunning)

{

         WaitForSingleObject(drvISTEvent, INFINITE);

         // get a interrupt event

         ……..

}

}

so you must be create a event object to bind ISR and IST.

ref. below figure

WinCE_Interrupt

online help has more infomation.

However you still to use  static interrupt translation method to implement intterrupt service.

 

Technorati tags: , , , ,
廣告

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s

%d 位部落客按了讚: