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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? usbpcistub.c

?? mtx604在vxworks下的bsp源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* usbPciStub.c - System-specific PCI Functions *//* Copyright 1999-2001 Wind River Systems, Inc. *//*Modification history--------------------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 & 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. */extern USHORT sysIn16 (int port);extern ULONG sysIn32 (int port);extern void	sysOut16 (int port, short data);extern void	sysOut32 (int port, long data);/* Map the "standard" vxworks I/O functions to the mcp750 equivalents */#define sysInWord(p)	sysIn16(p)#define sysInLong(p)	sysIn32(p)#define sysOutWord(p,d) sysOut16(p,d)#define sysOutLong(p,d) sysOut32(p,d)/* Interrupt enable/disable */#ifdef	MCP750#define INTERRUPT_BASE	ISA_INTERRUPT_BASE#else	#define INTERRUPT_BASE	EXT_INTERRUPT_BASE#endif#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);    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一卡2卡三卡4卡5免费| 日韩视频中午一区| 美女精品自拍一二三四| 国产精品理伦片| 欧美一区二区三区的| 92精品国产成人观看免费| 麻豆精品视频在线| 一二三区精品视频| 亚洲国产精品传媒在线观看| 91精品国产综合久久久久久漫画| 成人精品国产免费网站| 久久99久久久久| 亚洲妇女屁股眼交7| 国产精品传媒在线| 久久久91精品国产一区二区精品 | 欧美精品日韩综合在线| 粉嫩13p一区二区三区| 另类小说图片综合网| 亚洲午夜精品在线| 亚洲视频在线观看三级| 国产人成亚洲第一网站在线播放| 日韩精品一区二区三区视频播放 | 黄色精品一二区| 日本aⅴ精品一区二区三区| 一区二区三区精密机械公司| 国产精品国产三级国产aⅴ中文| 久久综合色一综合色88| 欧美一二三区在线| 欧美精品日韩一区| 欧美久久一二区| 欧美性猛交xxxxxx富婆| 色天天综合久久久久综合片| 91免费小视频| 成a人片国产精品| 成人久久久精品乱码一区二区三区| 韩国精品一区二区| 精品在线观看免费| 精品无人区卡一卡二卡三乱码免费卡| 日本中文在线一区| 日本亚洲视频在线| 午夜视频一区二区三区| 五月婷婷欧美视频| 日韩制服丝袜av| 久久精品国产澳门| 国产又粗又猛又爽又黄91精品| 久久99热国产| 国产99精品国产| 成人一区二区三区在线观看| 成人av在线电影| 一本色道a无线码一区v| 在线免费观看日韩欧美| 欧美日韩中字一区| 欧美一级专区免费大片| 欧美成人bangbros| 国产亚洲人成网站| 成人免费在线视频| 亚洲国产综合在线| 天天色图综合网| 精品无人码麻豆乱码1区2区| 成人妖精视频yjsp地址| 91在线播放网址| 欧美三级视频在线播放| 91精品国产色综合久久不卡电影| 欧美一级久久久| 久久精品人人做| 亚洲日本在线a| 午夜亚洲国产au精品一区二区| 美女国产一区二区三区| 国产.欧美.日韩| 在线观看日韩电影| 欧美mv日韩mv亚洲| 中文字幕日本乱码精品影院| 亚洲一区影音先锋| 国产一区二区三区在线观看免费 | 亚洲欧洲精品一区二区三区 | 欧美成人a在线| 国产精品三级久久久久三级| 亚洲激情第一区| 蜜臀av亚洲一区中文字幕| 成人小视频在线| 5月丁香婷婷综合| 日本一区二区三区视频视频| 亚洲最大色网站| 国产资源在线一区| 欧美性生活久久| 国产欧美一区视频| 日日骚欧美日韩| 国产99久久久国产精品潘金网站| 在线免费视频一区二区| 精品国产三级a在线观看| 一区二区视频在线看| 韩日av一区二区| 欧美羞羞免费网站| 国产欧美一区二区精品仙草咪| 一二三四社区欧美黄| 国产成人久久精品77777最新版本| 欧洲激情一区二区| 国产亚洲精久久久久久| 午夜国产精品影院在线观看| 成人妖精视频yjsp地址| 日韩精品一区二区在线观看| 一区二区三区在线观看欧美| 国产精品888| 欧美一区二区三区的| 亚洲一区二区三区影院| 成人性色生活片免费看爆迷你毛片| 91精品国产全国免费观看| 亚洲欧美日韩一区二区三区在线观看| 久久 天天综合| 91精品国产欧美一区二区18| 亚洲一区二区三区爽爽爽爽爽| 丰满亚洲少妇av| 日韩区在线观看| 亚洲午夜一区二区| 色综合天天视频在线观看| 国产精品你懂的在线| 国产美女主播视频一区| 日韩欧美国产成人一区二区| 亚洲成av人综合在线观看| 在线观看日韩一区| 亚洲日本免费电影| 成人午夜电影网站| 亚洲国产精品成人综合| 国产精品羞羞答答xxdd| xf在线a精品一区二区视频网站| 日韩电影网1区2区| 欧美顶级少妇做爰| 亚洲成人福利片| 精品1区2区3区| 五月天亚洲精品| 欧美三级一区二区| 香蕉久久一区二区不卡无毒影院| 91精品91久久久中77777| 亚洲色图清纯唯美| 色综合婷婷久久| 亚洲精品免费看| 欧美熟乱第一页| 亚州成人在线电影| 欧美一区二区在线看| 免费观看在线综合色| 欧美成va人片在线观看| 久久99精品久久久久婷婷| 91精品国产福利| 激情图片小说一区| 国产亲近乱来精品视频 | 在线观看www91| 色婷婷综合在线| 亚洲图片欧美视频| 欧美精品在欧美一区二区少妇| 偷窥少妇高潮呻吟av久久免费| 欧美一区二区三区免费在线看| 久久精品国产久精国产爱| 久久久久久久久97黄色工厂| 国产成人av电影免费在线观看| 国产精品乱码人人做人人爱| 色婷婷久久久综合中文字幕| 亚洲一区二区3| 7777女厕盗摄久久久| 激情综合五月天| 国产三级精品三级在线专区| 99久久夜色精品国产网站| 亚洲精品国产视频| 欧美一级艳片视频免费观看| 激情久久久久久久久久久久久久久久| 中文子幕无线码一区tr| 色一区在线观看| 日本不卡视频在线| 中文字幕欧美三区| 欧美日韩国产精品自在自线| 老色鬼精品视频在线观看播放| 国产亚洲精品资源在线26u| 色一区在线观看| 精品一区二区三区久久久| 国产精品久久看| 9191成人精品久久| 国产99久久久精品| 图片区日韩欧美亚洲| 国产欧美视频在线观看| 色老头久久综合| 精品在线播放免费| 亚洲激情自拍偷拍| 久久嫩草精品久久久精品一| 在线亚洲免费视频| 狠狠色2019综合网| 亚洲午夜在线观看视频在线| 国产午夜精品一区二区三区视频 | 国产欧美日韩视频在线观看| 欧美中文字幕不卡| 国产99久久久国产精品| 午夜av区久久| 亚洲视频电影在线| 精品久久五月天| 在线国产电影不卡| 国产 日韩 欧美大片| 免费xxxx性欧美18vr| 亚洲精品视频在线观看网站| 久久这里都是精品| 欧美一区二区在线不卡| 一本到不卡免费一区二区| 国产一区免费电影|