亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ms2_ohci2.cpp.svn-base

?? PXA270 平臺 Windows Mobile 5。0 USB Host 驅動
?? SVN-BASE
字號:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.

Module Name:  
    ms2_ohci2.cpp
    
Abstract:  
    MainStoneII platform dependant part of the USB Open Host Controller Driver (OHCD).

Notes: 
--*/
#include <windows.h>
#include <ceddk.h>
#include <hcdddsi.h>
#include <bulverde.h>

#include <bulverde_usbohci.h>

class MainStoneOhciPdd : public SOhcdPdd {
private:
    volatile PBULVERDE_GPIO_REG m_pDCGPIOReg;
public:
    MainStoneOhciPdd(LPCTSTR lpActiveRegistry) : SOhcdPdd(lpActiveRegistry) 
    {
        m_pDCGPIOReg = NULL;
    };
    virtual BOOL Init() {
        NKDbgPrintfW(TEXT("++ USBH Init...\r\n"));
        if (m_pDCGPIOReg==NULL) {
            PHYSICAL_ADDRESS ioPhysicalBase = { BULVERDE_BASE_REG_PA_GPIO, 0};
            m_pDCGPIOReg = (PBULVERDE_GPIO_REG)MmMapIoSpace(ioPhysicalBase, sizeof(BULVERDE_GPIO_REG),FALSE);
        }
        if (m_pDCGPIOReg)
            return SOhcdPdd::Init();
        return FALSE;
    }
    ~MainStoneOhciPdd() {
        if (m_pDCGPIOReg)
            MmUnmapIoSpace((PVOID)m_pDCGPIOReg,0);
    }
// SetupUSBHostPWR:	
//
//		The root hub status register has some over-current indicator bits.
//
//		The USB Host cannot detect over-current indications itself. Over-
//		current detection must be performed by some external device on the
//		platform. In the case of the Mainstone, this is done by U53, a
//		MAX1693EUB USB Power Switch, which provides 5.0 volts to the USB
//		and also provides an over-current detection signal for use here.
//
//		Bulverde expects to get over-current indication as an input from
//		GPIO 88. Therefore, the nFAULT signal of the MAX1693EUB USB Power
//		switch on the Mainstone must be connected to GPIO 88.
//
//		GPIO 88 must be configured as an input and set to alternate function 1.
//
//		With the external circuitry wired in this fashion, and GPIO 88
//		configured as above, an assertion on the MAX1693EUB USB Power
//		Switch's nFAULT line will appear in the USB Host Root Hub status
//		register, UHCRHS, or a status register for a specific port on the 
//		root hub, UHCRHPS1 or UHCRHPS2, depending on the setting of the
//		UHCRHDA OverCurrentProtectionMode field.
//
//		Note: Over current detection must be enabled in the USB Host
//		Root Hub Descriptor A register, UHCRHDA, before assertions on 
//		GPIO 88 are detected. Furthermore, over current detection must
//		be selected as global or per-port, also via the UHCRHDA register.

