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

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

?? usbdcorelib.c

?? 基于VXWORK環境的ARM9 S2410的USB驅動程序
?? C
?? 第 1 頁 / 共 5 頁
字號:
	    pNotify = usbListNext (&pNotify->reqLink);	    }	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) 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品系列免费在线观看| 色综合久久中文综合久久牛| 国产午夜亚洲精品午夜鲁丝片 | 欧美亚洲愉拍一区二区| 26uuu精品一区二区在线观看| 亚洲高清久久久| 波多野结衣一区二区三区| 在线成人午夜影院| 亚洲欧美激情插 | 日韩欧美国产电影| 蜜桃一区二区三区在线观看| 欧美精品亚洲一区二区在线播放| www日韩大片| 国产精品一区二区果冻传媒| 欧美va日韩va| 狠狠狠色丁香婷婷综合激情| 972aa.com艺术欧美| 一区二区欧美在线观看| 在线免费观看日本欧美| 亚洲综合久久久| 秋霞午夜av一区二区三区| 4438亚洲最大| 精品一区二区三区香蕉蜜桃 | 中文字幕一区二区三区蜜月| 成人黄色小视频| 亚洲欧美一区二区久久 | 欧美aa在线视频| 日韩一区二区三区电影在线观看| 免费成人在线网站| 久久蜜桃av一区二区天堂| 国产.精品.日韩.另类.中文.在线.播放| 日韩欧美一二三| 激情偷乱视频一区二区三区| 国产日韩高清在线| 色视频成人在线观看免| 亚洲天堂中文字幕| 欧美疯狂做受xxxx富婆| 亚洲成人黄色小说| 国产亚洲综合在线| 日本乱人伦一区| 麻豆精品在线看| 国产精品久久久久婷婷 | 精品福利在线导航| 国产成人小视频| 亚洲精品视频在线观看网站| 99在线精品观看| 综合精品久久久| 欧美一区二区三区免费大片 | 亚瑟在线精品视频| 91精品国产色综合久久不卡蜜臀| 国产在线视频一区二区| 亚洲精品菠萝久久久久久久| 欧美一级日韩免费不卡| av综合在线播放| 麻豆91在线观看| 亚洲精选在线视频| 欧美本精品男人aⅴ天堂| 色婷婷综合视频在线观看| 人人爽香蕉精品| 一区二区在线观看视频在线观看| 欧美videossexotv100| 在线精品亚洲一区二区不卡| 国产69精品一区二区亚洲孕妇| 亚洲国产日韩a在线播放性色| 久久婷婷一区二区三区| 欧美日韩久久一区二区| 国产一区二区三区四区在线观看 | 怡红院av一区二区三区| 2023国产一二三区日本精品2022| 91黄视频在线| 国产美女一区二区三区| 无码av免费一区二区三区试看 | 自拍视频在线观看一区二区| 欧美白人最猛性xxxxx69交| 精品视频一区二区不卡| 精品制服美女久久| 亚洲午夜免费电影| 国产精品全国免费观看高清 | 欧美写真视频网站| 99精品久久久久久| 水蜜桃久久夜色精品一区的特点| 一区二区三区在线影院| 欧美v亚洲v综合ⅴ国产v| 欧美日韩在线播放三区四区| 国产成人a级片| 韩国女主播一区| 日本欧洲一区二区| 一区二区不卡在线播放| 亚洲六月丁香色婷婷综合久久 | 一区二区三区四区激情| 亚洲女人的天堂| 国产精品日韩成人| 中文字幕欧美日韩一区| 久久久久久久久99精品| 精品sm捆绑视频| 欧美大度的电影原声| 日韩三级精品电影久久久| 制服丝袜亚洲色图| 欧美电影一区二区| 99精品视频在线免费观看| 高清在线不卡av| 国产一区二区三区蝌蚪| 亚洲精品五月天| 亚洲码国产岛国毛片在线| 国产精品传媒入口麻豆| 成人欧美一区二区三区在线播放| 中文字幕一区在线观看视频| 日韩毛片精品高清免费| 国产欧美一区二区精品仙草咪| 欧美国产精品中文字幕| 国产精品久线在线观看| 亚洲码国产岛国毛片在线| 亚洲午夜三级在线| 亚洲综合激情小说| 亚洲aaa精品| 久久国产精品第一页| 国产一区二区三区在线看麻豆| 国产99久久久国产精品| 国产jizzjizz一区二区| 91美女福利视频| 成人午夜电影久久影院| 99精品视频在线观看免费| 国产91精品一区二区| 91亚洲精品久久久蜜桃| 国产高清亚洲一区| 91高清视频在线| 精品黑人一区二区三区久久| 久久嫩草精品久久久精品| 亚洲精品免费在线| 麻豆精品一区二区| 国产不卡高清在线观看视频| 91亚洲国产成人精品一区二三| 欧美日韩免费高清一区色橹橹| 日本国产一区二区| 欧美v日韩v国产v| 亚洲欧美另类图片小说| 日本欧美久久久久免费播放网| 国产精品一区二区三区网站| 91亚洲精品久久久蜜桃网站| 欧美亚州韩日在线看免费版国语版| 欧美一级xxx| 欧美精品一区二区三区蜜桃 | 国内精品免费在线观看| 国产+成+人+亚洲欧洲自线| 欧美最猛性xxxxx直播| 精品欧美一区二区三区精品久久| 中文字幕制服丝袜一区二区三区 | 成人app软件下载大全免费| 成人18视频日本| 欧美婷婷六月丁香综合色| 精品国产乱码久久久久久免费| 国产色产综合色产在线视频| 偷拍日韩校园综合在线| 成人性生交大片免费看中文| www.激情成人| 99久久99久久精品国产片果冻 | 国产一区三区三区| 成人精品高清在线| 日韩精品一区在线| 夜夜揉揉日日人人青青一国产精品| 精品一区二区三区视频| 成人涩涩免费视频| 日本中文在线一区| 国产一区二区三区在线观看精品| 国产河南妇女毛片精品久久久| 制服丝袜一区二区三区| 成人免费在线观看入口| 另类的小说在线视频另类成人小视频在线| 白白色 亚洲乱淫| 国产日本一区二区| 久久国产精品区| 欧美一二区视频| 亚洲男同性视频| 97久久超碰精品国产| 欧美激情一区二区三区蜜桃视频 | 久久精品夜色噜噜亚洲aⅴ| 波多野结衣一区二区三区 | 视频在线在亚洲| 51久久夜色精品国产麻豆| 香蕉成人啪国产精品视频综合网| 欧美精品色综合| 秋霞午夜鲁丝一区二区老狼| 欧美mv日韩mv国产网站app| 久久精品久久精品| 26uuu另类欧美| 国产成人在线视频网址| 亚洲天堂成人网| 91色|porny| 日韩中文字幕亚洲一区二区va在线| 欧美性生活大片视频| 久久精工是国产品牌吗| 欧美精品一区二区三区视频| proumb性欧美在线观看| 自拍偷在线精品自拍偷无码专区| 欧美日韩精品三区| 美国毛片一区二区三区| 国产三级欧美三级日产三级99| 国产成人精品aa毛片| 亚洲一级二级在线| 欧美男男青年gay1069videost|