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

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

?? usbpcistub.c

?? WINDRIVER MCP750 BSP
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* usbPciStub.c - System-specific PCI Functions *//* Copyright 1999-2002 Wind River Systems, Inc. *//*Modification history--------------------01k,20mar02,mil  Changed prototypes that cause USB attach failure. (SPR #74545)01j,04dec01,mil  Added support for mcpn750 and cleaned up compiler warnings.01i,17jul01,wef  moved pci stubs from comps/src into the bsp and changed name 		 from stub<arch>UsbPciLib.c to usbPciStub.c01h,17may00,wef  created for ppc bsps from usbPciStub.c in T301g,17apr00,wef  in executing 01f, some lines were left out.  replaced them01f,10apr00,wef  change usrUsbPciLib.c to bsp specific stubs to 		 remove bsp dependency01e,08mar00,rcb  Correct prototype for usbPciMemioOffset()...		 was incorrectly called usbPciMemOffset().01d,07mar00,rcb  Add support for MIPS R5000 platform.01c,10dec99,rcb  Add definition for usbPciMemioOffset().  Add conditional		 code to differentiate mcp750 and mtx604.01b,05dec99,rcb  Add code in usbPciIntConnect() and usbPciIntRestore() to		 maintain usage counts for each interrupt number.  This allows		 multiple callers to share a single interrupt.01a,31may99,rcb  First.*//*DESCRIPTIONThis file defines platform-independent functions accessing PCI bus capabilities.  These functions allow PCI device drivers to be written independent of the underlying O/S's PCI access mechanisms.The name of each function in this group begins with "usb" to represent"Device Driver Services."*//* Includes */#include "vxWorks.h"#include "string.h"#include "sysLib.h"#include "cacheLib.h"#include "iv.h"#include "intLib.h"#include "drv/pci/pciConfigLib.h"       /* VxWorks PCI funcs */#include "usb/usbPlatform.h"            /* Basic definitions */#include "usb/usbPciLib.h"              /* Our API *//* Power PC 604 (mcp750/mcpn750 & mtx604) *//* Mappings for I/O and memory address translation (values from [bsp].h) */#define PCI_IO_OFFSET           ISA_MSTR_IO_LOCAL#define PCI_MEM_OFFSET          PCI2DRAM_BASE_ADRS#define PCI_MEMIO_OFFSET        PCI_MSTR_MEMIO_LOCAL -  PCI_MSTR_MEMIO_BUS/* The mcp750 doesn't define sysInWord, sysInLong, sysOutWord, and * sysOutLong.	It includes the following entry points instead for which * there is no vxWorks function prototype.  We include the following * definitions in order to suppress compiler warnings. */IMPORT UINT16 sysIn16  (UINT16 *);IMPORT UINT32 sysIn32  (UINT32 *);IMPORT void   sysOut16 (UINT16 *, UINT16);IMPORT void   sysOut32 (UINT32 *, UINT32);/* Map the "standard" vxworks I/O functions to the mcp750 equivalents */#define sysInWord(p)	 (USHORT)sysIn16(  (UINT16 *) (p) )#define sysInLong(p)	 (UINT32)sysIn32(  (UINT32 *) (p) )#define sysOutWord(p,d)          sysOut16( (UINT16 *) (p), (UINT16) (d) )#define sysOutLong(p,d)          sysOut32( (UINT32 *) (p), (UINT32) (d) )/* Interrupt enable/disable */#if defined(MCP750) || defined(MCPN750)#define INTERRUPT_BASE	ISA_INTERRUPT_BASE#else	#define INTERRUPT_BASE	EXT_INTERRUPT_BASE#endif  /* MCP750 || MCPN750 */#define IVEC(i)	 INUM_TO_IVEC ((int) ((i) + INTERRUPT_BASE))#define INT_CONNECT(intNo, func, param) \    intConnect (IVEC (intNo), (VOIDFUNCPTR) func, (int) param)#define INT_DISCONNECT(intNo, func, param)#define INT_ENABLE(i)	intEnable ((i) + INTERRUPT_BASE)#define INT_DISABLE(i)	intDisable ((i) + INTERRUPT_BASE)/* Map I/O functions to underlying system functions. */#define	OUR_PCI_IN_BYTE(a)		sysInByte ((a) + PCI_IO_OFFSET)#define	OUR_PCI_IN_WORD(a)		sysInWord ((a) + PCI_IO_OFFSET)#define	OUR_PCI_IN_DWORD(a)		sysInLong ((a) + PCI_IO_OFFSET)#define	OUR_PCI_OUT_BYTE(a,v)	sysOutByte ((a) + PCI_IO_OFFSET, (v))#define	OUR_PCI_OUT_WORD(a,v)	sysOutWord ((a) + PCI_IO_OFFSET, (v))#define	OUR_PCI_OUT_DWORD(a,v)	sysOutLong ((a) + PCI_IO_OFFSET, (v))/* code tracks usage count for interrupts 0..MAX_INT_NO-1. */#define MAX_INT_NO		16/* locals */LOCAL UINT16 intUsage [MAX_INT_NO] = {0};/***************************************************************************** usbPciClassFind - Locates PCI devices by class.** A caller uses this function to locate a PCI device by its PCI class.* The caller must specify the <pciClass>, <subClass>, and <pgmIf> for the* device being sought.	The function returns the first matching device* for <index> = 0, the second for <index> = 1, and so forth.  The* bus number, device number, and function number for the matching device * are returned in the <pBusNo>, <pDeviceNo>, and <pFuncNo> buffers provided * by the caller. *** RETURNS: TRUE if matching device found*	   FALSE if device not found*/BOOL usbPciClassFind    (    UINT8 pciClass,		/* PCI device class */    UINT8 subClass,		/* PCI device sub-class */    UINT8 pgmIf,		/* Programming interface */    UINT16 index,		/* Caller wants nth matching dev */    pUINT8 pBusNo,		/* Bus number of matching dev */    pUINT8 pDeviceNo,		/* Device number of matching dev */    pUINT8 pFuncNo		/* Function number of matching dev */    )    {    int intBusNo;		/* VxWorks returns "int" values */    int intDeviceNo;    int intFuncNo;        /* Use the VxWorks PCI config. library to find a device within the    specified class. */    if (pciFindClass ((pciClass << 16) | (subClass << 8) | pgmIf, index,	&intBusNo, &intDeviceNo, &intFuncNo) != OK)	{	return FALSE;	}    else	{	if (pBusNo) *pBusNo = (UINT8) intBusNo;	if (pDeviceNo) *pDeviceNo = (UINT8) intDeviceNo;	if (pFuncNo) *pFuncNo = (UINT8) intFuncNo;	}    return TRUE;    }/***************************************************************************** usbPciByteGet - Returns a UINT8 configuration value** This function returns the UINT8 value at offset <regOffset> from * the PCI configuration space of the device identified by <busNo>, * <deviceNo>, and <funcNo>.** RETURNS: UINT8 value read from device configuration space*/UINT8 usbPciByteGet     (    UINT8 busNo,		/* Bus number of device */    UINT8 deviceNo,		/* Device number of device */    UINT8 funcNo,		/* Function number of device */    UINT16 regOffset		/* Offset into PCI config space */    )    {    UINT8 value;    if (pciConfigInByte (busNo, deviceNo, funcNo, regOffset, &value) != OK)	return 0;    return value;    }/***************************************************************************** usbPciWordGet - Returns a UINT16 configuration value** This function returns the UINT16 value at offset <regOffset> from * the PCI configuration space of the device identified by <busNo>, * <deviceNo>, and <funcNo>.** NOTE: This function adjusts for big vs. little endian environments.** RETURNS: UINT16 value read from device configuration space*/UINT32 usbPciWordGet    (    UINT8 busNo,		/* Bus number of device */    UINT8 deviceNo,		/* Device number of device */    UINT8 funcNo,		/* Function number of device */    UINT16 regOffset		/* Offset into PCI config space */    )    {    UINT16 value;    if (pciConfigInWord (busNo, deviceNo, funcNo, regOffset, &value) != OK)	return 0;    return value;    }/***************************************************************************** usbPciDwordGet - Returns a UINT32 configuration value** This function returns the UINT32 value at offset <regOffset> from * the PCI configuration space of the device identified by <busNo>, * <deviceNo>, and <funcNo>.** NOTE: This function adjusts for big vs. little endian environments.** RETURNS: UINT32 value read from device configuration space*/UINT32 usbPciDwordGet    (    UINT8 busNo,		/* Bus number of device */    UINT8 deviceNo,		/* Device number of device */    UINT8 funcNo,		/* Function number of device */    UINT16 regOffset		/* Offset into PCI config space */    )    {    UINT32 value;    if (pciConfigInLong (busNo, deviceNo, funcNo, regOffset, &value) != OK)	return 0;    return value;    }/***************************************************************************** usbPciConfigHeaderGet - Reads a device's PCI configuration header** This function reads the PCI configuration header for the device* identified by <busNo>, <deviceNo>, and <funcNo>.  The configuration* header is stored in the <pCfgHdr> buffer provided by the caller.** This function initializes the <pCfgHdr> structure to zeros.  Any * fields which cannot be read from the device's configuration header * will remain zero upon return.  This function does not attempt to read* fields defined as "reserved" in the PCI configuration header.** RETURNS: N/A*/VOID usbPciConfigHeaderGet    (    UINT8 busNo,		/* Bus number of device */    UINT8 deviceNo,		/* Device number of device */    UINT8 funcNo,		/* Function number of device */    pPCI_CFG_HEADER pCfgHdr	/* Buffer provided by caller */    )    {    int i;    /* Do nothing if CfgHdr is NULL */    if (pCfgHdr == NULL)	return;    /* Initialize the buffer to zeros. */    memset (pCfgHdr, 0, sizeof (*pCfgHdr));    /* Read and store each field in the PCI configuration header. */    pCfgHdr->vendorId	= usbPciWordGet (busNo, deviceNo, funcNo, PCI_CFG_VENDOR_ID);    pCfgHdr->deviceId	= usbPciWordGet (busNo, deviceNo, funcNo, PCI_CFG_DEVICE_ID);    pCfgHdr->command	= usbPciWordGet (busNo, deviceNo, funcNo, PCI_CFG_COMMAND);    pCfgHdr->status	= usbPciWordGet (busNo, deviceNo, funcNo, PCI_CFG_STATUS);    pCfgHdr->revisionId = usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_REVISION);    pCfgHdr->pgmIf	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_PROGRAMMING_IF);    pCfgHdr->subClass	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_SUBCLASS);    pCfgHdr->pciClass	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_CLASS);    pCfgHdr->cacheLineSize = usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_CACHE_LINE_SIZE);    pCfgHdr->latencyTimer = usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_LATENCY_TIMER);    pCfgHdr->headerType = usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_HEADER_TYPE);    pCfgHdr->bist	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_BIST);    for (i = 0; i < PCI_CFG_NUM_BASE_REG; i++)	pCfgHdr->baseReg [i] = usbPciDwordGet (busNo, deviceNo, funcNo, 	    PCI_CFG_BASE_ADDRESS_0 + i * sizeof (UINT32));    pCfgHdr->romBase	= usbPciDwordGet (busNo, deviceNo, funcNo, PCI_CFG_EXPANSION_ROM);    pCfgHdr->intLine	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_DEV_INT_LINE);    pCfgHdr->intPin	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_DEV_INT_PIN);    pCfgHdr->minGrant	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_MIN_GRANT);    pCfgHdr->maxLatency = usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_MAX_LATENCY);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人av资源| 国产福利一区二区三区视频在线 | 蜜芽一区二区三区| 国产三级精品三级| 欧美亚洲动漫制服丝袜| 国产一区二区三区四区在线观看| 亚洲欧美色图小说| 91精品国产综合久久久久| 成人精品小蝌蚪| 麻豆国产精品一区二区三区| 亚洲精品视频一区| 久久嫩草精品久久久精品| 在线看不卡av| 成a人片亚洲日本久久| 激情另类小说区图片区视频区| 樱花影视一区二区| 国产精品三级视频| 精品av综合导航| 91精品啪在线观看国产60岁| 在线观看欧美日本| 91亚洲精品乱码久久久久久蜜桃| 国产乱人伦偷精品视频不卡| 九色porny丨国产精品| 亚洲成国产人片在线观看| 亚洲欧美激情插| 中文一区二区在线观看| 精品国产区一区| 欧美一二三区在线| 欧美日韩aaaaa| 欧美色图在线观看| 色天天综合久久久久综合片| 99视频国产精品| 成人va在线观看| 成人网男人的天堂| 成人亚洲一区二区一| 成人国产精品免费观看动漫| 国产成人综合在线观看| 国模套图日韩精品一区二区| 激情亚洲综合在线| 韩国女主播一区| 黄网站免费久久| 国内精品写真在线观看| 久久精品久久精品| 精品一区二区三区视频| 国内精品久久久久影院薰衣草 | 一区二区三区自拍| 亚洲色图欧洲色图婷婷| 亚洲欧洲av另类| 亚洲乱码精品一二三四区日韩在线 | 99在线精品视频| 91视频免费播放| 99热99精品| 色狠狠一区二区| 欧美日韩久久一区| 日韩一区二区在线免费观看| 日韩精品一区二区三区蜜臀 | 欧美一区国产二区| 精品国免费一区二区三区| 久久婷婷久久一区二区三区| 国产婷婷色一区二区三区| 日韩一区在线看| 亚洲制服丝袜av| 蜜桃视频第一区免费观看| 国产在线一区二区综合免费视频| 国产精品中文字幕一区二区三区| 成人性视频网站| 一本久道中文字幕精品亚洲嫩| 欧美日韩一区二区三区视频| 日韩精品一区二区三区视频| 国产精品欧美一区二区三区| 亚洲精选一二三| 天天操天天色综合| 国产中文字幕精品| 99久久精品国产一区| 欧美久久一区二区| 久久网站最新地址| 一区二区三区精品久久久| 午夜激情久久久| 国产一区二区福利视频| 91污片在线观看| 日韩午夜在线影院| 国产精品免费久久| 天天亚洲美女在线视频| 高清国产午夜精品久久久久久| 色噜噜狠狠成人网p站| 日韩一级片在线播放| 亚洲欧洲美洲综合色网| 国产福利不卡视频| 欧美性猛片aaaaaaa做受| 久久精品人人爽人人爽| 一区二区三区在线免费观看| 看国产成人h片视频| 91论坛在线播放| 精品国产乱码久久久久久夜甘婷婷| 136国产福利精品导航| 理论片日本一区| 91黄色免费观看| 国产午夜精品久久| 日本不卡高清视频| 在线一区二区视频| 久久天天做天天爱综合色| 亚洲一区二区三区四区五区中文| 成人性生交大片免费看视频在线| 日韩欧美精品在线| 亚洲一级二级三级| 成人av网站免费观看| 日韩美女在线视频| 亚洲高清久久久| 91麻豆蜜桃一区二区三区| 26uuu成人网一区二区三区| 性做久久久久久免费观看| 成人国产精品免费网站| 久久无码av三级| 久久精品噜噜噜成人av农村| 欧美精选一区二区| 一区二区三区四区高清精品免费观看| 国产精品一区二区无线| 日韩欧美中文字幕制服| 午夜视频一区在线观看| 欧美综合久久久| 亚洲日本va在线观看| 不卡的电视剧免费网站有什么| 久久奇米777| 激情综合网最新| 欧美一级理论片| 同产精品九九九| 欧美日韩国产综合一区二区| 亚洲精品欧美二区三区中文字幕| 成人理论电影网| 欧美国产一区二区在线观看 | 成人激情校园春色| 久久久亚洲精品石原莉奈| 九色综合国产一区二区三区| 精品黑人一区二区三区久久| 精品无人码麻豆乱码1区2区| 精品久久久久香蕉网| 久久精品99久久久| 精品噜噜噜噜久久久久久久久试看| 日本aⅴ精品一区二区三区| 欧美精品高清视频| 青娱乐精品视频| 91精品国产91久久久久久一区二区| 日韩影院免费视频| 日韩精品一区二区在线观看| 久久国产精品一区二区| 欧美一区二区性放荡片| 老司机免费视频一区二区三区| 日韩精品在线看片z| 国产在线国偷精品产拍免费yy| 久久美女艺术照精彩视频福利播放| 国产精品正在播放| 亚洲欧洲成人自拍| 亚洲精品一区二区三区影院| 九九精品视频在线看| 国产三级欧美三级| 99久久久精品| 亚洲一区二区三区四区在线观看 | 久久精品视频网| av一二三不卡影片| 一卡二卡三卡日韩欧美| 欧美久久久久久久久久| 伦理电影国产精品| 国产女人aaa级久久久级 | 97se狠狠狠综合亚洲狠狠| 一区二区三区成人在线视频| 欧美精品一级二级三级| 国产一区三区三区| 亚洲婷婷综合久久一本伊一区| 日本精品免费观看高清观看| 麻豆一区二区99久久久久| 久久久久久夜精品精品免费| 97精品久久久久中文字幕| 视频一区二区不卡| 国产午夜亚洲精品理论片色戒| 色综合久久88色综合天天| 偷拍一区二区三区| 国产精品无人区| 欧美日韩国产首页在线观看| 国产一区二区导航在线播放| 亚洲色图欧洲色图婷婷| 精品国产自在久精品国产| 国产成人在线视频播放| 亚洲国产欧美在线人成| 久久久久久久久久久99999| 91麻豆福利精品推荐| 九九精品视频在线看| 一区二区在线观看免费视频播放| 欧美一级二级三级蜜桃| 91无套直看片红桃| 国内偷窥港台综合视频在线播放| 樱桃视频在线观看一区| 久久久激情视频| 国产不卡一区视频| 色综合久久六月婷婷中文字幕| 青草国产精品久久久久久| 亚洲人成影院在线观看| 久久美女艺术照精彩视频福利播放| 欧美日韩三级一区二区| eeuss鲁片一区二区三区在线观看| 日本视频中文字幕一区二区三区|