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

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

?? usbpcistub.c

?? workbench下vxworks6.6的ARM920T核對應的BSP源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* usbPciStub.c - System-specific PCI Functions for Integrator Bsps *//* Copyright (c) 2002,2007 Wind River Systems, Inc. *//*Modification history--------------------01b,26sep07,mdo  Clear out apigen errors/warnings01a,25apr02,to   define PCI to CPU offset correctly.*//*DESCRIPTIONThis file defines platform-independent functions accessing PCI buscapabilities.  These functions allow PCI device drivers to be writtenindependent 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."INCLUDE FILES: usbPlatform.h usbPciLib.h usbOhci.h*//* 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 "integrator.h"#include <usb/usbPlatform.h>		/* Basic definitions */#include <usb/usbPciLib.h>			/* Our API */#include <drv/usb/usbOhci.h>                /* OHCI definitions */#define PCI_IO_OFFSET		PCI2CPU_IO_OFFSET#define PCI_MEM_OFFSET		PCI2DRAM_BASE_ADRS#define PCI_MEMIO_OFFSET	PCI2CPU_MEM_OFFSET#define sysOutByte(addr,data)	(*((UINT8  *) (addr)) = ((UINT8)  (data)))#define sysOutWord(addr,data)   (*((UINT16 *) (addr)) = ((UINT16) (data)))#define sysOutLong(addr,data)   (*((UINT32 *) (addr)) = ((UINT32) (data)))#define sysInByte(addr)         (*((UINT8  *) (addr)))#define sysInWord(addr)         (*((UINT16 *) (addr)))#define sysInLong(addr)         (*((UINT32 *) (addr)))#define INT_CONNECT(intNo, func, param)	\	intConnect (INUM_TO_IVEC(intNo), (VOIDFUNCPTR) (func), (int) (param))#define INT_DISCONNECT(intNo, func, param)#define INT_ENABLE(i)		intEnable(i)#define INT_DISABLE(i)		intDisable(i)/* 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};LOCAL UINT32 sysUsbInitialised;/********************************************************************************* sysUsbPciInit - perform low level pci init of all Ohci class pci devices** This routine discovers and assigns PCI resources to all installed* USB class devices. In the case of the OPTI chip, it is one device* per chip. The 4 Port Lucent chip is a multi-function device with* 4 single port USB devices/functions.** NOTE: This routine should not be called directly by the user.** RETURNS: N/A*/void sysUsbPciInit (void)    {    int nth, pciBus, pciDevice, pciFunc;    /*     * Initialize only once     */    if( sysUsbInitialised )        return;    /*     * See if any USB boards are installed     */    for(nth = 0; ; nth++)        {        /*         * Look for the nth occurrence of a OHCI Class device on the Pci Bus         */        if (pciFindClass( ((OHCI_CLASS << 16) | (OHCI_SUBCLASS << 8) | OHCI_PGMIF),            nth, &pciBus, &pciDevice, &pciFunc) == OK)            {            /*             * Assign PCI resources to this device             */            pciAssignResources(pciBus, pciDevice, pciFunc);            sysUsbInitialised++;            }        else            {            /* No more devices found */            break;            }        }    }/***************************************************************************** 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));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频精选在线| 国产伦精品一区二区三区免费迷| 午夜激情综合网| 国产99久久久国产精品潘金| 欧美精品18+| 亚洲欧洲www| 久久疯狂做爰流白浆xx| 欧美日韩在线直播| 中文成人av在线| 国产资源精品在线观看| 欧美挠脚心视频网站| 中文字幕一区在线观看视频| 狠狠色丁香久久婷婷综| 欧美日韩国产123区| 亚洲精品免费在线| 成人免费高清在线| 精品国产乱码久久久久久夜甘婷婷 | 久久精品国产亚洲5555| 欧美影院精品一区| 国产精品欧美久久久久一区二区| 久久成人av少妇免费| 91精品国产综合久久蜜臀| 亚洲在线视频一区| 色av综合在线| 亚洲三级在线免费观看| 成人h动漫精品一区二| 国产欧美视频一区二区| 韩国欧美一区二区| 精品免费视频一区二区| 男人的天堂亚洲一区| 日韩免费性生活视频播放| 精品久久久久久久久久久久久久久久久 | 日韩一区二区在线观看视频| 亚洲午夜三级在线| 欧美日韩一区二区三区免费看 | 国产在线视视频有精品| 精品欧美一区二区久久| 国产精品中文字幕一区二区三区| 久久一日本道色综合| 国产乱人伦偷精品视频免下载| 久久久亚洲精品石原莉奈| 国产精品亚洲成人| 国产精品久久久久久久久快鸭| 91日韩精品一区| 亚洲精品国产一区二区精华液 | 99久久精品国产观看| 亚洲人成精品久久久久久| 91麻豆成人久久精品二区三区| 亚洲伦在线观看| 欧美日韩免费不卡视频一区二区三区| 一卡二卡三卡日韩欧美| 69成人精品免费视频| 美女视频黄a大片欧美| www国产亚洲精品久久麻豆| 国产精品1024久久| 亚洲欧洲色图综合| 6080亚洲精品一区二区| 国产乱子伦一区二区三区国色天香 | 欧美美女一区二区三区| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美成人女星排行榜| 成人激情综合网站| 日韩精品一区第一页| 亚洲精品一区二区三区福利 | 国产制服丝袜一区| 亚洲人xxxx| 精品日本一线二线三线不卡| 不卡视频在线观看| 日本亚洲免费观看| 国产精品久久一级| 欧美一级片在线看| 91麻豆福利精品推荐| 国产综合色在线| 亚洲午夜在线电影| 国产精品丝袜黑色高跟| 欧美日韩五月天| 国产91露脸合集magnet| 天堂一区二区在线免费观看| 中文字幕一区二区三区在线播放 | 在线视频综合导航| 国产成人欧美日韩在线电影| 亚洲sss视频在线视频| 国产精品久久毛片| 精品国产一区二区在线观看| 在线观看中文字幕不卡| 成人免费毛片app| 麻豆传媒一区二区三区| 亚洲自拍偷拍九九九| 成人免费在线播放视频| 欧美精品一区二| 5月丁香婷婷综合| 欧美午夜精品久久久| 成人精品一区二区三区四区| 九九视频精品免费| 日本视频免费一区| 午夜精品免费在线| 亚洲一区二区精品久久av| 国产精品电影一区二区| 久久精品夜色噜噜亚洲a∨| 精品日韩欧美一区二区| 欧美一级日韩免费不卡| 欧美一区二区三区在线观看视频 | 午夜精品福利一区二区三区蜜桃| 国产欧美日韩在线视频| 久久久久久久久蜜桃| 日韩欧美视频一区| 欧美一区二区三区公司| 欧美日韩一区久久| 欧美日韩国产精选| 欧美欧美欧美欧美| 91精品国产综合久久国产大片 | eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 加勒比av一区二区| 美女视频黄久久| 久久99精品一区二区三区| 麻豆精品一二三| 国内精品写真在线观看| 九一久久久久久| 国产一区二区三区日韩| 国产制服丝袜一区| 国内精品在线播放| 成人晚上爱看视频| 99久久99久久免费精品蜜臀| 99久久99久久精品免费看蜜桃| 91天堂素人约啪| 欧美三级韩国三级日本一级| 欧美人伦禁忌dvd放荡欲情| 91精品国产综合久久久久久| 日韩一区二区三区观看| 久久久久久久久久久久久女国产乱| 国产亚洲精品aa午夜观看| 国产精品视频一二三区| 亚洲精品中文字幕在线观看| 天天影视涩香欲综合网| 九色|91porny| 99精品视频中文字幕| 欧美三级在线视频| 日韩三级免费观看| 国产午夜亚洲精品不卡| 亚洲欧美偷拍卡通变态| 日韩专区在线视频| 国产一区二区按摩在线观看| 成人app在线| 制服视频三区第一页精品| 26uuu另类欧美亚洲曰本| 亚洲欧美在线视频| 亚洲成av人片| 国产不卡视频一区二区三区| 色婷婷久久久亚洲一区二区三区 | 中文字幕中文在线不卡住| 亚洲精品免费一二三区| 蜜臀av一级做a爰片久久| 国产精品亚洲成人| 欧美三级视频在线观看| 国产清纯白嫩初高生在线观看91 | 亚洲va欧美va人人爽| 国产乱码精品一区二区三| 在线欧美一区二区| 2020国产精品| 亚洲国产精品天堂| 成人少妇影院yyyy| 日韩欧美成人激情| 一区二区三区久久| 成人激情综合网站| 精品久久久久久久久久久久久久久| 亚洲色图.com| 成人晚上爱看视频| 日韩精品一区二| 午夜av区久久| 色噜噜久久综合| 欧美激情一区二区三区全黄| 日本亚洲三级在线| 欧美三区在线观看| 亚洲欧美中日韩| 国产精品一二三四| 欧美大片在线观看一区二区| 亚洲欧美日韩久久精品| 国产麻豆精品一区二区| 欧美一级淫片007| 婷婷中文字幕一区三区| 色偷偷成人一区二区三区91| 久久免费偷拍视频| 另类小说一区二区三区| 欧美猛男超大videosgay| 亚洲精品国产无套在线观| 成人av在线影院| 国产日韩综合av| 久久机这里只有精品| 制服丝袜中文字幕亚洲| 天天综合色天天综合色h| 欧美亚洲禁片免费| 一区二区三区丝袜| 色婷婷综合激情| 亚洲精品高清在线观看| 91一区二区在线观看| 亚洲乱码日产精品bd| 91在线小视频| 综合色天天鬼久久鬼色| 91网址在线看| 亚洲一区二区免费视频|