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

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

?? usbpcistub.c

?? IXP425的BSP代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* usbPciStub.c - System-specific PCI Functions *//* Copyright 2000 Wind River Systems, Inc. *//*Modification history--------------------01a,22nov00,wef  First, created from 01h of the mcp750 bsp stub*//*DESCRIPTIONThis file defines a skeleton of functions to be used for accessing the 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 */#error "usbPciStub.c: Customize the USB PCI macros before first use"/* * TODO: Read and update this stub file to customize it for this * BSP.  Delete the #error statement above afterwards. Look for * TODO references in this file. *//* * TODO: Adjust the 3 macros below as needed. * * USB_PCI_IO_OFFSET is the offset between a physical PCI IO address * and the virtual address used to access it.  In this example code, * PCI IO addresses map one-to-one with virtual IO addresses used * by the sysInByte() and sysOutByte() routines.  In a memory * mapped system it would be very unlikely for this value to be zero. * * USB_PCI_MEMIO_OFFSET is the offset between Memory IO (non prefetch) * PCI physical addresses and the local virtual address that corresponds * to it. * * USB_PCI_MEM_OFFSET is the offset between Memory (prefetchable) PCI * physical addresses and the local virtual address that corresponds * to it. */#define USB_PCI_IO_OFFSET	0x0#define USB_PCI_MEMIO_OFFSET	0x0#define USB_PCI_MEM_OFFSET	0x0/* * TODO: Define the following macros to describe how to connect * and disconnect interrupts on your hardware.  This should * normally be mapped to the pciIntLib functions. *//* Interrupt enable/disable mappings */#define USB_INT_CONNECT(intNo, func, param) \    pciIntConnect (INUM_TO_IVEC(intNo), (VOIDFUNCPTR) func, (int) param)#define USB_INT_DISCONNECT(intNo, func, param) \    pciIntDisconnect2 (INUM_TO_IVEC(intNo), (VOIDFUNCPTR) func, (int) param)#define USB_INT_ENABLE(i)	intEnable (i)#define USB_INT_DISABLE(i)	intDisable (i)/* * TODO: Define the following macros to read/write data * to/from PCI I/O space as needed.  This may be I/O * mapped accesses or memory accesses.  This example * code assumes I/O mapped accesses using sysInByte * functions provided by the BSP sysLib module. *//* Map I/O functions to underlying system functions. */#define	USB_PCI_IN_BYTE(a)	sysInByte ((a) + USB_PCI_IO_OFFSET)#define	USB_PCI_IN_WORD(a)	sysInWord ((a) + USB_PCI_IO_OFFSET)#define	USB_PCI_IN_DWORD(a)	sysInLong ((a) + USB_PCI_IO_OFFSET)#define	USB_PCI_OUT_BYTE(a,v)	sysOutByte ((a) + USB_PCI_IO_OFFSET, (v))#define	USB_PCI_OUT_WORD(a,v)	sysOutWord ((a) + USB_PCI_IO_OFFSET, (v))#define	USB_PCI_OUT_DWORD(a,v)	sysOutLong ((a) + USB_PCI_IO_OFFSET, (v))/* code tracks usage count for interrupts 0..USB_MAX_INT_NO-1. */#define USB_MAX_INT_NO		16/* TODO: Leave the code below this point alone. *//* locals */LOCAL UINT16 intUsage [USB_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:* 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);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月综合激情婷婷六月色窝| 国产精品亚洲午夜一区二区三区| 日韩av一区二区在线影视| 毛片av一区二区| 99精品欧美一区| 日韩精品一区二区三区四区| 一区二区三区中文字幕电影| 国产在线看一区| 欧美群妇大交群中文字幕| 国产精品天干天干在线综合| 免费国产亚洲视频| 欧美日韩一区中文字幕| 亚洲手机成人高清视频| 国产在线播精品第三| 666欧美在线视频| 亚洲精品日韩一| 91影视在线播放| 国产精品久久久久久久久搜平片| 日韩在线观看一区二区| 欧美性猛交xxxx乱大交退制版 | 亚洲超碰97人人做人人爱| 成人黄色小视频在线观看| 久久久亚洲综合| 精品在线一区二区| 欧美一级片在线看| 日韩国产欧美在线播放| 在线播放中文字幕一区| 午夜激情综合网| 欧美日韩免费观看一区二区三区| 亚洲色图在线看| 色域天天综合网| 一区二区三区在线免费观看| 色呦呦网站一区| 一区二区免费视频| 欧美日韩在线播放三区四区| 亚洲小少妇裸体bbw| 欧美视频一区二区三区| 五月天精品一区二区三区| 欧美久久久久久蜜桃| 日韩精品欧美精品| 日韩欧美专区在线| 国产一区二区三区在线观看免费视频 | 色综合欧美在线视频区| 亚洲精品一二三| 欧美亚洲另类激情小说| 香蕉成人伊视频在线观看| 欧美久久久久久久久| 成人免费福利片| 中文字幕精品一区二区精品绿巨人| 国产不卡高清在线观看视频| 1000部国产精品成人观看| 日本韩国欧美一区| 日日夜夜免费精品| 欧美精品一区二区蜜臀亚洲| 丁香另类激情小说| 亚洲综合精品自拍| 日韩欧美一二三| 国产精品自拍一区| 亚洲三级电影网站| 91精品婷婷国产综合久久| 精东粉嫩av免费一区二区三区| 国产性天天综合网| 在线免费亚洲电影| 国产一区二区免费看| 最新高清无码专区| 日韩欧美国产综合在线一区二区三区| 国产一区二区三区免费| 亚洲欧美日韩中文播放| 91精品国产色综合久久ai换脸 | 天天影视涩香欲综合网| 欧美成人福利视频| 99精品久久99久久久久| 日产欧产美韩系列久久99| 国产精品日日摸夜夜摸av| 欧美日韩国产高清一区二区| 国产91高潮流白浆在线麻豆 | 蜜桃久久av一区| 亚洲日本va午夜在线影院| 91精品国产一区二区三区蜜臀| 粉嫩aⅴ一区二区三区四区| 亚洲成av人片一区二区梦乃| 亚洲国产成人午夜在线一区| 国产午夜精品一区二区三区嫩草| 欧美三级视频在线| 成人午夜电影久久影院| 免费成人在线观看视频| 亚洲六月丁香色婷婷综合久久| 日韩欧美色综合网站| 91美女视频网站| 国产sm精品调教视频网站| 日韩电影在线观看一区| 中文字幕在线观看一区二区| 精品毛片乱码1区2区3区| 日本韩国欧美在线| 99久久免费视频.com| 国产乱人伦精品一区二区在线观看| 午夜精品成人在线视频| 1区2区3区欧美| 国产欧美日韩激情| 久久精品网站免费观看| 日韩免费福利电影在线观看| 欧美亚洲国产怡红院影院| 99这里只有久久精品视频| 久久国产精品第一页| 日本中文在线一区| 亚洲bt欧美bt精品| 午夜久久久久久久久久一区二区| 综合色中文字幕| 国产精品久久久久久久裸模| 国产三级精品视频| 久久久久9999亚洲精品| 日韩一卡二卡三卡| 欧美一区二区三区视频免费播放| 一本大道久久a久久精品综合| 99视频有精品| 色婷婷综合久色| 在线一区二区三区四区五区| 色综合天天综合| 色先锋aa成人| 欧美视频一区二区三区四区| 欧美日韩国产一区| 911精品国产一区二区在线| 欧美理论在线播放| 亚洲人精品一区| 亚洲女同女同女同女同女同69| 1000部国产精品成人观看| 亚洲日本一区二区三区| 一区二区三区四区乱视频| 丝袜亚洲精品中文字幕一区| 日本视频一区二区三区| 久久狠狠亚洲综合| 高清视频一区二区| 色噜噜久久综合| 91精品国模一区二区三区| 欧美成人综合网站| 日本一区二区三级电影在线观看| 中文字幕一区二区三中文字幕 | 久久男人中文字幕资源站| 久久久美女毛片| 亚洲免费av高清| 日日夜夜精品视频天天综合网| 麻豆精品国产91久久久久久| 国产成人午夜精品影院观看视频| av在线不卡电影| 欧美挠脚心视频网站| 久久精品一区二区三区四区| 亚洲欧洲成人精品av97| 三级欧美韩日大片在线看| 国产精品亚洲第一| 在线亚洲高清视频| 精品99999| 亚洲在线视频一区| 国产一区二区三区在线看麻豆| 91在线视频官网| 欧美成人官网二区| 一区二区在线观看视频在线观看| 免费成人av资源网| 99久久免费精品| 日韩一区二区三区高清免费看看| 亚洲欧洲无码一区二区三区| 无吗不卡中文字幕| 99久久久无码国产精品| 精品国产一区二区亚洲人成毛片| 亚洲另类在线视频| 国产一区二区三区黄视频| 欧美色男人天堂| 亚洲欧洲日韩在线| 久久99蜜桃精品| 欧美性一级生活| 中文字幕亚洲在| 国产精品1区2区| 日韩久久免费av| 午夜在线电影亚洲一区| 99精品国产热久久91蜜凸| 国产三级精品视频| 黄色资源网久久资源365| 欧美日韩国产美| 洋洋av久久久久久久一区| 成人网页在线观看| 久久精品免视看| 寂寞少妇一区二区三区| 日韩三级视频在线观看| 视频一区视频二区中文| 欧美亚洲愉拍一区二区| 亚洲老妇xxxxxx| 粉嫩蜜臀av国产精品网站| 久久综合狠狠综合| 久久精品99久久久| 日韩欧美一二三| 日韩av成人高清| 欧美一卡二卡在线观看| 五月婷婷久久综合| 欧美二区在线观看| 播五月开心婷婷综合| 亚洲激情自拍偷拍| 久久先锋影音av| 韩国av一区二区三区在线观看| 日韩精品一区二区三区蜜臀| 亚洲成av人片| 欧美一区二区三区播放老司机|