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

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

?? usbdcorelib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
		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);

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美一区二区不卡| 亚洲曰韩产成在线| 日韩午夜精品视频| 欧美久久高跟鞋激| 欧美老年两性高潮| 91精品久久久久久久99蜜桃| 精品视频在线免费观看| 欧美日韩一二区| 欧美乱妇一区二区三区不卡视频| 欧美亚洲精品一区| 欧美精品在线观看一区二区| 在线电影欧美成精品| 欧美理论在线播放| 精品美女一区二区| 久久精品在这里| 中文字幕制服丝袜成人av| 国产精品久久久久一区二区三区 | 亚洲日本韩国一区| 亚洲一区二区不卡免费| 午夜久久久久久久久久一区二区| 午夜视频一区二区| 精品一区二区影视| 国产成人免费视频网站| 91玉足脚交白嫩脚丫在线播放| av不卡免费电影| 91成人在线观看喷潮| 欧美嫩在线观看| 欧美videos中文字幕| 欧美激情资源网| 亚洲你懂的在线视频| 日韩精品三区四区| 国产中文一区二区三区| 成人午夜av电影| 在线视频你懂得一区| 欧美日韩国产一二三| 欧美白人最猛性xxxxx69交| 国产亚洲一二三区| 亚洲日本成人在线观看| 日韩在线观看一区二区| 国产美女久久久久| 色综合咪咪久久| 日韩欧美电影一区| 亚洲欧洲三级电影| 亚洲在线成人精品| 久久国产人妖系列| 97久久超碰国产精品| 日韩亚洲欧美高清| 中文字幕在线观看不卡| 天天影视网天天综合色在线播放 | 国产**成人网毛片九色| 在线观看www91| 2023国产精华国产精品| 亚洲乱码国产乱码精品精可以看 | 中文字幕中文字幕中文字幕亚洲无线| 亚洲一区二区精品视频| 国产精品一区二区三区四区| 一本色道久久综合狠狠躁的推荐| 欧美一二三区在线| 亚洲精品免费电影| 国产一区二区h| 欧美日韩在线一区二区| 亚洲国产精品v| 青青草国产精品亚洲专区无| 成人国产精品免费观看| 日韩一区二区精品在线观看| 亚洲人成7777| 国产精品一区专区| 在线综合+亚洲+欧美中文字幕| 国产精品乱人伦中文| 免费在线观看不卡| 日本乱码高清不卡字幕| 国产日韩欧美精品综合| 日韩av在线播放中文字幕| av在线不卡电影| 欧美精品一区二区三区蜜桃视频| 亚洲综合在线五月| av一区二区三区在线| 久久久蜜桃精品| 男人的天堂久久精品| 91福利区一区二区三区| 亚洲欧美在线视频| 国产传媒欧美日韩成人| 337p日本欧洲亚洲大胆色噜噜| 亚洲电影激情视频网站| 日本黄色一区二区| 亚洲欧美综合另类在线卡通| 国产激情一区二区三区四区 | 波多野结衣亚洲一区| 欧美精品一区二区在线观看| 免费成人性网站| 欧美日韩三级视频| 一区二区三区在线高清| 91在线视频播放地址| 欧美国产日韩在线观看| 国产一区二区三区在线观看精品| 日韩欧美国产综合在线一区二区三区 | 日韩欧美亚洲国产另类| 日本午夜一区二区| 欧美一区二区女人| 日韩国产在线观看| 日韩亚洲欧美综合| 激情丁香综合五月| 精品成人a区在线观看| 毛片一区二区三区| 精品99久久久久久| 国产在线视频一区二区| 精品国产免费视频| 国产在线精品一区二区夜色| 欧美成人在线直播| 狠狠色2019综合网| 久久嫩草精品久久久精品一| 国产一区二区成人久久免费影院| 久久久久国产成人精品亚洲午夜| 国产美女av一区二区三区| 久久久久亚洲蜜桃| 不卡一卡二卡三乱码免费网站| 国产精品素人一区二区| 91网站最新网址| 亚洲一区二区三区在线播放| 欧美性猛交一区二区三区精品| 亚洲一区二区三区四区不卡| 制服丝袜中文字幕亚洲| 久久99国产精品麻豆| 久久精品视频免费观看| 成人免费视频caoporn| 亚洲黄色小视频| 欧美日产在线观看| 久久精品久久99精品久久| 2021久久国产精品不只是精品| 成人美女视频在线看| 亚洲人成在线播放网站岛国| 欧美日韩一区在线| 极品少妇一区二区| 国产精品久久久久久久久免费樱桃 | 91久久久免费一区二区| 日韩经典一区二区| 久久久不卡影院| 色综合久久天天| 日韩avvvv在线播放| 久久久不卡影院| 欧美综合在线视频| 精品在线免费视频| 亚洲色图欧美偷拍| 欧美一区二区三区播放老司机| 国产a精品视频| 亚洲高清不卡在线| 国产午夜亚洲精品理论片色戒| 一本久道久久综合中文字幕| 青草av.久久免费一区| 国产精品三级av| 91精品一区二区三区久久久久久| 国产成人av电影免费在线观看| 一区二区三区丝袜| 久久久99精品免费观看不卡| 在线观看日韩国产| 国产精品乡下勾搭老头1| 亚洲一区二区三区激情| 久久精子c满五个校花| 欧美精品乱码久久久久久| 粉嫩久久99精品久久久久久夜| 亚洲一区二区影院| 国产亚洲1区2区3区| 欧美日本韩国一区二区三区视频| 成人午夜在线免费| 免播放器亚洲一区| 玉米视频成人免费看| 精品免费国产一区二区三区四区| 色哟哟欧美精品| 国产精品123区| 美女在线视频一区| 亚洲综合免费观看高清完整版在线| 久久亚洲综合av| 777午夜精品免费视频| 91丨国产丨九色丨pron| 国产麻豆精品在线| 麻豆精品国产传媒mv男同| 亚洲一区在线视频| 国产精品动漫网站| 久久久精品一品道一区| 欧美一区二区在线播放| 在线观看亚洲精品视频| 99国产精品久| 成人性生交大片免费| 国产综合久久久久久久久久久久| 视频精品一区二区| 亚洲最新视频在线播放| 日韩理论在线观看| 国产精品乱人伦| 国产日韩欧美激情| 精品成人一区二区| 精品久久久久久久久久久久久久久 | 91超碰这里只有精品国产| 99麻豆久久久国产精品免费| 国产一区二区毛片| 精品一区二区三区免费观看| 亚洲chinese男男1069| 一区二区国产视频| 一区二区三区在线视频播放| 中文字幕一区二区日韩精品绯色| 国产丝袜欧美中文另类|