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

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

?? usbpcistub.c

?? vxwork arm920 bsp開發(fā)包
?? 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));

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩福利电影在线观看| 亚洲国产岛国毛片在线| 日韩高清一级片| 欧美刺激午夜性久久久久久久| 免费观看30秒视频久久| www国产成人免费观看视频 深夜成人网| 国产一区免费电影| 国产精品久久久久久久岛一牛影视| 91蝌蚪porny九色| 午夜婷婷国产麻豆精品| 欧美不卡一区二区三区| 丁香婷婷综合激情五月色| 亚洲人成影院在线观看| 欧美剧情片在线观看| 国产一区二区免费看| 亚洲欧美日韩国产综合| 中文无字幕一区二区三区| 成人爱爱电影网址| 亚洲国产视频直播| 久久久国产精华| 欧美色精品天天在线观看视频| 日韩av一区二区在线影视| 久久久精品黄色| 在线亚洲欧美专区二区| 韩国成人在线视频| 亚洲综合图片区| 久久你懂得1024| 在线免费观看一区| 国产在线观看免费一区| 亚洲欧美偷拍另类a∨色屁股| 日韩你懂的在线观看| 91年精品国产| 国产麻豆91精品| 亚洲成人综合视频| 国产精品乱人伦中文| 91精品国产全国免费观看| fc2成人免费人成在线观看播放 | 日韩欧美精品在线| 91麻豆文化传媒在线观看| 久久精品av麻豆的观看方式| 国产精品女同互慰在线看| 欧美一区二区三区影视| 91原创在线视频| 国产一区999| 日韩和欧美的一区| 有码一区二区三区| 国产欧美日韩视频一区二区| 这里只有精品视频在线观看| 一本大道久久a久久综合| 国产麻豆精品视频| 久久国产精品99久久人人澡| 亚洲图片欧美一区| 亚洲黄色尤物视频| 亚洲天堂久久久久久久| 中文字幕精品一区二区三区精品| 日韩欧美aaaaaa| 91麻豆精品国产91久久久资源速度 | 精品无码三级在线观看视频 | 国产午夜精品一区二区三区嫩草 | 欧美在线不卡视频| 麻豆精品视频在线| 亚洲精品水蜜桃| 久久精品一区二区三区不卡| 欧美日韩国产123区| 成人av网站免费观看| 奇米亚洲午夜久久精品| 亚洲狠狠爱一区二区三区| 亚洲欧洲精品一区二区三区不卡| 精品国产露脸精彩对白| 5月丁香婷婷综合| 成人动漫一区二区三区| 在线免费观看一区| www.欧美亚洲| 国产福利一区二区三区| 九九**精品视频免费播放| 青青草国产精品亚洲专区无| 亚洲综合清纯丝袜自拍| 国产精品传媒在线| 久久久精品黄色| 久久午夜电影网| 日韩亚洲国产中文字幕欧美| 色先锋资源久久综合| 成人免费视频国产在线观看| 激情综合色播激情啊| 麻豆高清免费国产一区| 欧美日韩黄色一区二区| 97se狠狠狠综合亚洲狠狠| 亚洲bt欧美bt精品| 精品国产乱码久久久久久免费| 久久久高清一区二区三区| 极品美女销魂一区二区三区| 国产精品网站在线观看| 国产精品三级久久久久三级| 欧美日韩在线播放三区四区| 一区二区免费在线| 综合av第一页| 中文在线一区二区 | 久久99精品国产麻豆不卡| 日本sm残虐另类| 经典三级视频一区| 国产一区在线观看麻豆| 麻豆极品一区二区三区| 麻豆国产精品官网| 国产一区二区美女| 岛国精品在线播放| 91美女在线看| 欧美性感一区二区三区| 51精品国自产在线| 99久久精品99国产精品| 欧美肥大bbwbbw高潮| 欧美一区二区播放| 久久免费国产精品| 国产精品无遮挡| 一区二区三区四区av| 三级久久三级久久| 国产一区二区三区蝌蚪| 国产成人精品免费看| 欧美日韩久久一区| www久久精品| 亚洲丝袜另类动漫二区| 亚洲国产精品人人做人人爽| 奇米影视一区二区三区| 国产91高潮流白浆在线麻豆| 91在线看国产| 欧洲视频一区二区| 国产校园另类小说区| 有坂深雪av一区二区精品| 日韩中文字幕区一区有砖一区| 久久er99热精品一区二区| 播五月开心婷婷综合| 在线一区二区三区四区| 欧美成人r级一区二区三区| 国产三级精品视频| 亚洲成a天堂v人片| 国产精品一区在线观看你懂的| 91免费看视频| 欧美成va人片在线观看| 亚洲女同女同女同女同女同69| 青青草原综合久久大伊人精品优势 | 国产91精品在线观看| 一本色道a无线码一区v| 国产欧美精品区一区二区三区 | 成人免费在线播放视频| 五月天网站亚洲| 高清视频一区二区| 91精品一区二区三区久久久久久| 久久久久国色av免费看影院| 强制捆绑调教一区二区| 日本高清不卡一区| 久久色在线视频| 日韩中文字幕麻豆| 一本色道久久综合亚洲91| 久久久久青草大香线综合精品| 久久久久99精品国产片| 日韩1区2区日韩1区2区| 日本韩国欧美在线| 国产精品午夜免费| 国产精品一级在线| 欧美一区二区女人| 亚洲电影第三页| 成人黄色在线网站| 欧美色倩网站大全免费| 久久蜜桃一区二区| 麻豆91在线观看| 欧美一区二区三区四区在线观看| 亚洲精品va在线观看| eeuss鲁片一区二区三区| 26uuu欧美| 男男视频亚洲欧美| 制服视频三区第一页精品| 亚洲午夜久久久久| 色猫猫国产区一区二在线视频| 亚洲国产岛国毛片在线| www.一区二区| 亚洲欧洲日产国产综合网| 成人教育av在线| 久久久91精品国产一区二区三区| 麻豆视频观看网址久久| 欧美精品免费视频| 亚洲一区二区三区小说| 欧美日韩一区不卡| 亚洲成va人在线观看| 欧美日韩精品欧美日韩精品 | 6080国产精品一区二区| 丝袜诱惑制服诱惑色一区在线观看| 成人国产精品免费观看视频| 欧美本精品男人aⅴ天堂| 久久97超碰色| 久久久久国产精品人| 丁香啪啪综合成人亚洲小说 | 五月激情综合婷婷| 欧美精品久久一区二区三区| 视频一区二区国产| 日韩视频在线观看一区二区| 久久超碰97人人做人人爱| 日韩精品一区国产麻豆| 国产精品亚洲午夜一区二区三区 | 精品污污网站免费看| 一区二区三区蜜桃网| 色999日韩国产欧美一区二区|