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

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

?? usbdcorelib.c

?? vxworks嵌入式實時系統的 usb底層驅動代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
		if (pClient->mngmtCallback != NULL)		    (*pClient->mngmtCallback) (pClient->mngmtCallbackParam,			(USBD_NODE_ID) msg.lParam, msg.wParam);		break;	    }	}    while (msg.msg != CALLBACK_FNC_TERMINATE);    /* Mark the callback routine as having terminated. */    OSS_SEM_GIVE (pClient->callbackExit);    }/***************************************************************************** doTransferAbort - Cancel an outstanding IRP** Directs the HCD to cancel the IRP and waits for the IRP callback to* be invoked signalling that the IRP has been unlinked successfully.** RETURNS: S_usbdLib_xxxx*/LOCAL int doTransferAbort    (    pUSBD_PIPE pPipe,		    /* Pipe owning transfer */    pUSB_IRP pIrp		    /* IRP to be cancelled */    )    {    /* The callback which indicates that an IRP has been deleted is     * asynchronous.  However, when deleting an IRP (such as when     * destroying a pipe) we generally need to know when the IRP     * callback has actually been invoked - and hence the IRP unlinked     * from the list of outstanding IRPs on the pipe.     */    pPipe->irpBeingDeleted = pIrp;    pPipe->irpDeleted = FALSE;    /* Instruct the HCD to cancel the IRP */    if (usbHcdIrpCancel (&pPipe->pNode->pBus->pHcd->nexus, pIrp) != OK)	return S_usbdLib_CANNOT_CANCEL;    /* Wait for the IRP callback to be invoked. */    while (!pPipe->irpDeleted)	OSS_THREAD_SLEEP (1);    return OK;    }/***************************************************************************** destroyNotify - de-allocates a USBD_NOTIFY_REQ** RETURNS: N/A*/LOCAL VOID destroyNotify    (    pUSBD_NOTIFY_REQ pNotify    )    {    usbListUnlink (&pNotify->reqLink);    OSS_FREE (pNotify);    }/***************************************************************************** destroyPipe - de-allocates a USBD_PIPE and its resources** RETURNS: N/A*/LOCAL VOID destroyPipe    (    pUSBD_PIPE pPipe    )    {    pUSB_IRP pIrp;    pUSBD_BUS pBus;    if (pPipe != NULL)	{	pPipe->pipeDeletePending = TRUE;	/* Cancel all IRPs outstanding on this pipe.	 *	 * NOTE: Since the IRP completion callbacks are on a different thread,	 * we need to wait until all callbacks have been completed.  This	 * functionality is built into doTransferAbort().	 */	while ((pIrp = usbListFirst (&pPipe->irps)) != NULL)	    doTransferAbort (pPipe, pIrp);	/* Release bandwidth and notify HCD that the pipe is going away. */	pBus = pPipe->pNode->pBus;	pBus->nanoseconds -= pPipe->nanoseconds;	usbHcdPipeDestroy (&pBus->pHcd->nexus, pPipe->hcdHandle);	/* Unlink pipe from owning client's list of pipes */	if (pPipe->pClient != NULL)	    usbListUnlink (&pPipe->clientPipeLink);	/* Unlink pipe from owning node's list of pipes */	if (pPipe->pNode != NULL)	    usbListUnlink (&pPipe->nodePipeLink);	/* Release pipe handle */	if (pPipe->handle != NULL)	    usbHandleDestroy (pPipe->handle);	OSS_FREE (pPipe);	}    }/***************************************************************************** destroyClient - tears down a USBD_CLIENT structure** RETURNS: N/A*/LOCAL VOID destroyClient    (    pUSBD_CLIENT pClient    )    {    pUSBD_NOTIFY_REQ pNotify;    pUSBD_PIPE pPipe;    pUSBD_HCD pHcd;    UINT16 busNo;        /* unlink client from list of clients.     *     * NOTE: usbListUnlink is smart and only unlinks the structure if it is     * actually linked.     */    usbListUnlink (&pClient->clientLink);    /* destroy all notification requests outstanding for the client */    while ((pNotify = usbListFirst (&pClient->notifyReqs)) != NULL)	destroyNotify (pNotify);    /* destroy all pipes owned by this client */    while ((pPipe = usbListFirst (&pClient->pipes)) != NULL)	destroyPipe (pPipe);    /* If this client is the current SOF master for any USBs, then release     * the SOF master status.     */    pHcd = usbListFirst (&hcdList);    while (pHcd != NULL)	{	for (busNo = 0; busNo < pHcd->busCount; busNo++)	    if (pHcd->pBuses [busNo].pSofMasterClient == pClient)		pHcd->pBuses [busNo].pSofMasterClient = NULL;	pHcd = usbListNext (&pHcd->hcdLink);	}    /* Note: callbackQueue is always created after callbackExit and     * before callbackThread     */    if (pClient->callbackThread != NULL)	{	/* Terminate the client callback thread */	usbQueuePut (pClient->callbackQueue, CALLBACK_FNC_TERMINATE,	    0, 0, CALLBACK_TIMEOUT);	OSS_SEM_TAKE (pClient->callbackExit, CALLBACK_TIMEOUT);	OSS_THREAD_DESTROY (pClient->callbackThread);	}    if (pClient->callbackQueue != NULL)	usbQueueDestroy (pClient->callbackQueue);    if (pClient->callbackExit != NULL)	OSS_SEM_DESTROY (pClient->callbackExit);    if (pClient->handle != NULL)	usbHandleDestroy (pClient->handle);    OSS_FREE (pClient);    }/***************************************************************************** fncClientReg - Register a new USBD client** RETURNS: S_usbdLib_xxxx*/LOCAL int fncClientReg    (    pURB_CLIENT_REG pUrb    )    {    pUSBD_CLIENT pClient;    int s;    /* validate URB */    if ((s = validateUrb (pUrb, sizeof (*pUrb), NULL)) != OK)	return s;    /* Create structures/resources/etc., required by new client */    if ((pClient = OSS_CALLOC (sizeof (*pClient))) == NULL)	return S_usbdLib_OUT_OF_MEMORY;    memcpy (pClient->clientName, pUrb->clientName, USBD_NAME_LEN);    if (usbHandleCreate (USBD_CLIENT_SIG, pClient, &pClient->handle) != OK ||	OSS_SEM_CREATE (1, 0, &pClient->callbackExit) != OK ||	usbQueueCreate (CALLBACK_Q_DEPTH, &pClient->callbackQueue) != OK ||	OSS_THREAD_CREATE (clientThread, pClient, OSS_PRIORITY_INHERIT, 	    "tUsbdClnt", &pClient->callbackThread) != OK)	    s = S_usbdLib_OUT_OF_RESOURCES;    else	{	/* The client was initialized successfully. Add it to the list */	usbListLink (&clientList, pClient, &pClient->clientLink, LINK_TAIL);	/* return the client's USBD_CLIENT_HANDLE */	pUrb->header.handle = pClient->handle;	}	    if (s != OK)	{	destroyClient (pClient);	}    return s;    }/***************************************************************************** fncClientUnreg - Unregister a USBD client** RETURNS: S_usbdLib_xxxx*/LOCAL int fncClientUnreg    (    pURB_CLIENT_UNREG pUrb    )    {    pUSBD_CLIENT pClient;    int s;    /* validate Urb */    if ((s = validateUrb (pUrb, sizeof (*pUrb), &pClient)) != OK)	return s;    /* destroy client */    destroyClient (pClient);    return s;    }/***************************************************************************** fncMngmtCallbackSet - sets management callback for a client** RETURNS: S_usbdLib_xxxx*/LOCAL int fncMngmtCallbackSet    (    pURB_MNGMT_CALLBACK_SET pUrb    )    {    pUSBD_CLIENT pClient;    int s;    /* validate URB */    if ((s = validateUrb (pUrb, sizeof (*pUrb), &pClient)) != OK)	return s;    /* Set the management callback */    pClient->mngmtCallback = pUrb->mngmtCallback;    pClient->mngmtCallbackParam = pUrb->mngmtCallbackParam;    return s;    }/***************************************************************************** fncVersionGet - Return USBD version** RETURNS: S_usbdLib_xxxx*/LOCAL int fncVersionGet    (    pURB_VERSION_GET pUrb    )    {    int s;    /* validate urb */    if ((s = validateUrb (pUrb, sizeof (*pUrb), NULL)) != OK)	return s;    /* return version information */    pUrb->version = USBD_VERSION;    strncpy ((char *)pUrb->mfg, USBD_MFG, USBD_NAME_LEN);    return s;    }/***************************************************************************** releaseAddress - release a USB device address** RETURNS: N/A*/LOCAL VOID releaseAddress    (    pUSBD_NODE pNode    )    {    pUSBD_BUS pBus = pNode->pBus;    pBus->adrsVec [pNode->busAddress / 8] &= ~(0x1 << (pNode->busAddress % 8));    }/***************************************************************************** assignAddress - assigns a unique USB address to a node** RETURNS: TRUE if successful, else FALSE*/LOCAL BOOL assignAddress    (    pUSBD_NODE pNode    )    {    pUSBD_BUS pBus = pNode->pBus;    UINT16 i;    /* Find an available address */    for (i = 1; i < USB_MAX_DEVICES; i++)	{	if ((pBus->adrsVec [i / 8] & (0x1 << (i % 8))) == 0)	    {	    /* i is the value of an unused address.  Set the device adrs. */	    if (usbdAddressSet (internalClient, pNode->nodeHandle, i) == OK)		{		pNode->busAddress = i;		pBus->adrsVec [i / 8] |= 0x1 << (i % 8);		return TRUE;		}	    else		{		return FALSE;		}	    }	}    return FALSE;    }/***************************************************************************** notifyIfMatch - Invoke attach callback if appropriate.** Compares the device class/subclass/protocol for <pClassType> and <pNotify>.* If the two match, then invokes the callback in <pNotify> with an attach* code of <attachCode>.** RETURNS: N/A*/LOCAL VOID notifyIfMatch    (    pUSBD_NODE pNode,    pUSBD_NODE_CLASS pClassType,    pUSBD_CLIENT pClient,    pUSBD_NOTIFY_REQ pNotify,    UINT16 attachCode    )    {    pNOTIFICATION pNotification;    /* Do the pClassType and pNotify structures contain matching class     * descriptions?     */    if (pNotify->deviceClass == USBD_NOTIFY_ALL ||	pClassType->deviceClass == pNotify->deviceClass)	{	if (pNotify->deviceSubClass == USBD_NOTIFY_ALL ||	    pClassType->deviceSubClass == pNotify->deviceSubClass)	    {	    if (pNotify->deviceProtocol == USBD_NOTIFY_ALL ||		pClassType->deviceProtocol == pNotify->deviceProtocol)		{		/* We have a match.  Schedule the client attach callback. 		 *		 * NOTE: The pNotification structure is created here and		 * released when consumed in the client callback thread.		 *		 * NOTE: In a very large USB topology (at least several		 * dozen nodes) there is a chance that we could overrun		 * a client's callback queue depending on the type of 		 * notification requests the client has made.  If this happens,		 * the following call to usbQueuePut() may block.  If *that*		 * happens, there is a chance of a deadlock if the client's		 * callback code - invoked from the clientThread() reenters		 * the USBD.  A simple solution, if that situation is observed,		 * is to increase the depth of the callback queue.		 */		if ((pNotification = OSS_CALLOC (sizeof (*pNotification))) 		    != NULL)		    {		    pNotification->callback = pNotify->callback;		    pNotification->nodeId = pNode->nodeHandle;		    pNotification->attachCode = attachCode;		    pNotification->configuration = pClassType->configuration;		    pNotification->interface = pClassType->interface;		    pNotification->deviceClass = pClassType->deviceClass;		    pNotification->deviceSubClass = pClassType->deviceSubClass;		    pNotification->deviceProtocol = pClassType->deviceProtocol;		    usbQueuePut (pClient->callbackQueue, 			CALLBACK_FNC_NOTIFY_ATTACH, 0, (UINT32) pNotification, 			OSS_BLOCK);		    }		}	    }	}    }/***************************************************************************** notifyClients - notify clients of a dynamic attach/removal** Scans the clientList looking for clients who have requested dynamic* attach/removal notification for a class matching <pNode>.  If any* are found, their dynamic attach callback routines will be invoked* with an attach code of <attachCode>.** RETURNS: N/A*/LOCAL VOID notifyClients    (    pUSBD_NODE pNode,    UINT16 attachCode    )    {    pUSBD_CLIENT pClient;    pUSBD_NOTIFY_REQ pNotify;    pUSBD_NODE_CLASS pClassType;    /* Scan for clients which have requested dynamic attach notification. */    pClient = usbListFirst (&clientList);    while (pClient != NULL)	{	/* Walk through the list of notification requests for this client */	pNotify = usbListFirst (&pClient->notifyReqs);	while (pNotify != NULL)	    {	    /* Walk through the class types for this node, looking for one	     * which matches the current client notification request.	     */	    pClassType = usbListFirst (&pNode->classTypes);	    while (pClassType != NULL)		{		notifyIfMatch (pNode, pClassType, pClient, pNotify, attachCode);		pClassType = usbListNext (&pClassType->classLink);		}	    pNotify = usbListNext (&pNotify->reqLink);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
北条麻妃一区二区三区| 91丨porny丨最新| 粉嫩绯色av一区二区在线观看| 蜜桃在线一区二区三区| 精品在线一区二区三区| 国产美女在线观看一区| 一道本成人在线| 欧美人妖巨大在线| 精品久久久久久久久久久久久久久| 精品国产一区二区三区av性色 | 中文字幕日韩一区二区| 亚洲自拍另类综合| 国产精品一区二区黑丝| 欧美综合亚洲图片综合区| 欧美一级视频精品观看| 亚洲免费观看视频| 国产99久久久国产精品| 日韩亚洲欧美综合| 亚洲国产成人av| 91麻豆蜜桃一区二区三区| 久久夜色精品一区| 日本大胆欧美人术艺术动态 | 国产精品久久久久久久久免费桃花 | 欧美色男人天堂| 国产精品麻豆网站| 国产麻豆成人传媒免费观看| 7777精品伊人久久久大香线蕉| 国产精品成人在线观看| 狠狠v欧美v日韩v亚洲ⅴ| 91精品国产综合久久久久久久久久 | 高清国产一区二区| 日韩免费一区二区三区在线播放| 亚洲蜜臀av乱码久久精品蜜桃| 国产成a人亚洲| 国产女人18毛片水真多成人如厕| 黑人精品欧美一区二区蜜桃 | 一级日本不卡的影视| 色88888久久久久久影院野外 | 99九九99九九九视频精品| 国产精品久久久久精k8| 成人黄色片在线观看| 中文字幕一区二区三区在线播放| 欧美性受极品xxxx喷水| 国产精品剧情在线亚洲| 99vv1com这只有精品| 亚洲一区二区av在线| 欧美一区二区二区| 国产精品99久久久久久久女警| 国产午夜精品一区二区三区嫩草 | 日本一区二区综合亚洲| 99久精品国产| 国产成人av电影免费在线观看| 中文字幕在线不卡国产视频| 3d成人h动漫网站入口| 久久精品国产亚洲5555| 国产精品麻豆久久久| 欧美色偷偷大香| 777久久久精品| 国产精品99久久久| 日一区二区三区| 国产欧美综合在线| 日韩欧美电影一区| 91原创在线视频| 国产精品一二三| 日产国产高清一区二区三区 | 在线观看欧美日本| 国产成人在线免费| 精品一区中文字幕| 丝瓜av网站精品一区二区 | bt欧美亚洲午夜电影天堂| 九九九精品视频| 丝袜美腿一区二区三区| 亚洲一区二区三区视频在线播放| 欧美国产欧美亚州国产日韩mv天天看完整| 欧美日韩国产三级| 欧美亚洲尤物久久| 欧美日韩国产综合一区二区| 日本道在线观看一区二区| 972aa.com艺术欧美| 99精品国产热久久91蜜凸| 福利一区福利二区| 国产99精品视频| 欧美一区二区三区在线看| 欧美一区二区三区免费视频| 91精品国产免费| 精品国产一区二区精华 | 国产精品一色哟哟哟| 国产a视频精品免费观看| 成人av在线电影| 日本精品视频一区二区三区| 欧美这里有精品| 日韩视频国产视频| 国产精品欧美一级免费| 亚洲国产视频网站| 精品在线你懂的| 色婷婷久久久久swag精品| 欧美日韩黄色一区二区| 久久久久久久久久看片| 日韩一区中文字幕| 精品一区二区免费视频| 丰满少妇久久久久久久| 一本色道久久综合狠狠躁的推荐 | 日韩高清欧美激情| 99久久久久久| 精品国产一区二区三区久久影院 | 欧美电影免费观看高清完整版| 中文字幕日韩一区| 国产一区二区在线观看视频| 色综合咪咪久久| 精品国产3级a| 蜜桃在线一区二区三区| 91老师片黄在线观看| 欧美激情一区三区| 久久66热re国产| 欧美日韩成人一区二区| 亚洲人成人一区二区在线观看| 精品无码三级在线观看视频| 欧美午夜电影网| 亚洲国产毛片aaaaa无费看 | 亚洲777理论| 在线成人av影院| 秋霞电影一区二区| 日韩三级免费观看| 免费在线看成人av| 欧美一卡2卡三卡4卡5免费| 国产sm精品调教视频网站| 中文一区在线播放| 成人av资源网站| 亚洲综合偷拍欧美一区色| 在线精品视频免费观看| 亚洲午夜日本在线观看| 欧美久久久久久久久| 日本va欧美va精品发布| 精品久久久久久久久久久院品网| 美女国产一区二区| 久久久久久电影| 中文字幕一区免费在线观看| 91丝袜呻吟高潮美腿白嫩在线观看| 中文字幕在线不卡一区二区三区| 欧美欧美欧美欧美| 久久精品噜噜噜成人av农村| 久久综合久久综合九色| 99久久精品国产麻豆演员表| 亚洲国产一区二区三区青草影视| 精品福利一二区| 欧美在线免费视屏| 国产精品一级在线| 欧美三级资源在线| 狠狠色狠狠色综合| 一区二区三区欧美亚洲| 久久美女艺术照精彩视频福利播放 | 欧美xxx久久| 日本高清不卡视频| 成人小视频在线| 国产中文字幕精品| 婷婷成人综合网| 亚洲一区二区视频在线观看| 国产欧美一区二区三区在线看蜜臀| 日本乱人伦aⅴ精品| 亚洲一卡二卡三卡四卡| 日韩美女视频一区二区| 久久久久久黄色| 久久众筹精品私拍模特| 91精品国产综合久久精品| 国产黄色成人av| 国内国产精品久久| 国产精品自在在线| 国产激情偷乱视频一区二区三区| 日韩黄色一级片| 图片区小说区区亚洲影院| 亚洲一区中文日韩| 午夜精品福利一区二区蜜股av| 亚洲精品高清在线| 亚洲电影视频在线| 丝袜国产日韩另类美女| 欧美a级一区二区| 日韩免费一区二区三区在线播放| 日韩免费在线观看| 国产精品国产三级国产三级人妇 | 一区二区三区国产豹纹内裤在线| 国产精品妹子av| 亚洲国产精品一区二区久久恐怖片 | 婷婷综合另类小说色区| 美洲天堂一区二卡三卡四卡视频| 日本视频一区二区| 国产v综合v亚洲欧| 欧美日韩一区二区三区四区五区 | 精一区二区三区| 91视频在线观看免费| 日韩欧美电影在线| 亚洲女性喷水在线观看一区| 亚洲国产精品一区二区尤物区| 蜜臀久久99精品久久久画质超高清| 国产精品456| 欧美浪妇xxxx高跟鞋交| 国产欧美日韩久久| 日韩电影一区二区三区四区| 91免费小视频| 久久99国产精品免费| 欧洲国内综合视频|