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

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

?? usbpcistub.c

?? vxwork arm920 bsp開發(fā)包
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
/* usbPciStub.c - System-specific PCI Functions for Integrator Bsps *//* Copyright 1999-2002 Wind River Systems, Inc. *//*Modification history--------------------01a,25apr02,to   define PCI to CPU offset correctly.*//*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 "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()    {    int nth, pciBus, pciDevice, pciFunc;    /*     * Initialise only once     */    if( sysUsbInitialised )        return;    /*     * See if any USB boards are installed     */    for(nth = 0; ; nth++)        {        /*         * Look for the nth occurance 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));

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜一区二区三区在线观看| 亚洲色图在线看| 老鸭窝一区二区久久精品| 91精品国产综合久久福利 | 国产亚洲精品久| 成人午夜碰碰视频| 亚洲精品久久7777| 欧美一区二区三区成人| 国模一区二区三区白浆| 中文一区二区完整视频在线观看| www.色综合.com| 一区二区三区中文字幕精品精品| 欧美日韩国产综合久久| 久久国产人妖系列| 亚洲同性gay激情无套| 欧美日韩一区二区三区四区五区 | 91精品福利在线一区二区三区| 婷婷开心激情综合| 欧美精品一区二区三区蜜臀| 国产精一品亚洲二区在线视频| 日韩美女啊v在线免费观看| 精品视频一区 二区 三区| 久草热8精品视频在线观看| 亚洲国产精品成人久久综合一区| 在线免费观看一区| 国产一区视频网站| 亚洲韩国精品一区| 久久精品欧美一区二区三区不卡 | 成人中文字幕合集| 午夜av一区二区三区| 欧美国产1区2区| 欧美日韩aaaaaa| 成人激情综合网站| 蜜臀久久久99精品久久久久久| 亚洲人快播电影网| 久久婷婷国产综合精品青草| 色诱视频网站一区| 国产精品自在在线| 午夜私人影院久久久久| 欧美韩国一区二区| 欧美v国产在线一区二区三区| 91丝袜高跟美女视频| 国产老女人精品毛片久久| 五月综合激情日本mⅴ| 中文字幕视频一区二区三区久| 91精品国产综合久久久久久久久久 | 欧美一区中文字幕| 99精品久久免费看蜜臀剧情介绍| 美女免费视频一区| 亚洲综合无码一区二区| 国产欧美日韩精品a在线观看| 欧美色偷偷大香| 99精品视频免费在线观看| 九一九一国产精品| 日一区二区三区| 洋洋成人永久网站入口| 国产精品传媒入口麻豆| 久久综合网色—综合色88| 欧美一级黄色大片| 欧美日韩情趣电影| 欧美日韩一二三区| 欧美丝袜自拍制服另类| 日本精品视频一区二区| 99精品热视频| 91免费视频网| 成人a级免费电影| 成人在线综合网站| 高清av一区二区| 高潮精品一区videoshd| 国产一区二区美女诱惑| 九九视频精品免费| 卡一卡二国产精品| 奇米色一区二区| 天天做天天摸天天爽国产一区 | 亚洲婷婷综合久久一本伊一区| 国产精品每日更新| 欧美高清一级片在线观看| 国产目拍亚洲精品99久久精品| 久久久久亚洲综合| 中文字幕国产一区二区| 国产欧美日韩精品a在线观看| 国产亚洲一区字幕| 国产精品欧美久久久久无广告| 国产欧美日韩久久| 日韩美女视频一区| 亚洲国产一区二区视频| 亚洲一区在线观看免费观看电影高清| 亚洲精品视频在线看| 亚洲另类在线一区| 午夜视频一区二区| 六月丁香婷婷色狠狠久久| 国产在线看一区| aaa欧美日韩| 欧美日韩国产中文| 精品国产乱码久久久久久蜜臀| 国产欧美日韩中文久久| 亚洲视频 欧洲视频| 亚洲成av人**亚洲成av**| 久久精品噜噜噜成人88aⅴ| 激情偷乱视频一区二区三区| 成人一区二区三区中文字幕| 92精品国产成人观看免费| 欧美日韩激情一区二区三区| 日韩欧美国产成人一区二区| 国产日本欧美一区二区| 欧美不卡一区二区| 欧美国产日本韩| 亚洲最新视频在线播放| 精品午夜久久福利影院| youjizz国产精品| 欧美丰满嫩嫩电影| 国产女主播一区| 午夜亚洲国产au精品一区二区| 精品午夜久久福利影院| 一本到三区不卡视频| 91麻豆精品国产91久久久久久 | 久久嫩草精品久久久久| 国产精品初高中害羞小美女文| 午夜电影一区二区| 高清在线不卡av| 欧美猛男gaygay网站| 中文在线一区二区| 日本不卡视频在线| www.爱久久.com| 精品国产露脸精彩对白| 亚洲国产日韩在线一区模特| 国内偷窥港台综合视频在线播放| 色视频欧美一区二区三区| 久久伊人中文字幕| 舔着乳尖日韩一区| 91视频你懂的| 久久精品免费在线观看| 日韩有码一区二区三区| 97久久久精品综合88久久| xnxx国产精品| 日产国产高清一区二区三区 | 亚洲激情自拍偷拍| 国产激情精品久久久第一区二区 | 亚洲成人免费电影| 99国产精品久久久久久久久久| 精品少妇一区二区三区免费观看| 一区二区三区四区在线免费观看 | 欧美亚洲精品一区| 国产精品久久久久一区| 国内久久精品视频| 日韩一区二区在线观看视频 | 99精品久久久久久| 久久久一区二区三区| 免费成人在线视频观看| 欧美精品久久一区| 亚洲精品国产精华液| 丰满白嫩尤物一区二区| 精品国精品国产| 美女一区二区久久| 欧美精品一级二级| 天天色天天操综合| 欧美日韩久久不卡| 亚洲一区二区三区四区在线 | 国产精品国产三级国产aⅴ无密码| 国内不卡的二区三区中文字幕 | 久久久久久97三级| 国产一区二区在线观看视频| 日韩一级片在线播放| 亚洲成av人综合在线观看| 欧美性色aⅴ视频一区日韩精品| 日韩美女视频一区| 色综合天天综合狠狠| 亚洲视频狠狠干| 在线观看日韩毛片| 亚洲午夜精品在线| 欧美日韩综合在线免费观看| 亚洲一级二级在线| 欧美久久一区二区| 久久精品国产精品亚洲红杏| 精品国精品国产| 国产大陆精品国产| 亚洲欧美在线视频观看| 91麻豆国产香蕉久久精品| 亚洲小说欧美激情另类| 在线播放中文一区| 激情综合色综合久久综合| 国产日韩欧美一区二区三区乱码| 国产成人啪午夜精品网站男同| 欧美激情一区二区在线| 99在线精品观看| 亚洲h在线观看| 久久综合丝袜日本网| aa级大片欧美| 日韩电影在线看| 国产欧美日韩另类一区| 色爱区综合激月婷婷| 日本 国产 欧美色综合| 久久综合色天天久久综合图片| 成人国产精品视频| 亚洲一卡二卡三卡四卡无卡久久| 日韩女优毛片在线| 91亚洲午夜精品久久久久久| 亚洲午夜视频在线| 国产亚洲精久久久久久| 欧美色倩网站大全免费|