    	virtual void SetupUSBHostPWR(int port) 
    	{
        unsigned long  ulPinArrayParms[3];
        unsigned long  ulAlternateFunctionParms[3];

        // Configure GPIO 88 according to the discussion above:
        //		Direction: Input
        //		Alternate function: 1

        // direction & alternate function gpio apis both use the same pin array
        ulPinArrayParms[0] = 1;
        ulPinArrayParms[1] = 88;

        XllpGpioSetDirectionIn( m_pDCGPIOReg, ulPinArrayParms );

        ulAlternateFunctionParms[0] = 1;
        ulAlternateFunctionParms[1] = XLLP_GPIO_ALT_FN_1;
        XllpGpioSetAlternateFn( m_pDCGPIOReg, ulPinArrayParms, ulAlternateFunctionParms );

    }
// SetupUSBHostPEN:	
//
//		A USBHost platform must provide 5V to the USB. Bulverde cannot do this.
//		Bulverde cannot source 5 volts, so some external circuitry is required.
//		The MAX1693EUB USB Power Switch is a component used to provide 5 volts
//		for a USB; it also can provide an over-current indicator if any device
//		on the USB begins to draw too much current.
//
//		U53 on the Mainstone has a MAX1693EUB USB Power Switch. This part
//		is connected to a 5V power supply from the Mainstone. However, the
//		Bulverde USB Host is in control of enabling or disabling the MAX
//		1693EUB USB Power Switch. When the USB Host enables the MAX1693EUB
//		USB Power Switch by asserting the MAX1693EUB USB Power Switch's nON
//		signal, the USB V+ and V- signals provide 5 Volts. When the nON signal
//		is deasserted, the MAX1693EUB USB Power Switch turns the USB off.
//
//		The Bulverde USB Host expects to use GPIO 89 as a power enable signal.
//		The USB Host asserts or deasserts GPIO 89 by setting different bits
//		depending on the configuration of the USB Host. The configuration bits
//		that are important here are:
//
//			UHCRHDA:NoPowerSwitching (aka NPS)
//				0:	the port power will follow the global or per-port
//					power enable bits, depending UHCRHDA:PortSwitchingMode
//				1:	Not able to switch power on and off, so 
//					the port power will always be enabled.
//				
//			UHCRHDA:PowerSwitchingMode (aka PSM)
//				0:	Global Power Switching Mode, power for all ports is 
//					enabled or disabled in response to SetGlobalPower or
//					ClearGlobalPower commands.
//				1:	Per-Port Power Switching Mode, some ports can have
//					their power enabled or disabled individually with 
//					SetPortPower and ClearPortPower commands to the 
//					corresponding USB Host Root Hub Port Status registers
//					UHCRHPS1 or UHCRHPS2. In this mode, other ports can
//					respond to the global commands SetGlobalPower and 
//					ClearGlobalPower. Which type of power command the port
//					responds to is controlled by the setting of the Port
//					Power Control Mask bit for each port, found in the
//					UHCRHDB:PPCM field
//
//			Enabling / Disabling Global Power:
//				Enable:		Write 1 to UHCRHDB:LPSC
//				Disable:	Write 1 to UHCRHDB:LPS
//
//			Enabling / Disabling a specific Port's power
//				Enable:		Write 1 to UHCRHPSx:PPS
//				Disable:	Write 1 to UHCRHPSx:LDA
//				where x is 1 for Port1 or 2 for Port2
//
//			Inclusion / Exclusion from Global Set/Clear Port Power Commands
//				Inclusion:	Write 0 to UHCRHDB:PPCM[x], the corresponding port
//							will only recognize Global Set/Clear Power commands.
//							It will not respond to specific SetPortPower or
//							ClearPortPower commands.
//				Exclusion:	Write 1 to UHCRHDB:PPCM[x], the corresponding port
//							will not recognize Global Set/Clear Power commands.
//							It will only respond to specific SetPortPower or
//							ClearPortPower commands.
//				where x is 1 for Port1 or 2 for Prt2
//				note: x=0 or x>3 are reserved bits in the PPCM field.
//
//
//	Power Enable/Disable Configurations, in order of simplicity:
//
//	1.	No Power Switching:
//		Setup:
//			A. Set UHCRHDA:NoPowerSwitching to 1.	(Disallows power switching)
//
//		Comments:
//			The ports will be powered on as long as the USH Host block is on.
//
//
//	2.	Global Power Switching Mode Only:
//		Setup:
//			A. Set UHCRHDA:NoPowerSwitching to 0.	(Allows power switching)
//			B. Set UHCRHDA:PowerSwitchingMode to 0.	(Selects PowerSwitchingMode = Global)
//
//		To Enable Global Power:
//			Set UHCRHDB:LPSC to 1.					(Turn on power to all ports)
//
//		To Disable Global Power:
//			Set UHCRHDB:LPS to 1.					(Turn off power to all ports)
//
//		Comments:
//			Power switching is enabled.
//			Global Power Mode is enabled.
//			Power to all ports is enabled or disabled at the same time.
//
//
//	3.	Per Port Power Switching Mode Only:
//		Setup:
//			A. Set UHCRHDA:NoPowerSwitching to 0.	(Allows power switching)
//			B. Set UHCRHDA:PowerSwitchingMode to 1.	(Selects PowerSwitchingMode = Per-Port)
//			C. Set UHCRHDB:PPCM[1] to 1.			(Makes UHCRHP1 respond only to per port power commands)
//			D. Set UHCRHDB:PPCM[2] to 1.			(Makes UHCRHP2 respond only to per port power commands)
//
//		To Enable Port1 Power:
//			Set UHCRHPS1:PPS to 1					(Turn on power to port 1)
//
//		To Disable Port1 Power:
//			Set UHCRHPS1:LDA to 1					(Turn off power to port 1)
//
//		To Enable Port2 Power:
//			Set UHCRHPS2:PPS to 1					(Turn on power to port 2)
//
//		To Disable Port2 Power:
//			Set UHCRHPS2:LDA to 1					(Turn off power to port 2)
//
//		Comments:
//			Power switching is enabled.
//			Per Port Power switching mode is enabled.
//			Each port to participate in Per Port Power switching must set
//			its corresponding bit in the UHCRHDB:PPCM mask.
//			Power to individual ports is enabled or disabled without effecting other ports.
//			
//
//	4.	Combination Global Power Mode Switching and Per Port Power Switching Mode Only:
//		Setup:
//			A. Set UHCRHDA:NoPowerSwitching to 0.	(Allows power switching)
//			B. Set UHCRHDA:PowerSwitchingMode to 1.	(Selects PowerSwitchingMode = Per-Port)
//			C. Set UHCRHDB:PPCM[1] to 0.			(Makes UHCRHP1 respond only to per port power commands)
//			D. Set UHCRHDB:PPCM[2] to 1.			(Makes UHCRHP2 respond only to per port power commands)
//
//		To Enable Port1 Power:
//			Set UHCRHDB:LPSC to 1.					(A Global Power Command: port1 responds by turning on)
//													(Port2 remains unaffected)
//
//		To Disable Port1 Power:
//			Set UHCRHDB:LPS to 1.					(A Global Power Command: port1 responds by turning off)
//													(Port2 remains unaffected)
//
//		To Enable Port2 Power:
//			Set UHCRHPS2:PPS to 1					(Turn on power to port 2)
//													(Port1 remains unaffected)
//
//		To Disable Port2 Power:
//			Set UHCRHPS2:LDA to 1					(Turn off power to port 2)
//													(Port1 remains unaffected)
//
//		Comments:
//			This example shows port1 being controlled by Global Power Mode commands,
//			and port2 is controlled only by specific set or clear port power commands.
//			Power switching is enabled.
//			Per Port Power switching mode is enabled.
//			Each port to participate in Per Port Power switching must set
//			its corresponding bit in the UHCRHDB:PPCM mask.
//			In this case:
//				Port1 responds to Global Power Mode commands
//				Port2 response to Per Port Power Mode commands
//			All ports without their bits set in UHCRHDB:PPCM mask are effect by Global Power Mode commands.
//			Power to individual ports is enabled or disabled without effecting other ports.
//			
//
    	virtual void SetupUSBHostPEN(int Port) 
    	{ 
        unsigned long	ulPinArrayParms[3];
        unsigned long	ulAlternateFunctionParms[3];

        // Configure GPIO 89 according to the discussion above:
        //		Level: Low (enable)
        //		Direction: Output
        //		Alternate function: 2

        // level, direction & alternate function gpio apis all use the same pin array
        ulPinArrayParms[0] = 1;
        ulPinArrayParms[1] = 89;
              XllpGpioSetOutputState1( m_pDCGPIOReg, ulPinArrayParms );   //GPIO89 output "1"   for sp2525-1EN
//                XllpGpioSetOutput0( m_pDCGPIOReg, ulPinArrayParms );   //GPIO89 output "0"

        XllpGpioSetDirectionOut( m_pDCGPIOReg, ulPinArrayParms );

        ulAlternateFunctionParms[0] = 1;
        ulAlternateFunctionParms[1] = XLLP_GPIO_ALT_FN_2;
        XllpGpioSetAlternateFn( m_pDCGPIOReg, ulPinArrayParms, ulAlternateFunctionParms );
    }

};

