WINCE60下的USB OTG怎么实现啊,CE要加什么组件,USB OTG的驱动要进行怎样的修改?一头雾水!
WINCE60下的USB OTG怎么实现啊,CE要加什么组件,USB OTG的驱动要进行怎样的修改?一头雾水!
选择USB Host驱动,然后根据自己的硬件情况进行修改!
看来好难啊!没什么概念!不知道又要痛苦到什么时候。楼上实现了?
uhci(universal host controller interface): Intel用在自家芯片组上的usb 1.1主控制器(host controller)的硬件实例。
ehci(enhanced host controller interface): usb 2.0的主控制器标准接口。
ohci(open host controller inferface):一个不仅仅是usb用的主控制器接口标准,下面细分为usb,1394,或者更多(别的没有接触过)。主要是遵循csr(configuration space register)标准(另一个标准,呵呵)。是其他厂商在设计usb host controller时遵循的标准,如via, nec, ali, 包括nvidia等等。
uhci, ohci在硬件实现以及对底层软件访问上都有所不同,但二者又都完全(实际上各自多少都有些不足)支持usb 1.1 specification里边对usb host controller的要求。
同理,ehci是满足usb 2.0 specification里面对usb host controller (high speed)的要求的硬件设计。
应该是从win98之后usb1.1就被广泛支持了,无论是uhci还是ohci。但ms真正支持usb2.0(或者说ehci)是从win2k sp4和winxp sp1。这里所说的真正支持是指系统自带ehci的驱动而不需要第三方的驱动程序。
apple现在胳膊拗不过大腿,在mac机上也已经都开始支持usb1.1和2.0接口。而上面的host controller一定是ohci的标准。
WINCE60下的EHCI/OHCI/UCHI这3个只能选择一个!6400BSP里面提供的是s3c6400_ohci2.dll驱动,那不是还是不能支持EHCI吗?也就是不支持USB2.0啊!
SMDK6400BSP里面的相关注册表项为-------------
;------------ USB Host Driver ---------------------------------------------------
; @CESYSGEN IF CE_MODULES_USBD
IF BSP_NOUSBHCD !
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\OHCI]
"InterfaceType"=dword:0 ; Internal
"Prefix"="HCD"
"Dll"="s3c6400_ohci2.dll"
"Index"=dword:1
"Order"=dword:10
"Irq"=dword:55 ; USB Host Virtual IRQ = 85 (0x55), Physical IRQ = 47
"SysIntr"=dword:11 ; (SYSINTR_FIRMWARE+1)
"MemBase"=dword:74300000
"MemLen"=dword:1000
"UseExistingSettings"=dword:0
"HcdCapability"=dword:4 ; HCD_SUSPEND_ON_REQUEST
ENDIF BSP_NOUSBHCD !
; @CESYSGEN ENDIF CE_MODULES_USBD
;-------------------------------------------------------------------------
;------------ USB Function Driver -------------------------------------------
; @CESYSGEN IF CE_MODULES_USBFN
IF BSP_NOUSBFN !
IF BSP_KITL != USBSERIAL
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SC6400USBFN]
"Dll"="s3c6400_usbfn.dll"
"Prefix"="UFN"
"Order"=dword:20
"Priority256"=dword:64
"Irq"=dword:60 ; USB OTG Virtual IRQ = 96 (0x60), Physical IRQ = 58
"BusIoctl"=dword:2a0048
"IClass"=multi_sz:"{E2BDC372-598F-4619-BC50-54B3F7848D35}=%b","{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
"DefaultClientDriver"=- ; erase previous default
;------------ USB Function Serial Driver --------------------------------------
IF BSP_USBFNCLASS == SERIAL
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
"DefaultClientDriver"="Serial_Class"
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Serial_Class]
"FriendlyName"=LOC_USBFN_SERIAL_NAME
"idVendor"=dword:0547
"Manufacturer"=LOC_USBFN_SERIAL_MANUFACTURER
"idProduct"=dword:2720
"Product"=LOC_USBFN_SERIAL_PRODUCT
"Index"=dword:5
ENDIF BSP_USBFNCLASS
;-------------------------------------------------------------------------
;------------ USB Function Mass Stroge Driver ---------------------------------
IF BSP_USBFNCLASS == MASS_STORAGE
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
"DefaultClientDriver"="Mass_Storage_Class"
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
"Dll"="usbmsfn.dll"
"InterfaceSubClass"=dword:06
"InterfaceProtocol"=dword:50
"DeviceName"="DSK3:"
"FriendlyName"="Mass Storage"
"idVendor"=dword:045E
"Manufacturer"="Generic Manufacturer (PROTOTYPE--Remember to change idVendor)"
"idProduct"=dword:FFFF
"Product"="Generic Mass Storage (PROTOTYPE--Remember to change idVendor)"
"bcdDevice"=dword:0
"Removable"=dword:0
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class]
"Index"=dword:3
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class\High_Capacity]
"Index"=dword:3
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\MMC_Class]
"Index"=dword:3
ENDIF BSP_USBFNCLASS
;-------------------------------------------------------------------------
[HKEY_CURRENT_USER\ControlPanel\Comm] ;;;//2008--9--9 xqh usb的同步连接
"Cnct"="`USB"
[HKEY_LOCAL_MACHINE\DebugZones]
"USBFN"=dword:ffff
"Serial"=dword:ffff
"PM"=dword:ffff
ENDIF
ENDIF BSP_NOUSBFN !
; @CESYSGEN ENDIF CE_MODULES_USBFN
;-------------------------------------------------------------------------
//所以存在两中选择--------BSP_USBFNCLASS == SERIAL/BSP_USBFNCLASS == MASS_STORAGE------配置不同功能就不一样!
编译后的文件夹下面可见下面3个DLL
1>>ehci.dll
2>>ohci2.dll
3>>uhci.dll
不知道到底是那个进NK!!!???-----------只见s3c6400_ohci2.dll在NK里面,这3个都没进NK!
;-------------------------------------------------------------------------
;;;//2008--11--6 XQH 加入对USB OTG的注册表项!!!
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\UsbOtg]
"Dll"="S3C6400otg.dll"
"Prefix"="OTG"
"Order"=dword:10
"MemBase"=dword:74300000 ; UDC_BASE_U_VIRTUAL
"MemLen"=dword:1000 ; Needs at least 0xE04. Round up to 1 page.
"Irq"=dword:55
;;; "IsrDll"="giisr.dll" ;;;//2008--11--7 XQH 什么东西???
;;; "IsrHandler"="ISRHandler"
; "DynamicClientLoad"=dword:1
; "DisableRoleSwitch"=dword:1
; "InitialRoleMaster"=dword:1
"HCDPortNumberOnOTG"=dword:2
"BusIoctl"=dword:2a0048
"InterfaceType"=dword:0
"IClass"=multi_sz:"{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\UsbOtg\Hcd]
"InterfaceType"=dword:0 ; Internal
"Prefix"="HCD"
"Dll"="s3c6400_ohci2.dll"
"Index"=dword:1
"Order"=dword:10
"Irq"=dword:55 ; USB Host Virtual IRQ = 85 (0x55), Physical IRQ = 47
"SysIntr"=dword:11 ; (SYSINTR_FIRMWARE+1)
"MemBase"=dword:74300000
"MemLen"=dword:1000
"UseExistingSettings"=dword:0
"HcdCapability"=dword:4 ; HCD_SUSPEND_ON_REQUEST
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\UsbOtg\UsbFn]
"Dll"="s3c6400_usbfn.dll"
"Prefix"="UFN"
"Order"=dword:20
"Priority256"=dword:64
"Irq"=dword:60 ; USB OTG Virtual IRQ = 96 (0x60), Physical IRQ = 58
"BusIoctl"=dword:2a0048
"IClass"=multi_sz:"{E2BDC372-598F-4619-BC50-54B3F7848D35}=%b","{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"
;-------------------------------------------------------------------------