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

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

?? usbpcistub.c

?? integrator7t_t ARM7bsp包 很有用的程序包 學習ARM 必備
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* 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));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美极品少妇xxxxⅹ高跟鞋| 天天射综合影视| 欧美一区二区三区视频在线| 国产揄拍国内精品对白| 亚洲一区二区视频在线观看| 国产精品美女一区二区三区| 日韩午夜精品电影| 欧美日韩在线综合| 99久久久精品| 粉嫩aⅴ一区二区三区四区五区| 日韩国产欧美三级| 亚洲欧美日韩一区二区三区在线观看| 日韩免费视频线观看| 欧美日韩精品一区二区三区四区 | 日韩精彩视频在线观看| 亚洲图片你懂的| 久久精品人人爽人人爽| 精品日韩99亚洲| 制服丝袜一区二区三区| 欧美亚洲愉拍一区二区| 色婷婷香蕉在线一区二区| 成人黄色777网| 成人美女视频在线观看| 国产精品资源在线观看| 精品一区二区三区的国产在线播放| 亚洲一区二区三区自拍| 亚洲综合久久av| 亚洲欧美日韩中文播放| 亚洲狼人国产精品| 综合在线观看色| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 久久嫩草精品久久久精品| 日韩欧美成人一区| 欧美mv日韩mv亚洲| 欧美大片一区二区| 久久久国际精品| 久久久www成人免费毛片麻豆| 久久久久久久网| 久久久国产精华| 国产精品美女视频| 亚洲男人的天堂网| 夜夜揉揉日日人人青青一国产精品 | 国产一区视频网站| 国产一区二区三区久久久| 国模套图日韩精品一区二区 | 亚洲成人av一区二区三区| 一级做a爱片久久| 亚洲v精品v日韩v欧美v专区| 日韩影视精彩在线| 精彩视频一区二区三区| 国产一区二区三区在线观看免费| 国产高清不卡一区| aa级大片欧美| 欧美亚洲高清一区| 欧美成人一区二区三区在线观看| 精品噜噜噜噜久久久久久久久试看| 久久久天堂av| 亚洲视频一二三| 亚洲bt欧美bt精品777| 精品中文字幕一区二区小辣椒 | 国产一区二区美女| 成人av小说网| 欧美日韩国产片| 日韩欧美在线综合网| 国产日韩在线不卡| 一区二区三区国产豹纹内裤在线| 丝袜美腿高跟呻吟高潮一区| 韩国精品在线观看| 91亚洲国产成人精品一区二三| 欧美日韩免费高清一区色橹橹| 精品日韩av一区二区| **欧美大码日韩| 日本大胆欧美人术艺术动态| 国产精品99久久久久久有的能看| 99r精品视频| 日韩一区二区电影网| 国产精品青草综合久久久久99| 亚洲制服丝袜av| 国产精品2024| 欧美日韩一区成人| 久久久国产精华| 亚洲二区在线视频| 国产a级毛片一区| 欧美精品 国产精品| 国产人成亚洲第一网站在线播放| 亚洲成人动漫av| 成人深夜在线观看| 欧美成人精品1314www| 亚洲素人一区二区| 激情国产一区二区| 88在线观看91蜜桃国自产| 国产精品福利一区二区三区| 久久99国产精品久久99| 欧美中文字幕一区二区三区亚洲 | 亚洲欧美一区二区三区久本道91 | 欧美成人精品1314www| 亚洲在线视频免费观看| 丁香亚洲综合激情啪啪综合| 欧美一级高清片| 亚洲国产一区二区在线播放| 国产不卡视频在线观看| 制服丝袜中文字幕一区| 亚洲综合999| 东方aⅴ免费观看久久av| 日韩欧美一区在线| 亚洲成av人片在线观看| 色呦呦日韩精品| 国产婷婷一区二区| 狠狠色2019综合网| 51午夜精品国产| 亚洲成国产人片在线观看| 色综合婷婷久久| 日韩国产精品久久久| 成人aaaa免费全部观看| 久久久久久久久久看片| 免费视频最近日韩| 欧美视频你懂的| 亚洲免费电影在线| 色婷婷亚洲综合| 亚洲天堂网中文字| 91麻豆蜜桃一区二区三区| 国产精品萝li| 成人app网站| 国产精品成人一区二区艾草| 成人激情文学综合网| 国产婷婷色一区二区三区四区| 美女视频一区在线观看| 51精品秘密在线观看| 日韩精品免费专区| 欧美一级国产精品| 久久丁香综合五月国产三级网站| 91精品国产综合久久香蕉的特点| 香蕉久久夜色精品国产使用方法| 欧美视频一区在线| 亚洲国产一区视频| 欧美精品日韩综合在线| 日本aⅴ免费视频一区二区三区| 欧美精品vⅰdeose4hd| 免费人成精品欧美精品| 欧美一个色资源| 极品少妇xxxx精品少妇| 久久久久综合网| 成人一区二区三区视频在线观看| 欧美韩日一区二区三区四区| 成人在线视频一区二区| 亚洲人被黑人高潮完整版| 欧美午夜电影网| 日本免费在线视频不卡一不卡二| 亚洲精品在线观看视频| 国产一区二区三区久久久| 国产精品久久久99| 色屁屁一区二区| 天天综合色天天综合色h| 日韩精品综合一本久道在线视频| 激情综合网最新| 国产精品国产三级国产普通话三级| 91麻豆福利精品推荐| 爽好久久久欧美精品| 久久综合九色综合欧美98 | 色哟哟国产精品免费观看| 亚洲国产成人av好男人在线观看| 91精品国产综合久久福利| 国产一区二区精品久久99| 国产精品乱人伦一区二区| 欧美午夜理伦三级在线观看| 蜜臀99久久精品久久久久久软件 | 亚洲精品一卡二卡| 欧美福利一区二区| 国产jizzjizz一区二区| 亚洲一区二区五区| 久久精品人人做人人综合 | 中文字幕va一区二区三区| 欧美视频一区在线观看| 国产在线精品免费| 亚洲男女一区二区三区| 欧美大片在线观看| 色狠狠一区二区| 久久www免费人成看片高清| 最近日韩中文字幕| 日韩欧美亚洲一区二区| www.成人在线| 久久精品国产**网站演员| ...xxx性欧美| 欧美精品一区二区三区久久久| 91视频91自| 国产激情视频一区二区三区欧美| 亚洲精品视频在线看| 久久婷婷国产综合国色天香| 91国偷自产一区二区使用方法| 国产一区二区三区av电影| 天天av天天翘天天综合网色鬼国产| 国产色91在线| 欧美一级二级三级乱码| 色94色欧美sute亚洲线路一ni| 国产乱妇无码大片在线观看| 亚洲第一综合色| 日韩美女视频一区| 久久久久亚洲蜜桃| 日韩一区二区在线观看视频播放| 91色porny|