|
set BSP_NOSERIAL=
set BSP_NOUART0=
set BSP_NOUART1=
set BSP_NOUART2=
set BSP_NOUART3=
set BSP_NOIRDA2=1
set BSP_NOIRDA3=1
这是6410的注册表,给你参考下:
;--------------- Serial / IrDA Driver -----------------------------------------
; @CESYSGEN IF CE_MODULES_SERIAL
IF BSP_NOSERIAL !
IF BSP_NOUART0 !
IF BSP_KITL != SERIAL_UART0
IF BSP_DEBUGPORT != SERIAL_UART0
;--------------- UART0 (Physical COM1 Port) ----------------------------------
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial0]
"DeviceArrayIndex"=dword:0
"Irq"=dword:3D ; UART0 Virtual IRQ = 61 (0x3D), Physical IRQ = 37
"MemBase"=dword:7F005000
"MemLen"=dword:40
; "ISTTimeouts"=dword:200 ; every 512 ticks checking Modem status.
"Prefix"="COM"
"Index"=dword:1
"Dll"="smdk6410_serial.dll"
"Order"=dword:30
"Port"="COM1:"
"DeviceType"=dword:0
"FriendlyName"=LOC_DISPLAYNAME_COM1
"Tsp"="unimodem.dll"
"IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
"DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
;--------------------------------------------------------------------------
ENDIF
ENDIF
ENDIF
IF BSP_NOUART1 !
IF BSP_KITL != SERIAL_UART1
IF BSP_DEBUGPORT != SERIAL_UART1
;--------------- UART1 (Physical COM2 Port) ----------------------------------
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial1]
"DeviceArrayIndex"=dword:1
"Irq"=dword:3E ; UART1 Virtual IRQ = 62 (0x3E), Physical IRQ = 38
"MemBase"=dword:7F005400
"MemLen"=dword:40
; "ISTTimeouts"=dword:200 ; every 512 ticks checking Modem status.
"Prefix"="COM"
"Index"=dword:2
"Dll"="smdk6410_serial.dll"
"Order"=dword:30
"Port"="COM2:"
"DeviceType"=dword:0
"FriendlyName"=LOC_DISPLAYNAME_COM2
"Tsp"="unimodem.dll"
"IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
"DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
;--------------------------------------------------------------------------
ENDIF
ENDIF
ENDIF
IF BSP_NOUART2 !
IF BSP_KITL != SERIAL_UART2
IF BSP_NOIRDA2
;--------------- UART2 (Physical COM2 Port) ----------------------------------
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial2]
"DeviceArrayIndex"=dword:2
"Irq"=dword:3F ; UART2 Virtual IRQ = 63 (0x3F), Physical IRQ = 39
"MemBase"=dword:7F005800
"MemLen"=dword:40
; "ISTTimeouts"=dword:200 ; every 512 ticks checking Modem status.
"Prefix"="COM"
"Index"=dword:3
"Dll"="smdk6410_serial.dll"
"Order"=dword:30
"Port"="COM3:"
"DeviceType"=dword:0
"FriendlyName"=LOC_DISPLAYNAME_COM3
"Tsp"="unimodem.dll"
"IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
"DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
;--------------------------------------------------------------------------
ENDIF
ENDIF
ENDIF
IF BSP_NOUART3 !
IF BSP_KITL != SERIAL_UART3
IF BSP_NOIRDA3
;--------------- UART3 (Physical COM2 Port) ----------------------------------
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial3]
"DeviceArrayIndex"=dword:3
"Irq"=dword:40 ; UART3 Virtual IRQ = 64 (0x40), Physical IRQ = 40
"MemBase"=dword:7F005C00
"MemLen"=dword:40
; "ISTTimeouts"=dword:200 ; every 512 ticks checking Modem status.
"Prefix"="COM"
"Index"=dword:4
"Dll"="smdk6410_serial.dll"
"Order"=dword:30
"Port"="COM4:"
"DeviceType"=dword:0
"FriendlyName"=LOC_DISPLAYNAME_COM4
"Tsp"="unimodem.dll"
"IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
"DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
;--------------------------------------------------------------------------
ENDIF
ENDIF
ENDIF
IF BSP_NOIRDA2 !
IF BSP_KITL != SERIAL_UART2
IF BSP_NOUART2
;--------------- UART2 (IrDA)----------------------------------------------
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\IRDA2]
"DeviceArrayIndex"=dword:2
"Irq"=dword:3F ; UART2 Virtual IRQ = 63 (0x3F), Physical IRQ = 39
"MemBase"=dword:7F005800
"MemLen"=dword:40
;"ISTTimeouts"=dword:200 ; every 512 ticks checking Modem status.
"Prefix"="COM"
"Index"=dword:3
"Dll"="smdk6410_serial.dll"
"Order"=dword:30
"Port"="COM3:"
"DeviceType"=dword:0 ; IRDA modem, 0 -> null modem
"FriendlyName"=LOC_DISPLAYNAME_RAWIR
"IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
"DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
;--------------------------------------------------------------------------
ENDIF
ENDIF
ENDIF
IF BSP_NOIRDA3 !
IF BSP_KITL != SERIAL_UART3
IF BSP_NOUART3
;--------------- UART3 (IrDA)----------------------------------------------
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\IRDA3]
"DeviceArrayIndex"=dword:3
"Irq"=dword:40 ; UART3 Virtual IRQ = 64 (0x40), Physical IRQ = 40
"MemBase"=dword:7F005C00
"MemLen"=dword:40
;"ISTTimeouts"=dword:200 ; every 512 ticks checking Modem status.
"Prefix"="COM"
"Index"=dword:4
"Dll"="smdk6410_serial.dll"
"Order"=dword:30
"Port"="COM4:"
"DeviceType"=dword:0 ; IRDA modem, 0 -> null modem
"FriendlyName"=LOC_DISPLAYNAME_RAWIR
"IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
"DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
;--------------------------------------------------------------------------
ENDIF
ENDIF
ENDIF
串口驱动里面会包括所有的串口的驱动。
CSerialPDD * CreateSerialObject(LPTSTR lpActivePath, PVOID pMdd,PHWOBJ pHwObj, DWORD DeviceArrayIndex)
{
CSerialPDD * pSerialPDD = NULL;
RETAILMSG( TRUE, (TEXT("DEBUG: CreateSerialObject %d\r\n"), DeviceArrayIndex));
switch (DeviceArrayIndex)
{
case 0: ///< UART0
pSerialPDD = new CPdd6410Serial0(lpActivePath,pMdd, pHwObj);
break;
case 1: ///< UART1
pSerialPDD = new CPdd6410Serial1(lpActivePath,pMdd, pHwObj);
break;
case 2: ///< UART2(IrDA)
pSerialPDD = new CPdd6410Serial2(lpActivePath, pMdd, pHwObj);
break;
case 3: ///< UART3(IrDA)
pSerialPDD = new CPdd6410Serial3(lpActivePath, pMdd, pHwObj);
break;
}
if (pSerialPDD && !pSerialPDD->Init())
{
delete pSerialPDD;
pSerialPDD = NULL;
}
return pSerialPDD;
}
|
|