SYSINTR_FIRMWARE 目前在WINCE 定義 在 $(WINCEROOT)\public\common\oak\inc\nkintr.h 內,
可以看到下面兩行, 所以實際的值等於 (0x10)

// SYSINTR_DEVICES is the base for any non-OAL system interrupts

// SYSINTR_FIRMWARE is the base for any interrupts defined in the OAL

於是乎 x86 的 Serial port 的 registry 關於 COM2 的設定如下, 其中 “SysIntr"=dword:13 ; 就是這樣來的 0x10(SYSINTR_FIRMWARE) + 3 (IRQ) = 0x13

Subkey Value Description
“SysIntr" dword:13 Hardware-platform-dependent. SYSINTR_FIRMWARE plus the IRQ.
“IoBase" dword:02F8 Hardware-platform-dependent base address of port-mapped I/O.
“IoLen" dword:8 Hardware-platform-dependent I/O space mapping to a virtual address in a memory-mapped I/O system. Notifies the system how much larger the address window is.
“DeviceArrayIndex" dword:0 Serial port that the driver manages. This key specifies the serial adapter that the driver manages. It also specifies the object to use inside the driver DLL. It is only useful for multi-object drivers, such as serial drivers, built-in drivers, and so on. You cannot use this key for single object drivers.
“Prefix" “COM" Entry point prefix. The entry point is constructed from the Prefix value and the name of the entry point. If the driver exposes the stream interface with undecorated entry points, no Prefix value exists.
“Dll" “Serial.Dll" DLL loaded by the bus enumerator.
“Order" dword:0 Value between zero (0) and 255. The smallest Order value gets loaded first. If there is no Ordervalue, the driver loads after drivers with defined Orders.

不過關鍵原因應該是 x86 的 BOOL OALIntrInit (void) 把他寫死了

這個函式定義在 $(WINCEROOT)\platform\common\src\x86\common\intr\init.c
不過 Adeneo Embedded 的BSP 實際上有 overwrite 在 $(WINCEROOT)\platform\INTEL_CS\SRC\COMMON\PDQOAL\intr\init.c

// Serial Port Info
// The legacy COM port layout defines IRQ4 being shared by
// COM ports 1 and 3 and IRQ3 is shared COM ports 2 and 4.
// If the legacy IRQ layout is followed, only 1 COM port
// per IRQ should be enabled.
// COM1 – 0x3F8-0x3FF, IRQ4
// COM2 – 0x2F8-0x3FF, IRQ3
// COM3 – 0x3E8-0x3EF, IRQ4
// COM4 – 0x2E8-0x2EF, IRQ3
// IRQ3 – COM2 or COM4
OALIntrStaticTranslate(SYSINTR_FIRMWARE + 3, 3);

// IRQ4 – COM1 or COM3
OALIntrStaticTranslate(SYSINTR_FIRMWARE + 4, 4);



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

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

Twitter picture

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


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

Google+ photo

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

連結到 %s