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

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

?? usbtransunitinit.c

?? This the compressed USB driver source code for vxworks5.6. It has device controller driver and other
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* usbTransUnitInit.c - Translation Unit Initialization interfaces *//* Copyright 2003 Wind River Systems, Inc. *//*Modification history--------------------01k,15oct04,ami  Apigen Changes01l,07oct04,hch  Merge from Bangalore developement branch for SPR# 9648401k,16sep04,hch  Fix diab compiler error01j,06oct04,ami  Removal of warning messages related to SPR #94684 Fix01i,14sep04,gpd  memory leak fixes01h,12apr04,cfc  Apigen fixes01g,02dec03,cfc  Merge to support isochronous USB speakers01f,17nov03,sm   correcting refgen errors.01e,06nov03,cfc  Modification to support the USBD_NOTIFY_ALL from class                 drivers01d,01oct03,cfc  Merge from Bangalore fix for dual class drivers01c,21sep03,cfc  Fix compiler warnings01b,17sep03,cfc  Remove direct calls to wvEvent()01a,11sep03,cfc  Fix task creation prioritieso1d,10jul03,mat  Set Configuration Fix01c,16jun03,mat  prefixed "usb" to file name ,global variables etc01b,06jun03,mat  Wind View Instrumentation.01a,06jun03,mat  Wind River Coding Convention  API changes.*//*DESCRIPTIONImplements the Translation Unit Initialization interfaces.In order to use the USBD, it is first necessary to invoke usbdInitialize().Multiple calls to usbdInitialize() may be nested so long as a correspondingnumber of calls to usbdShutdown() are also made.  This allows multiple USBDclients to be written independently and without concern for coordinating theinitialization of the independent clients.Normal USBD clients  register with the USBD by calling usbdClientRegister().In response to this call, the Translation Unit allocates per-client datastructures and a client callback task.Callbacks for each client are invoked from this client-unique task.  Thisimproves the USBD's ability to shield clients from one-another and to helpensure the real-time response for all clients.After a client has registered, it will most often also register for dynamicattachment notification using usbdDynamicAttachRegister().  This functionallows a special client callback routine to be invoked each time a USB deviceis attached or removed from the system.  In this way, clients may discover thereal-time attachment and removal of devices.INCLUDE FILES: usbTransUnit.h*//* includes */#include "drv/usb/usbTransUnit.h" #include "usb2/usbHcdInstr.h"/* defines */#define USBTUINIT_MAX_MESSAGES   100     /* Maximum messages queued in message q *//* globals *//* Wind View Events Filter variable * value of 0 disables event capture */UINT32 usbtuInitWvFilter= 0x00;  /* list of clients registered with USBD */LIST_HEAD     usbtuClientList;   /* list of devices attached to USB */LIST_HEAD     usbtuDevList;      /* thread id of Translation Unit thread */THREAD_HANDLE usbtuThreadId;     /* message queue id of Translation Unit */MSG_Q_ID      usbtuMsgQid;       /* mutex of Translation Unit */MUTEX_HANDLE  usbtuMutex;        /* locals */LOCAL int usbtuInitCount = 0;		/* init nesting count */LOCAL BOOL usbtuInitOssInit = FALSE;	/* TRUE if ossLib is initialized  *//* forward declarations */VOID usbtuInitThreadFn( pVOID param );VOID usbtuInitClientThreadFn(pVOID driverParam);VOID usbtuInitClientIrpCompleteThreadFn(pVOID driverParam);USBHST_STATUS usbtuInitDeviceAdd(UINT32 hDevice, UINT8 interfaceNumber,                              UINT8 uSpeed, void** ppDriverData);VOID usbtuInitDeviceRemove(UINT32 hDevice, PVOID pDriverData);VOID usbtuInitDeviceSuspend(UINT32 hDevice, PVOID ppSuspendData);VOID usbtuInitDeviceResume(UINT32 hDevice, PVOID pSuspendData);/***************************************************************************** usbdInitialize - Initialize the USBD** usbdInitialize() must be called at least once prior to calling other* USBD functions.  usbdInitialize() prepares the USBD and Translation* unit to process URBs.* Calls to usbdInitialize() may be nested, allowing multiple USBD clients* to be written independently.** RETURNS: OK, or ERROR if initialization failed.** ERRNO: N/A*/STATUS usbdInitialize (void)    {            USBTU_LOG ( "usbdInitialize entered \n ");                   /* If not already initialized... */    if (++usbtuInitCount == 1)        {        /* Wind View Instrumentation */        if ((usbtuInitWvFilter & USBTU_WV_FILTER) == TRUE)            {            pCHAR evLog = " USBD Initialization ";            USB_HCD_LOG_EVENT(USBTU_WV_USBD_INIT, evLog, USBTU_WV_FILTER);             }         if (ossInitialize () != OK)            {            USBTU_LOG ("usbdInitialize returns ERROR:ossInitialize failed \n");            return ERROR;            }        	    usbtuInitOssInit = TRUE;               usbdInit();        /* create the Translation Unit Mutex */        if (OSS_MUTEX_CREATE (&usbtuMutex) != OK)            {            USBTU_LOG ( "usbdInitialize returns ERROR : mutex create failed \n ");            return ERROR;            }        /* create the Translation Unit Message Queue */        if (!(usbtuMsgQid = msgQCreate (USBTUINIT_MAX_MESSAGES,                                        sizeof(PVOID), MSG_Q_FIFO )))            {            OSS_MUTEX_DESTROY(usbtuMutex);            USBTU_LOG ( "usbdInitialize returns ERROR: msq q create failed\n ");                          return ERROR;            }          /* create the Translation Unit Thread */        if (OSS_THREAD_CREATE (usbtuInitThreadFn, NULL, OSS_PRIORITY_TYPICAL,                               NULL, &usbtuThreadId) !=OK)            {            OSS_MUTEX_DESTROY(usbtuMutex);            msgQDelete (usbtuMsgQid);            USBTU_LOG ( "usbdInitialize returns ERROR : thread create failed \n ");                           return ERROR;            }         }    USBTU_LOG ( "usbdInitialize  returns OK\n ");        return OK;    }/***************************************************************************** usbdShutdown - Shuts down the USBD** usbdShutdown() should be called once for every successful call to* usbdInitialize().  This function frees memory and other resources used* by the USBD and Translation Unit.** RETURNS: OK, or ERROR if shutdown failed.** ERRNO: N/A*/STATUS usbdShutdown (void)    {        STATUS s = OK;    USBTU_LOG ( "usbdShutdown entered \n ");        if (usbtuInitCount == 0)        {        /* not initialized */         USBTU_LOG ( "usbdShutdown returns OK \n");        return OK;        }    /* We've been initialized at least once. */    if (usbtuInitCount == 1)        {        /* Wind View Instrumentation */        if ((usbtuInitWvFilter & USBTU_WV_FILTER) == TRUE)            {            pCHAR evLog = " USBD Shutdown ";            USB_HCD_LOG_EVENT(USBTU_WV_USBD_INIT, evLog, USBTU_WV_FILTER);            }         if (usbtuInitOssInit)            {            /* Shut down osServices library */            ossShutdown ();            usbtuInitOssInit = FALSE;            }                usbdExit();        /* destroy Translation Unit Mutex */        if ( usbtuMutex )            {            if ( OSS_MUTEX_DESTROY (usbtuMutex) != OK )                {                USBTU_LOG ("usbdShutdown  ERROR:mutex destoy failed\n");                s = ERROR;                }            else                usbtuMutex = NULL;            }        /* destroy Translation Unit thread */                if ( usbtuThreadId )            {            if ( OSS_THREAD_DESTROY (usbtuThreadId) != OK )                {                USBTU_LOG ("usbdShutdown  ERROR:thread dest failed\n");                s = ERROR;                }            else                usbtuThreadId = NULL;            }        /* destroy Translation Unit message queue */        if ( usbtuMsgQid )            {            if ( msgQDelete (usbtuMsgQid) != OK )                {                USBTU_LOG ("usbdShutdown  ERROR:message q dest failed\n");                s = ERROR;                }            else                usbtuMsgQid = NULL;            }        }        --usbtuInitCount;        if ( s == OK)            {            USBTU_LOG ( "usbdShutdown returns OK \n");            }        else            {            USBTU_LOG ( "usbdShutdown returns ERROR \n");            }        return s;    }/***************************************************************************** usbdClientRegister - Registers a new client with the USBD** This routine invokes the USBD function to register a new client.* <pClientName> should point to a string of not more than USBD_NAME_LEN* characters (excluding terminating NULL) which can be used to uniquely* identify the client.	If successful, upon return the <pClientHandle>* will be filled with a newly assigned USBD_CLIENT_HANDLE.** RETURNS: OK, or ERROR if unable to register new client.*** ERRNO: N/A*/STATUS usbdClientRegister    (    pCHAR pClientName,			/* Client name */    pUSBD_CLIENT_HANDLE pClientHandle	/* Client hdl returned by USBD */    )    {    pUSBTU_DEVICE_DRIVER pDriverData;    char pIrpCompleteThreadName[USBD_NAME_LEN];    USBTU_LOG ( "usbdClientRegister entered \n");    /* Zero out the IRP thread name */    memset(pIrpCompleteThreadName,0,USBD_NAME_LEN);    /* Wind View Instrumentation */    if ((usbtuInitWvFilter & USBTU_WV_FILTER) == TRUE)        {        char evLog[USBTU_WV_LOGSIZE];        strncpy ((char*)evLog, pClientName,USBD_NAME_LEN );        strcat(evLog, " : USBD Register ");        USB_HCD_LOG_EVENT(USBTU_WV_CLIENT_INIT, evLog, USBTU_WV_FILTER);        }    if ( !usbtuInitCount)        {        /* usbdInitialize() not called */        USBTU_LOG("usbdClientRegister returns ERROR:usbdInitialize not called\n");        return ERROR;        }    /* allocate structure for client */    if ( !(pDriverData = OSS_CALLOC ( sizeof (USBTU_DEVICE_DRIVER))))        {        USBTU_LOG ( "usbdClientRegister returns ERROR : malloc failed \n");        return ERROR;        }    /* store name */    if (pClientName != NULL)        {        strncpy ((char *)(pDriverData->clientName), pClientName, USBD_NAME_LEN);        sprintf(pIrpCompleteThreadName,"%s_IRP",pClientName);        }    /* create message queue for client */    if (!(pDriverData->msgQid = msgQCreate (USBTUINIT_MAX_MESSAGES,                                            sizeof(PVOID),                                            MSG_Q_FIFO )))        {        OSS_FREE (pDriverData);        USBTU_LOG("usbdClientRegister returns ERROR:message q create failed\n");        return ERROR;        }    /* create thread for client */    if (OSS_THREAD_CREATE (usbtuInitClientThreadFn, pDriverData,                           OSS_PRIORITY_TYPICAL,                           pClientName,                           &(pDriverData->threadHandle)                          )!= OK )        {        msgQDelete(pDriverData->msgQid);        OSS_FREE (pDriverData);        USBTU_LOG("usbdClientRegister returns ERROR:thread create failed \n");        return ERROR ;        }     /* create message queue for IrpComplete */    if (!(pDriverData->msgQidIrpComplete = msgQCreate (USBTUINIT_MAX_MESSAGES,                                            sizeof(PVOID),                                            MSG_Q_FIFO )))        {        	        OSS_FREE (pDriverData);        USBTU_LOG("usbdClientRegister returns ERROR:message q create failed\n");        return ERROR;        }    /* create thread for IrpComplete */    if (OSS_THREAD_CREATE (usbtuInitClientIrpCompleteThreadFn, pDriverData,                           OSS_PRIORITY_TYPICAL,                           pIrpCompleteThreadName,                           &(pDriverData->irpThreadHandle)                          )!= OK )        {        msgQDelete(pDriverData->msgQidIrpComplete);        OSS_FREE (pDriverData);        USBTU_LOG("usbdClientRegister returns ERROR:thread create failed \n");        return ERROR ;        }    /* Link structure to global list */    OSS_MUTEX_TAKE (usbtuMutex, OSS_BLOCK);    usbListLink (&usbtuClientList, pDriverData,                    &(pDriverData->tuDriverLink), LINK_TAIL);    OSS_MUTEX_RELEASE (usbtuMutex);    /* store Return result */    if (pClientHandle != NULL)        *pClientHandle = pDriverData;    USBTU_LOG ( "usbdClientRegister returns OK \n");    return OK;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久在线观看免费| 免费在线观看不卡| 成人免费精品视频| 日韩毛片高清在线播放| 一区二区三区加勒比av| 91一区二区三区在线观看| 亚洲激情自拍偷拍| 欧美一区二区私人影院日本| 蜜臀a∨国产成人精品| 久久久国际精品| 99九九99九九九视频精品| 亚洲综合一二区| 日韩欧美高清dvd碟片| 国产一二三精品| 亚洲丝袜制服诱惑| 欧美一区中文字幕| 国产suv精品一区二区883| 亚洲靠逼com| 日韩精品一区二区在线| 国产成人亚洲精品青草天美| 又紧又大又爽精品一区二区| 日韩一区二区三区在线| 成人一道本在线| 视频一区二区三区在线| 国产日韩影视精品| 欧美年轻男男videosbes| 国产精品一二三在| 亚洲成人午夜电影| 国产亚洲成年网址在线观看| 欧美在线免费视屏| 国产高清精品久久久久| 亚洲动漫第一页| 国产人成一区二区三区影院| 欧美男生操女生| 不卡大黄网站免费看| 蜜桃传媒麻豆第一区在线观看| 国产精品天干天干在线综合| 欧美一区二区成人| 在线一区二区三区| 丁香另类激情小说| 免费观看成人av| 亚洲欧美日韩久久| 亚洲免费毛片网站| 国产欧美日韩三级| 91精品国产综合久久精品app | 五月婷婷激情综合| 国产精品水嫩水嫩| 欧美大黄免费观看| 欧美日韩一区视频| 色综合欧美在线视频区| 成人性生交大合| 极品尤物av久久免费看| 日韩精彩视频在线观看| 一区二区日韩电影| 亚洲天堂2016| 欧美经典一区二区三区| 欧美精品一区二区三区高清aⅴ | 91无套直看片红桃| 国产伦精品一区二区三区免费| 日韩精品成人一区二区三区| 一区av在线播放| 亚洲综合免费观看高清完整版 | 91精品综合久久久久久| 在线影院国内精品| 一本到高清视频免费精品| 成人精品免费看| 国产精品亚洲人在线观看| 久久99精品久久久久| 日本视频中文字幕一区二区三区| 亚洲成人一区二区在线观看| 亚洲一区二区三区四区不卡| 亚洲人123区| 一区二区三区在线看| 一卡二卡欧美日韩| 亚洲一卡二卡三卡四卡五卡| 亚洲国产精品久久人人爱| 樱花草国产18久久久久| 亚洲一区二区三区四区在线| 亚洲观看高清完整版在线观看| 亚洲午夜私人影院| 五月激情综合色| 久久精品国产亚洲高清剧情介绍| 蜜臀av国产精品久久久久| 激情综合色播激情啊| 国产一区二区三区四区五区入口 | 国产久卡久卡久卡久卡视频精品| 国产在线观看免费一区| 国产精品自拍一区| 成人h动漫精品一区二区| 本田岬高潮一区二区三区| 97精品电影院| 欧美日韩在线一区二区| 日韩一区二区三区三四区视频在线观看 | 日本精品一区二区三区高清 | 久久在线观看免费| 国产精品美女视频| 亚洲一区二区偷拍精品| 蜜桃视频在线观看一区| 国产成人精品综合在线观看 | 激情久久久久久久久久久久久久久久| 国产永久精品大片wwwapp| 成人免费的视频| 精品视频一区 二区 三区| 日韩一卡二卡三卡四卡| 中文字幕精品—区二区四季| 亚洲一区二区三区四区五区中文 | 日本一区二区视频在线| 夜夜精品视频一区二区| 日本欧美一区二区在线观看| 国产一区二区三区精品视频| 91视频.com| 日韩午夜三级在线| 1024国产精品| 奇米一区二区三区| jvid福利写真一区二区三区| 91麻豆精品91久久久久同性| 国产精品久久免费看| 天堂va蜜桃一区二区三区| 粉嫩欧美一区二区三区高清影视| 精品视频在线免费观看| 欧美国产在线观看| 日韩av一区二| 色哦色哦哦色天天综合| 久久久噜噜噜久久人人看| 亚洲国产欧美在线| 成人高清在线视频| 精品国产1区二区| 亚洲图片欧美色图| 高清国产一区二区| 欧美一区二区久久久| 亚洲色图视频免费播放| 国产美女精品在线| 欧美日韩1区2区| 亚洲丝袜精品丝袜在线| 国产精品亚洲第一区在线暖暖韩国| 欧美激情一区二区| 日本欧美大码aⅴ在线播放| 99热精品一区二区| 久久九九全国免费| 毛片不卡一区二区| 欧美日韩日日摸| 一区二区三区波多野结衣在线观看| 国产精品66部| 欧美变态口味重另类| 日韩黄色免费电影| 欧美日韩和欧美的一区二区| 一区二区中文视频| 成人午夜看片网址| 久久久91精品国产一区二区精品 | 精油按摩中文字幕久久| 欧美三区在线视频| 亚洲欧美aⅴ...| 欧美日本一道本在线视频| 国产亚洲综合性久久久影院| 午夜精品久久久久久久久久| 色综合久久久久综合体| 日本不卡视频一二三区| 色综合 综合色| 亚洲色图在线视频| 91丨porny丨户外露出| 中文字幕亚洲精品在线观看| 99精品黄色片免费大全| 国产精品你懂的| caoporn国产精品| 日韩理论片中文av| 91免费观看视频在线| ●精品国产综合乱码久久久久| 成人黄色777网| 亚洲视频一二三| 91福利在线导航| 亚洲123区在线观看| 欧美一级免费观看| 极品少妇一区二区| 日本一区免费视频| 欧美亚洲愉拍一区二区| 久久综合九色综合欧美98| 国产精品综合av一区二区国产馆| 久久免费看少妇高潮| 国产99久久久国产精品| 国产精品久久久久精k8| 日本韩国欧美一区| 午夜视频久久久久久| 欧美本精品男人aⅴ天堂| 狠狠色伊人亚洲综合成人| 国产日韩欧美综合一区| 97成人超碰视| 视频一区二区三区在线| 欧美精品一区二区三区高清aⅴ| 成人中文字幕电影| 夜夜亚洲天天久久| 精品久久久久一区| 99久久精品免费观看| 亚洲国产精品久久一线不卡| 日韩精品一区二区三区视频 | 激情偷乱视频一区二区三区| 欧美国产亚洲另类动漫| 欧洲激情一区二区| 精品亚洲成a人在线观看| 亚洲欧洲日韩综合一区二区| 欧美写真视频网站|