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

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

?? usbdcorelib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
	    }	pClient = usbListNext (&pClient->clientLink);	}    }/***************************************************************************** createNodeClass - Creates a USBD_NODE_CLASS structure** Creates a USBD_NODE_CLASS structure, initializes it with the passed* parameters, and attaches it to the <pNode>.** RETURNS: TRUE if successful, else FALSE if out of memory.*/LOCAL BOOL createNodeClass    (    pUSBD_NODE pNode,    UINT16 configuration,    UINT16 interface,    UINT16 deviceClass,    UINT16 deviceSubClass,    UINT16 deviceProtocol    )    {    pUSBD_NODE_CLASS pClassType;    if ((pClassType = OSS_CALLOC (sizeof (*pClassType))) == NULL)	return FALSE;    pClassType->configuration = configuration;    pClassType->interface = interface;    pClassType->deviceClass = deviceClass;    pClassType->deviceSubClass = deviceSubClass;    pClassType->deviceProtocol = deviceProtocol;    usbListLink (&pNode->classTypes, pClassType, &pClassType->classLink,	LINK_TAIL);    return TRUE;    }/***************************************************************************** interrogateDeviceClass - Retrieve's device class information** Interrogate the device class and construct one or more USBD_NODE_CLASS * structures and attach them to <pNode>.  <deviceClass>, <deviceSubClass>,* and <deviceProtocol> are the device-level fields for this device.  If* <deviceClass> is 0, then this routine will automatically interrogate* the interface-level class information. If the information is provided* at the device level then the interfaces are not probed. ** RETURNS: TRUE if successful, else FALSE if error.*/LOCAL BOOL interrogateDeviceClass    (    pUSBD_NODE pNode,    UINT16 deviceClass,    UINT16 deviceSubClass,    UINT16 deviceProtocol    )    {    pUSB_CONFIG_DESCR pCfgDescr;    pUSB_INTERFACE_DESCR pIfDescr;    pUINT8 pCfgBfr;    pUINT8 pRemBfr;    UINT16 cfgLen;    UINT16 remLen;    UINT16 numConfig;    UINT8 configIndex;    BOOL retcode = TRUE;    UINT8 configValue = 1;        /* If class information has been specified at the device level, then     * record it and return.     */    if ((deviceClass != 0) && (deviceSubClass != 0) && (deviceProtocol != 0))	return createNodeClass (pNode, 0, 0, deviceClass, deviceSubClass,	    deviceProtocol);     /* Read the device descriptor to determine the number of configurations. */    if (usbConfigCountGet (internalClient, pNode->nodeHandle, &numConfig) != OK)	return FALSE;      /* Read and process each configuration. */    for (configIndex = 0; configIndex < numConfig && retcode; configIndex++)	{	/* Read the next configuration descriptor. */		if (usbConfigDescrGet (internalClient, pNode->nodeHandle, configIndex,	    &cfgLen, &pCfgBfr) != OK)	    {	    retcode = FALSE;	    }	else	    {	    if ((pCfgDescr = usbDescrParse (pCfgBfr, cfgLen, 		USB_DESCR_CONFIGURATION)) != NULL)		{		/* Scan each interface descriptor. 		 *		 * NOTE: If we can't find an interface descriptor, we just keep		 * going. 		 */		pRemBfr = pCfgBfr;		remLen = cfgLen;		configValue = pCfgDescr->configurationValue;		while ((pIfDescr = usbDescrParseSkip (&pRemBfr, &remLen, 		    USB_DESCR_INTERFACE)) != NULL && retcode)		    {		    if (!createNodeClass (pNode, configValue,			pIfDescr->interfaceNumber, pIfDescr->interfaceClass, 			pIfDescr->interfaceSubClass, pIfDescr->interfaceProtocol))			{			retcode = FALSE;			}		    }		}	    /* Release bfr allocated by usbConfigDescrGet(). */    	    OSS_FREE (pCfgBfr);	    }	}    return retcode;    }/***************************************************************************** destroyNode - deletes node structure** RETURNS: N/A*/LOCAL VOID destroyNode    (    pUSBD_NODE pNode    )    {    pUSBD_NODE_CLASS pClassType;    pUSBD_PIPE pPipe;    /* Mark node as "going down" */    pNode->nodeDeletePending = TRUE;    /* Cancel any other pipes associated with this node...This has the     * effect of cancelling any IRPs outstanding on this node. */    while ((pPipe = usbListFirst (&pNode->pipes)) != NULL)	destroyPipe (pPipe);    /* Notify an interested clients that this node is going away. */    notifyClients (pNode, USBD_DYNA_REMOVE);    /* Delete any class type structures associated with this node. */    while ((pClassType = usbListFirst (&pNode->classTypes)) != NULL)	{	usbListUnlink (&pClassType->classLink);	OSS_FREE (pClassType);	}    /* release bus address associated with node */    releaseAddress (pNode);    /* Release node resources/memory. */    if (pNode->controlSem != NULL)	OSS_SEM_DESTROY (pNode->controlSem);    if (pNode->nodeHandle != NULL)	usbHandleDestroy (pNode->nodeHandle);    OSS_FREE (pNode->pHubStatus);    OSS_FREE (pNode);    }/***************************************************************************** destroyAllNodes - destroys all nodes in a tree of nodes** Recursively destroys all nodes from <pNode> and down.  If <pNode> is* NULL, returns immediately.** RETURNS: N/A*/LOCAL VOID destroyAllNodes    (    pUSBD_NODE pNode    )    {    int i;    if (pNode != NULL)	{	if (pNode->nodeInfo.nodeType == USB_NODETYPE_HUB &&	    pNode->pPorts != NULL)	    {	    /* destroy all children of this node */	    for (i = 0; i < pNode->numPorts; i++)		destroyAllNodes (pNode->pPorts [i].pNode);	    }	destroyNode (pNode);	}    }/***************************************************************************** updateHubPort - Determine if a device has been attached/removed** Note: The <port> parameter to this function is 0-based (0 = first port,* 1 = second port, etc.)  However, on the USB interface itself, the index* passed in a Setup packet to identify a port is 1-based.** RETURNS: N/A*/LOCAL VOID updateHubPort    (    pUSBD_NODE pNode,    UINT16 port    )    {    USB_HUB_STATUS * pStatus;    UINT16 actLen;    UINT16 nodeSpeed;    pStatus = OSS_MALLOC (sizeof (USB_HUB_STATUS));    /* retrieve status for the indicated hub port. */    if (usbdStatusGet (internalClient, 		       pNode->nodeHandle, 		       USB_RT_CLASS | USB_RT_OTHER, 		       port + 1, 		       sizeof (USB_HUB_STATUS), 		       (UINT8 *) pStatus, 		       &actLen) != OK ||	actLen < sizeof (USB_HUB_STATUS))	{	OSS_FREE (pStatus);	return;	}    /* correct the status byte order */    pStatus->status = FROM_LITTLEW (pStatus->status);    pStatus->change = FROM_LITTLEW (pStatus->change);    /* Process the change indicated by status.change */    /* NOTE: To see if a port's connection status has changed we also see     * whether our internal understanding of the port's connection status     * matches the hubs's current connection status.  If the two do not     * agree, then we also assume a connection change, whether the hub is     * indicating one or not. This covers the case at power on where the     * hub does not report a connection change (i.e., the device is already     * plugged in), but we need to initialize the port for the first time.     */    if ((pStatus->change & USB_HUB_C_PORT_CONNECTION) != 0 ||	((pNode->pPorts [port].pNode == NULL) != 	    ((pStatus->status & USB_HUB_STS_PORT_CONNECTION) == 0)))	{	/* Given that there has been a change on this port, it stands to	 * reason that all nodes connected to this port must be invalidated -	 * even if a node currently appears to be connected to the port.	 */	destroyAllNodes (pNode->pPorts [port].pNode);	pNode->pPorts [port].pNode = NULL;	/* If a node appears to be connected to the port, reset the port. */	if ((pStatus->status & USB_HUB_STS_PORT_CONNECTION) != 0)	    {	    /* Wait 100 msec after detecting a connection to allow power to	     * stabilize.  Then enable the port and issue a reset.	     */	    OSS_THREAD_SLEEP (USB_TIME_POWER_ON);	    usbdFeatureSet (internalClient, pNode->nodeHandle,		USB_RT_CLASS | USB_RT_OTHER, USB_HUB_FSEL_PORT_RESET, port + 1);	    /* 	     * Acoording to the USB spec (refer to section 7.1.7.3) we should 	     * wait 50 msec for reset signaling + an additional 10 msec reset 	     * recovery time.  We double this time for safety's sake since 	     * we have seen a few devices that do not respond to the suggested 	     * time of 60 msec.	     */ 	    OSS_THREAD_SLEEP (2*USB_TIME_RESET + USB_TIME_RESET_RECOVERY);	    }	/* Clear the port connection change indicator - whether or not it	 * appears that a device is currently connected. */	usbdFeatureClear (internalClient, pNode->nodeHandle, 	    USB_RT_CLASS | USB_RT_OTHER, USB_HUB_FSEL_C_PORT_CONNECTION, port + 1);	/* If a node appears to be connected, create a new node structure for 	 * it and attach it to this hub. */	if ((pStatus->status & USB_HUB_STS_PORT_CONNECTION) != 0)	    {	    /* If the following call to createNode() fails, it returns NULL.	     * That's fine, as the corresponding USBD_PORT structure will be	     * initialized correctly either way.	     */	    nodeSpeed = ((pStatus->status & USB_HUB_STS_PORT_LOW_SPEED) != 0) ?		USB_SPEED_LOW : USB_SPEED_FULL;	    if ((pNode->pPorts [port].pNode = createNode (pNode->pBus,		pNode->pBus->pRoot->nodeHandle, pNode->nodeHandle, port,		nodeSpeed, pNode->topologyDepth + 1)) == NULL)		{		/* Attempt to initialize the port failed.  Disable the port */		usbdFeatureClear (internalClient, pNode->nodeHandle,		    USB_RT_CLASS | USB_RT_OTHER, USB_HUB_FSEL_PORT_ENABLE, 			port + 1);		}	    }	}    if ((pStatus->change & USB_HUB_C_PORT_ENABLE) != 0)	{	/* Clear the port enable change indicator */	usbdFeatureClear (internalClient, pNode->nodeHandle, 	    USB_RT_CLASS | USB_RT_OTHER, USB_HUB_FSEL_C_PORT_ENABLE, port + 1);	}    if ((pStatus->change & USB_HUB_C_PORT_SUSPEND) != 0)	{	/* Clear the suspend change indicator */	usbdFeatureClear (internalClient, pNode->nodeHandle, 	    USB_RT_CLASS | USB_RT_OTHER, USB_HUB_FSEL_C_PORT_SUSPEND, port + 1);	}    if ((pStatus->change & USB_HUB_C_PORT_OVER_CURRENT) != 0)	{	/* Clear the over current change indicator */	usbdFeatureClear (internalClient, pNode->nodeHandle,	    USB_RT_CLASS | USB_RT_OTHER, USB_HUB_FSEL_C_PORT_OVER_CURRENT, 	    port + 1);	}    if ((pStatus->change & USB_HUB_C_PORT_RESET) != 0)	{	/* Clear the reset change indicator */	usbdFeatureClear (internalClient, pNode->nodeHandle, 	    USB_RT_CLASS | USB_RT_OTHER, USB_HUB_FSEL_C_PORT_RESET, port + 1);	}    }/***************************************************************************** hubIrpCallback - called when hub status IRP completes** By convention, the USB_IRP.userPtr field is a pointer to the USBD_NODE* for this transfer.** RETURNS: N/A*/LOCAL VOID hubIrpCallback    (    pVOID p			/* completed IRP */    )    {    pUSB_IRP pIrp = (pUSB_IRP) p;    pUSBD_NODE pNode = (pUSBD_NODE) pIrp->userPtr;    /* If the IRP was canceled, it means that the hub node is being torn     * down, so don't queue a request for the bus thread.     */    if (pIrp->result != S_usbHcdLib_IRP_CANCELED)	{	/* Let the bus thread update the port and re-queue the hub IRP. */	usbQueuePut (pNode->pBus->busQueue, BUS_FNC_UPDATE_HUB,	    0, (UINT32) pNode->nodeHandle, OSS_BLOCK);	}    }/***************************************************************************** initHubIrp - initialize IRP used to listen for hub status** RETURNS: TRUE if successful, else FALSE*/LOCAL BOOL initHubIrp    (    pUSBD_NODE pNode    )    {    pUSB_IRP pIrp = &pNode->hubIrp;        /* initialize IRP */    memset (pIrp, 0, sizeof (*pIrp));    pIrp->userPtr = pNode;    pIrp->irpLen = sizeof (USB_IRP);    pIrp->userCallback = hubIrpCallback;    pIrp->flags = USB_FLAG_SHORT_OK;    pIrp->timeout = USB_TIMEOUT_NONE;    pIrp->transferLen = HUB_STATUS_LEN (pNode);    pIrp->bfrCount = 1;    pIrp->bfrList [0].pid = USB_PID_IN;    pIrp->bfrList [0].pBfr = (pUINT8) pNode->pHubStatus;    pIrp->bfrList [0].bfrLen = pIrp->transferLen;    memset (pNode->pHubStatus, 0, MAX_HUB_STATUS_LEN);    /* submit the IRP. */    if (usbdTransfer (internalClient, pNode->hubStatusPipe, pIrp) != OK)	return FALSE;    return TRUE;    }/***************************************************************************** initHubNode - initialize a hub** RETURNS: TRUE if successful, else FALSE*/LOCAL BOOL initHubNode    (    pUSBD_NODE pNode    )    {    pUSB_CONFIG_DESCR pCfgDescr;    pUSB_INTERFACE_DESCR pIfDescr;    pUSB_ENDPOINT_DESCR pEpDescr;    pUSB_HUB_DESCR pHubDescrBuf;    UINT8 * pConfDescrBfr;    UINT16 actLen;    UINT16 port;    pConfDescrBfr = OSS_MALLOC (USB_MAX_DESCR_LEN);    pHubDescrBuf = OSS_MALLOC (sizeof (USB_HUB_DESCR));    /* Read the hub's descriptors. */    if (usbdDescriptorGet (internalClient, 			   pNode->nodeHandle, 			   USB_RT_STANDARD | USB_RT_DEVICE, 			   USB_DESCR_CONFIGURATION, 			   0, 			   0, 			   USB_MAX_DESCR_LEN, 			   pConfDescrBfr, 			   &actLen) 			 != OK)	{	OSS_FREE (pConfDescrBfr);	OSS_FREE (pHubDescrBuf);	return FALSE;	}    if ((pCfgDescr = usbDescrParse (pConfDescrBfr, 				    actLen, 				    USB_DESCR_CONFIGURATION)) 				== NULL ||	(pIfDescr = usbDescrParse (pConfDescrBfr, 				   actLen, 				   USB_DESCR_INTERFACE))			  	== NULL ||	(pEpDescr = usbDescrParse (pConfDescrBfr, 				   actLen, 				   USB_DESCR_ENDPOINT))				== NULL)	{        OSS_FREE (pConfDescrBfr);        OSS_FREE (pHubDescrBuf);	return FALSE;	}    if (usbdDescriptorGet (internalClient, 			   pNode->nodeHandle, 			   USB_RT_CLASS | USB_RT_DEVICE, 			   USB_DESCR_HUB, 			   0, 			   0, 			   sizeof (USB_HUB_DESCR), 			   (UINT8 *) pHubDescrBuf, 			   &actLen) 			!= OK ||

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99视频一区二区三区| 日韩欧美成人一区二区| 欧美一级久久久| 亚洲少妇30p| 韩国午夜理伦三级不卡影院| 99视频精品在线| 久久久久亚洲综合| 日韩在线播放一区二区| 91视频精品在这里| 国产日产精品1区| 日本亚洲三级在线| 欧美日韩一区国产| 伊人色综合久久天天| 国产另类ts人妖一区二区| 这里只有精品视频在线观看| 亚洲综合在线第一页| 成人黄色777网| 久久久久99精品国产片| 调教+趴+乳夹+国产+精品| 色综合天天综合色综合av| 欧美国产国产综合| 丰满岳乱妇一区二区三区| 2023国产精华国产精品| 日本中文在线一区| 欧美一区二区精品在线| 午夜精品久久久久久久久久| 色综合久久综合网97色综合| 亚洲免费高清视频在线| 99精品久久99久久久久| 国产精品国产三级国产普通话99| 国内精品久久久久影院薰衣草| 欧美一级淫片007| 理论片日本一区| 欧美mv日韩mv亚洲| 国内精品伊人久久久久av影院| 欧美电视剧在线看免费| 激情六月婷婷久久| 久久在线观看免费| 国产成人在线免费| **性色生活片久久毛片| www.av亚洲| 亚洲一区二区3| 正在播放亚洲一区| 国产精品一区二区x88av| 久久久久国产一区二区三区四区| 国产一区二区三区黄视频| 久久精品亚洲麻豆av一区二区 | xfplay精品久久| 老司机午夜精品| 欧美激情中文不卡| 欧美主播一区二区三区美女| 亚洲高清不卡在线| 精品美女在线观看| 成人永久aaa| 亚洲尤物视频在线| 日韩一二三区视频| 成人免费视频网站在线观看| 亚洲激情自拍视频| 日韩一区二区免费在线电影| 国产福利视频一区二区三区| 一区在线播放视频| 欧美理论在线播放| 处破女av一区二区| 亚洲国产欧美日韩另类综合 | 国产一区二区三区在线观看免费视频| 久久综合一区二区| 91猫先生在线| 狠狠色丁香婷婷综合| 国产欧美日韩一区二区三区在线观看| 91麻豆免费在线观看| 蜜臀av一区二区在线免费观看 | 制服丝袜国产精品| 从欧美一区二区三区| 亚洲成人tv网| 欧美高清一级片在线观看| 欧美在线观看18| 国产原创一区二区| 一区二区视频免费在线观看| 精品乱码亚洲一区二区不卡| 99久久婷婷国产综合精品电影| 日产精品久久久久久久性色| 国产精品福利影院| 欧美一区二区日韩一区二区| av中文字幕亚洲| 国产精品99久| 奇米色一区二区三区四区| 亚洲欧美福利一区二区| 欧美精品一区二区高清在线观看| 欧洲中文字幕精品| 成人免费毛片片v| 国产精品影视在线观看| 日韩成人午夜精品| 亚洲一区二区三区在线播放| 欧美激情一区不卡| 久久日韩精品一区二区五区| 欧美日韩免费高清一区色橹橹 | 久久综合久久综合亚洲| 欧美在线一区二区三区| 99精品视频在线观看| 国产一区二区中文字幕| 美国一区二区三区在线播放| 亚洲地区一二三色| 亚洲永久免费av| 亚洲日本在线天堂| 国产精品成人一区二区艾草| 久久这里只有精品首页| 日韩三级av在线播放| 91精品一区二区三区久久久久久| 欧美性生活久久| 91一区二区三区在线观看| 播五月开心婷婷综合| 岛国精品在线观看| 99久久伊人网影院| 99国产欧美另类久久久精品| www.欧美日韩国产在线| 99久久精品免费精品国产| 成人app网站| 色综合久久中文综合久久牛| 97久久久精品综合88久久| av成人老司机| 在线观看免费成人| 欧美区在线观看| 欧美一二三四区在线| 精品久久久网站| 中文字幕的久久| 亚洲美女视频一区| 亚洲成av人片一区二区| 三级亚洲高清视频| 久久精品国产亚洲高清剧情介绍| 久久成人18免费观看| 国产激情精品久久久第一区二区| 国产馆精品极品| 99久久777色| 在线不卡免费欧美| 久久久久久久久久久久久久久99 | 国产精品三级在线观看| 自拍偷拍亚洲激情| 午夜视频在线观看一区二区三区| 日韩va亚洲va欧美va久久| 国产精品88888| 91在线porny国产在线看| 欧美性色aⅴ视频一区日韩精品| 7777精品伊人久久久大香线蕉| 久久综合九色综合欧美就去吻| 国产精品天美传媒沈樵| 亚洲最大成人综合| 国模大尺度一区二区三区| 色综合一区二区三区| 日韩一区二区三区免费观看| 国产精品美女久久久久久久| 亚洲国产va精品久久久不卡综合| 精品在线你懂的| 色琪琪一区二区三区亚洲区| 日韩视频一区在线观看| 国产精品久久夜| 免费久久精品视频| 99视频有精品| 久久久久久久久久久黄色| 亚洲中国最大av网站| 国产麻豆精品95视频| 在线观看视频91| 久久久久99精品一区| 午夜精品免费在线| 99在线视频精品| ww亚洲ww在线观看国产| 亚洲国产精品尤物yw在线观看| 国产乱淫av一区二区三区| 欧美日韩一区高清| 亚洲欧美日韩国产一区二区三区 | 99视频热这里只有精品免费| 欧美一级欧美三级| 一区2区3区在线看| 成人av在线资源网站| 日韩免费一区二区三区在线播放| 亚洲欧美日韩在线播放| 国产高清一区日本| 精品国内二区三区| 日本一不卡视频| 欧美日韩黄色一区二区| 亚洲精品免费在线| 成人永久看片免费视频天堂| 久久青草欧美一区二区三区| 久色婷婷小香蕉久久| 欧美日本免费一区二区三区| 成人免费在线观看入口| 成人丝袜18视频在线观看| 久久婷婷国产综合国色天香| 日韩在线观看一区二区| 欧美美女喷水视频| 亚洲成人资源在线| 欧美日韩性生活| 亚洲成人久久影院| 在线看日本不卡| 亚洲成a人在线观看| 欧亚洲嫩模精品一区三区| 一区二区日韩av| 欧美久久婷婷综合色| 日韩精品每日更新| 欧美一级日韩免费不卡| 麻豆国产精品一区二区三区 |