SOhcdPdd * CreateBulverdeOhci(LPCTSTR lpActiveRegistry) 
{
    return new MainStoneOhciPdd(lpActiveRegistry);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日本免费一区二区三区| 99久久精品国产一区| 亚洲黄色性网站| 中文字幕不卡一区| 国产日韩欧美电影| 欧美激情一区二区在线| 国产精品无遮挡| 最新久久zyz资源站| ㊣最新国产の精品bt伙计久久| 国产精品久久久久国产精品日日| 中文字幕中文乱码欧美一区二区| 国产精品高潮久久久久无| 中文字幕一区二区三区四区不卡| 一色屋精品亚洲香蕉网站| 中文字幕一区不卡| 亚洲综合另类小说| 免费精品视频在线| 国产在线精品免费av| 床上的激情91.| 日本韩国视频一区二区| 欧美日韩一级二级| 欧美不卡在线视频| 国产精品久久久久久福利一牛影视| ㊣最新国产の精品bt伙计久久| 亚洲一区二区三区在线看| 视频一区免费在线观看| 国产九色sp调教91| 色999日韩国产欧美一区二区| 欧美精品九九99久久| 久久久久久电影| 亚洲三级久久久| 日本亚洲欧美天堂免费| 成人av小说网| 日韩亚洲欧美中文三级| 亚洲国产高清在线观看视频| 午夜国产精品一区| 成人免费看的视频| 欧美电影一区二区三区| 国产精品毛片久久久久久| 三级在线观看一区二区| 成人免费毛片app| 日韩欧美色综合网站| 国产精品久久久爽爽爽麻豆色哟哟| 亚洲已满18点击进入久久| 国产精品综合视频| 欧美日韩精品一区二区天天拍小说 | 国产福利精品导航| 日韩亚洲欧美在线观看| 国产精品国产三级国产普通话99| 午夜精品久久久久久| 成人手机在线视频| 欧美成人aa大片| 视频一区二区不卡| 91久久一区二区| 中文无字幕一区二区三区| 日产国产高清一区二区三区| 91性感美女视频| 国产午夜精品一区二区 | 6080yy午夜一二三区久久| 中文字幕一区二区在线播放| 国产在线精品一区二区夜色| 欧美图片一区二区三区| 亚洲欧美aⅴ...| av一本久道久久综合久久鬼色| 欧美一卡2卡3卡4卡| 亚洲一区二区三区四区在线免费观看 | 一区二区国产视频| aaa亚洲精品| 国产精品嫩草影院av蜜臀| 国产一区二三区好的| 日韩精品专区在线影院重磅| 五月天一区二区三区| 欧美视频三区在线播放| 亚洲精品成人精品456| 不卡一二三区首页| 中文字幕一区二区不卡| 91丨九色丨尤物| 自拍偷拍国产亚洲| 一本久久a久久精品亚洲| 亚洲欧洲美洲综合色网| 色综合久久88色综合天天免费| 亚洲欧美自拍偷拍| 91麻豆国产福利在线观看| 一区二区三区在线观看视频| 色综合色综合色综合色综合色综合| 国产精品久久久久毛片软件| www.99精品| 亚洲精品乱码久久久久久久久 | 欧美精品亚洲二区| 日韩和欧美一区二区| 欧美va在线播放| 国产盗摄女厕一区二区三区| 国产精品美女久久久久高潮| 91久久精品国产91性色tv| 亚洲综合色视频| 欧美一区二区视频网站| 激情综合色播五月| 国产精品久久久久久久蜜臀| 色综合激情五月| 视频一区二区国产| 国产喷白浆一区二区三区| 色综合久久综合| 九九精品一区二区| 国产日产精品1区| 在线观看国产日韩| 麻豆精品视频在线观看视频| 国产精品美女视频| 欧美一区日韩一区| 丰满岳乱妇一区二区三区| 一区二区三区在线观看动漫| 日韩欧美视频一区| av一区二区三区| 免费成人av在线| 国产精品久久久久久福利一牛影视| 欧美日韩高清一区二区不卡| 国产精选一区二区三区| 亚洲制服欧美中文字幕中文字幕| 精品国产伦理网| 色老综合老女人久久久| 国产美女精品一区二区三区| 一区二区在线看| 国产三区在线成人av| 欧美性大战久久久久久久蜜臀| 国产在线国偷精品产拍免费yy| 亚洲午夜影视影院在线观看| 国产视频在线观看一区二区三区| 日韩欧美综合一区| 在线观看国产一区二区| 国产夫妻精品视频| 蜜桃视频第一区免费观看| 一区二区在线电影| 国产精品伦理在线| 精品欧美一区二区在线观看 | 午夜精品久久久久久久99樱桃| 国产欧美一区二区三区网站 | 日韩精品一二区| 亚洲免费伊人电影| 中文欧美字幕免费| 久久综合狠狠综合久久综合88| 欧美精品粉嫩高潮一区二区| 91香蕉国产在线观看软件| 国产精品538一区二区在线| 日本三级韩国三级欧美三级| 亚洲一区二区精品视频| 亚洲另类在线一区| 中文字幕五月欧美| 国产精品毛片久久久久久久| 久久美女高清视频| 精品不卡在线视频| 精品国产a毛片| 日韩一区二区在线看片| 欧美一区二区日韩| 欧美一级高清片在线观看| 91精品国产一区二区三区| 制服丝袜一区二区三区| 欧美高清一级片在线| 3atv一区二区三区| 欧美一区在线视频| 精品国偷自产国产一区| 久久众筹精品私拍模特| 国产午夜精品一区二区三区视频 | www.激情成人| av一二三不卡影片| 日本高清无吗v一区| 欧美性大战久久久久久久| 在线成人午夜影院| 欧美tk丨vk视频| 2020日本不卡一区二区视频| 国产欧美一区二区三区鸳鸯浴| 国产精品你懂的在线欣赏| 亚洲精品日韩一| 亚瑟在线精品视频| 精品亚洲欧美一区| 成人激情午夜影院| 欧美亚洲愉拍一区二区| 欧美人狂配大交3d怪物一区| 精品国产欧美一区二区| 日本一区二区三级电影在线观看| 日韩毛片一二三区| 婷婷久久综合九色国产成人| 理论片日本一区| 成人午夜看片网址| 欧美日韩亚洲不卡| 26uuu国产日韩综合| 中文字幕佐山爱一区二区免费| 亚洲韩国精品一区| 国产乱妇无码大片在线观看| 91麻豆免费观看| 精品999在线播放| 尤物av一区二区| 精品午夜久久福利影院| 色一情一乱一乱一91av| 日韩精品影音先锋| 亚洲人吸女人奶水| 久久99久久久欧美国产| 91色porny蝌蚪| 欧美精品一区二区在线播放| 亚洲一区二区三区在线播放| 国产精品亚洲专一区二区三区| 欧美中文字幕亚洲一区二区va在线|