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

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

?? usbhubclassinterface.c

?? vxWorks下usb2.0的usbHUB驅動源碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
    }/* End of if (NULL == pParentHub ) */    /* Search for the DeviceID in the parent hub. If failed return. */    /*     * HUB_FindPortNumber() to find the port number for this device handle.     * If this is not found, then return USBHST_INVALID_PARAMETER.     */    uPortIndex = usbHubFindPortNumber(pParentHub,uDeviceHandle);    /* Check  if the port is found */    if (USB_PORT_NUMBER_NOT_FOUND == uPortIndex)    {        /* Debug Message */        OS_LOG_MESSAGE_MEDIUM(            HUB,"usbHubSelectiveResumeDevice: port number not found\n",0,0,0,0);        return USBHST_INVALID_PARAMETER;    } /* End of if (PORT_NUM.. */    /* Check if the port number is within limits */    if (uPortIndex > (pParentHub->HubDescriptor.bNbrPorts))    {        /* Debug Message */        OS_LOG_MESSAGE_MEDIUM(            HUB,            "HUB_SelectiveResumeDevice:port=%d > %d\n",            uPortIndex,            pParentHub->HubDescriptor.bNbrPorts,            0,            0);        return USBHST_INVALID_PARAMETER;    } /* End of (uPortIndex > (pParentHub->.... */    /*     * Retrieve HUB_INFO structure from     * parentHub::pPortList[uPortIndex]::pHub.     */    pPort = pParentHub->pPortList[uPortIndex];    OS_ASSERT( NULL == pPort->pHub);                                 /* Verify */    /*     * Call the HUB_SubmitFeature() function to submit a selective resume to     * the parent hub on the port number.     * Note: actual port number is 1 more than the port index.     */    Result =  USB_HUB_CLEAR_PORT_FEATURE(pParentHub,uPortIndex,USB_PORT_SUSPEND);	/* resume recovery period of 10 ms */	OS_DELAY_MS(10);		/* WindView Instrumentation */		USB_HUB_LOG_EVENT(			USB_HUB_WV_DEVICE,			"Exiting usbHubSelectiveResumeDevice() Function",			USB_HUB_WV_FILTER);    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "HUB_SelectiveResumeDevice: Called devH=0x%x\n",        uDeviceHandle,        0,        0,        0);    /* Return the result of the submission.*/    return Result;} /* End of function HUB_SelectiveResumeDevice() *//***************************************************************************** usbHubAddRoot - configures the root hub** This function is called by the USB Host Software Stack  for adding a new root* hub. In this process, it configures the root hub and also initializes the* structures to handle  the bus under the root hub.** RETURNS: N/A** ERRNO: None** \NOMANUAL*/LOCAL USBHST_STATUS usbHubAddRoot    (    UINT32 uDeviceHandle,    UINT8 uBusHandle,    UINT8 uSpeed    )    {    /* Bus List pointer */    pUSB_HUB_BUS_INFO pBus = NULL;    /* Hub pointer */    pUSB_HUB_INFO     pRootHub     = NULL;    /* Results */    USBHST_STATUS Result   = USBHST_FAILURE;		/* WindView Instrumentation */		USB_HUB_LOG_EVENT(			USB_HUB_WV_DEVICE,			"Entering usbHubAddRoot() Function",			USB_HUB_WV_FILTER);    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "usbHubAddRoot: Called devH=0x%x BusH=0x%x\n",        uDeviceHandle,        uBusHandle,        0,        0);    /*     * Call the HUB_CreateBusStructure() function to create     * HUB_BUS_INFO structure. If this fails, then return     * USBHST_INVALID_PARAMETER.     */    pBus = usbHubCreateBusStructure (uBusHandle);    if (NULL == pBus)    {        /* Debug Message */        OS_LOG_MESSAGE_MEDIUM(            HUB,            "usbHubAddRoot: Bus Structure was not created.Duplicate bus id?\n",            0,            0,            0,            0);        return USBHST_INVALID_PARAMETER;    }    /* Update the HUB_BUS_INFO::uDeviceHandle with the uDeviceHandle.*/    pBus->uDeviceHandle = uDeviceHandle;    /*     * Call the HUB_ConfigureHub() function to configure the hub.     * If the configuration fails then     * i.    Call the HUB_DeleteBusStructure() function.     * ii.   Return the result of the configuration.     */    Result=usbHubConfigure(&pRootHub,uDeviceHandle,pBus,NULL);    /* Check the result */    if ((USBHST_SUCCESS != Result)|| (NULL == pRootHub) )    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,            "usbHubAddRoot: Configuring root hub failed=0x%x\n",            Result,            0,            0,            0);        /* Delete the Bus structure */        usbHubDeleteBusStructure(uBusHandle);        /* return the failure result */        return Result;    } /* End of if ((USBHST_SUCCESS != Result)|| (NULL == pRootHub) ) */    /*     * Set the BUS_INFO::uBusSpeed as the uSpeed     */     pBus->uBusSpeed = uSpeed;    /*     * Set the BUS_INFO::pRootHubInfo as HUB_INFO structure returned by the     * HUB_ConfigureHub() function.     */    pBus->pRootHubInfo=pRootHub;		/* WindView Instrumentation */		USB_HUB_LOG_EVENT(			USB_HUB_WV_DEVICE,			"Exiting usbHubAddRoot() Function",			USB_HUB_WV_FILTER);    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "HUB_AddRootHub: Done devH=0x%x BusH=0x%x\n",        uDeviceHandle,        uBusHandle,        0,        0);    /* Return USBHST_SUCCESS */    return USBHST_SUCCESS;    } /* End of function HUB_AddRootHub() *//***************************************************************************** usbHubRemoveRoot - removes the root hub.** This function is called by the USB Host Software Stack for removing a root* hub.** RETURNS: N/A** ERRNO: None** \NOMANUAL*/LOCAL void usbHubRemoveRoot     (    UINT8 uBusHandle    )    {    /* Bus List pointer */    pUSB_HUB_BUS_INFO pBusList = gpGlobalBus;    /* Root hub structure */    pUSB_HUB_INFO pRootHub = NULL;    /* Port counter */    UINT8    uPortCount = 0;    /* WindView Instrumentation */    USB_HUB_LOG_EVENT(			USB_HUB_WV_DEVICE,			"Entering usbHubRemoveRoot() Function",			USB_HUB_WV_FILTER);    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "usbHubRemoveRoot: Called BusH=0x%x\n",        uBusHandle,        0,        0,        0);    /*     * Scan through the gpGlobalBus to find the matching HUB_BUS_INFO structure     * for the uBusHandle. If not found return.     */    while (NULL != pBusList)    {        /* Check for duplicate entries */        if (pBusList->uBusHandle == uBusHandle)        {            /* Jump out of the loop */            break;        } /* End of if (pBusList->....*/        /* Move the pointer to the next bus */        pBusList=pBusList->pNextBus;    } /* End of While (NULL != pBusList) */    /* Check if we found the bus */    if (NULL==pBusList)    {        /* Debug Message */        OS_LOG_MESSAGE_MEDIUM(            HUB,"usbHubRemoveRoot: BUS NOT FOUND \n",0,0,0,0);        /* nope.. we did nto find the bus, so we return */        return;    } /* End of if (NULL==pBusList) */    /* Retrieve the HUB_INFO structure from the HUB_BUS_INFO structure.*/    pRootHub = pBusList->pRootHubInfo;    if (NULL == pRootHub)    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,"usbHubRemoveRoot: root hub NOT FOUND \n",0,0,0,0);                /* Call the HUB_DeleteBusStructure() function to delete bus structure. */       usbHubDeleteBusStructure(uBusHandle);        return;    }    /*     * Call the USBHST_CancelURB() function to cancel the Status change     * interrupt IN request URB.     */    usbHstURBCancel(&(pRootHub->StatusChangeURB) );    /*     * If any of the HUB_PORT_INFO pointer of the HUB_BUS_INFO::pPortList is     * enabled then call the g_USBHSTFunctionList::HUB_RemoveDevice().     * Power down the port and free the resources allocated.     */    for (uPortCount = 0;         uPortCount < pRootHub->HubDescriptor.bNbrPorts;         uPortCount++)    {        /* To store the result of the transactions */        USBHST_STATUS Result;        /* Retrieve the HUB_PORT_INFO structure */        pUSB_HUB_PORT_INFO pPort = pRootHub->pPortList[uPortCount];        /* power off the port */        Result = USB_HUB_CLEAR_PORT_FEATURE(pRootHub,uPortCount,USB_PORT_POWER);        /* This call shud ideally never goof up.. still we do a check */        OS_ASSERT(USBHST_SUCCESS == Result);                   /* Verify */        /* Check if the port is topology enabled */        if (NULL != pPort)        {            /*             * we have a device still attached.. we have to quit clean..             */            /* Disable the port */            pRootHub->pPortList[uPortCount]=NULL;            /* Debug Message */            OS_LOG_MESSAGE_LOW(                HUB,                "usbHubRemoveRoot: device found on root hub -deleting it \n",                0,                0,                0,                0);            /* let the USB host stack know.. that we have discon the device             * Physically             */            /* 9/5/2k3:NM: Changed here to centralise the effect*/            usbHubRemoveDevice(pRootHub,uPortCount);        } /* End of If (NULL != pPort) */    } /* End of for (uPortCount.... */    /* Call the HUB_DeleteBusStructure() function to delete bus structure. */    usbHubDeleteBusStructure(uBusHandle);        /*     * Call OS_FREE () to free the memory allocated for a root hub     * HUB_INFO structure.     */    OS_FREE (pRootHub->pStatus);                    /* Free the status bitmap */    OS_FREE (pRootHub->StatusChangeURB.pTransferBuffer);/* Free URB Buffer    */    OS_FREE (pRootHub);                               /* Free the Hub itself  */		/* WindView Instrumentation */		USB_HUB_LOG_EVENT(			USB_HUB_WV_DEVICE,			"Exiting usbHubRemoveRoot() Function",			USB_HUB_WV_FILTER);    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,"usbHubRemoveRoot: Done BusH=0x%x\n",uBusHandle,0,0,0);    /* Return */    return;} /* End of function HUB_RemoveRootHub() *//***************************************************************************** usbHubCheckPower -check the parent hub can support a power for a device.** called by the USB Host Software Stack for checking if the  parent hub can* support a power for a device.** RETURNS: USBHST_SUCCESS, USBHST_FAILURE if the power cannot be supported.** ERRNO: None** \NOMANUAL*/LOCAL USBHST_STATUS usbHubCheckPower    (    UINT32 uDeviceHandle,    UINT8 uPowerRequirement    )    {    /* Storage for the parent hub structure */    pUSB_HUB_INFO pParentHub             = NULL;    /* WindView Instrumentation */    USB_HUB_LOG_EVENT(			USB_HUB_WV_DEVICE,			"Entering usbHubCheckPower() Function",			USB_HUB_WV_FILTER);    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "usbHubCheckPower: Called DevH=0x%x PowReq=%d\n",        uDeviceHandle,        uPowerRequirement,        0,        0);    /*     * Call HUB_FindParentHubInBuses() to find the parent hub and If this     * is not found, then return USBHST_INVALID_PARAMETER.     */    /* Call HUB_FindParentHubInBuses() to find the parent hub. */    pParentHub = usbHubFindParentHubInBuses(uDeviceHandle);    /*     * If parent hub pointer is not found then search through the bus structures     * for BUS_INFO::uDeviceHandle  matching for the uDeviceHandle.     * This is coz the device could be root hub. In that case we wont have a     * parent hub.     */    if (NULL == pParentHub)    {        /* start searching thru the HUB_BUS_INFO list */        pUSB_HUB_BUS_INFO pBusList=gpGlobalBus;        /* scan thru all the buses available */        while (NULL != pBusList)        {            /* check if this is a root hub */            if (uDeviceHandle == pBusList->uDeviceHandle)            {                /* voila.. a root hub.. */                /* If uPowerRequirement is less than MAXIMUM_POWER_PER_ROOT_HUB                 * return USBHST_SUCCESS. Else return USBHST_FAILURE.                 */                if (USB_MAXIMUM_POWER_PER_ROOT_HUB >=uPowerRequirement)                {                    /* Debug Message */                    OS_LOG_MESSAGE_LOW(                        HUB,                        "usbHubCheckPower: root hub power ok\n",                        0,                        0,                        0,                        0);                    /* ok power requirement- return success */                    return USBHST_SUCCESS;                }                else                {                    /* Debug Message */                    OS_LOG_MESSAGE_HIGH(                        HUB,                        "usbHubCheckPower: root hub power not ok\n",                        0,                        0,                        0,                        0);                    /*                     * root hub is asking for more power than we can provide.                     * return failure.                     */                    return USBHST_FAILURE;                }            } /* End of if (uDeviceHandle == pBusList->uDeviceHandle) */        } /* End of while (NULL != pBusList) */    }/* End of if (NULL == pParentHub ) */    /* if still NULL then we have a invalid parameter passed to us */    if (NULL == pParentHub)    {        /* Debug Message */        OS_LOG_MESSAGE_MEDIUM(            HUB,"usbHubCheckPower: parent hub not found\n",0,0,0,0);                    /* cannot find the parent hub. return USBHST_INVALID_PARAMETER */        return USBHST_INVALID_PARAMETER;    }/* End of if (NULL == pParentHub ) */    /*     * If this uPowerRequirement less than HUB_INFO::nPowerPerPort     * then return USBHST_SUCCESS.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品久久久久久久久久久院品网| 亚洲丝袜美腿综合| 久久久久综合网| 亚洲一区在线观看网站| 激情综合色播五月| 91麻豆国产精品久久| 欧美成人a视频| 亚洲国产一区二区三区青草影视| 国产一区二区三区黄视频 | 成人免费毛片片v| 欧美日本在线一区| 亚洲欧洲在线观看av| 美女一区二区在线观看| 欧美午夜不卡在线观看免费| 国产视频911| 久久黄色级2电影| 欧美猛男男办公室激情| 综合婷婷亚洲小说| 成人av第一页| 国产丝袜在线精品| 激情综合网最新| 日韩一二三区视频| 午夜伊人狠狠久久| 在线观看视频91| 亚洲免费观看高清完整版在线观看熊| 国产一区二区h| 日韩精品中文字幕在线一区| 天堂资源在线中文精品| 91九色02白丝porn| 亚洲精品久久久蜜桃| 99久久婷婷国产精品综合| 欧美国产一区在线| 成人做爰69片免费看网站| 国产喷白浆一区二区三区| 国产一区二区三区四区在线观看| 日韩欧美一区在线观看| 免费视频一区二区| 日韩一级高清毛片| 狠狠色综合日日| 26uuu成人网一区二区三区| 久久精品国产久精国产| 26uuu欧美| 成人永久aaa| 亚洲色图视频免费播放| 色欧美片视频在线观看| 亚洲综合999| 欧美精品久久一区二区三区| 日本最新不卡在线| 欧美一区二视频| 激情久久五月天| 国产精品视频在线看| 色综合激情五月| 秋霞成人午夜伦在线观看| 日韩精品一区二区三区在线播放 | 国产a级毛片一区| 国产喷白浆一区二区三区| 亚洲综合在线视频| 一本大道av伊人久久综合| 亚洲一区在线观看网站| 日韩亚洲国产中文字幕欧美| 国内成人免费视频| 亚洲天堂久久久久久久| 4438x亚洲最大成人网| 美女视频网站黄色亚洲| 国产日韩欧美电影| 欧美性受xxxx| 久草在线在线精品观看| 国产精品伦一区| 欧美日韩精品一区二区在线播放| 久久99精品一区二区三区三区| 久久久三级国产网站| 色综合久久久久久久久| 麻豆精品一二三| 亚洲品质自拍视频| 精品理论电影在线观看| 成人av网站免费| 奇米影视在线99精品| 欧美激情资源网| 欧美日本在线观看| 成人午夜在线免费| 免费久久99精品国产| 亚洲免费观看高清完整版在线| 欧美成人一区二区三区在线观看| 成人av综合在线| 视频一区欧美精品| 亚洲少妇30p| 久久久五月婷婷| 91精品国产欧美一区二区18| 99re亚洲国产精品| 精品影视av免费| 亚洲国产精品一区二区尤物区| 国产女主播视频一区二区| 欧美精品在线观看播放| 色综合久久久久综合体桃花网| 激情偷乱视频一区二区三区| 天堂成人免费av电影一区| 亚洲欧洲三级电影| 国产婷婷一区二区| 精品国产乱码久久久久久夜甘婷婷| 日本精品免费观看高清观看| 国产v日产∨综合v精品视频| 老司机午夜精品| 亚洲成人动漫在线观看| 亚洲精品高清在线| 亚洲色图清纯唯美| 亚洲天天做日日做天天谢日日欢| 国产免费成人在线视频| 精品国产免费一区二区三区四区 | 五月婷婷激情综合网| 亚洲欧美国产77777| 国产精品久久久久精k8| 精品日韩欧美一区二区| 日韩欧美在线影院| 日韩免费视频一区二区| 在线播放91灌醉迷j高跟美女| 在线视频你懂得一区| 色综合一个色综合亚洲| 97成人超碰视| 91啪在线观看| 91成人在线精品| 在线国产亚洲欧美| 精品视频在线看| 欧美精品第1页| 91精品国产一区二区人妖| 91精品婷婷国产综合久久竹菊| 欧美日韩另类国产亚洲欧美一级| 欧美日韩国产bt| 91.com在线观看| 精品美女在线播放| 国产欧美日韩不卡免费| 欧美极品少妇xxxxⅹ高跟鞋| 国产精品家庭影院| 《视频一区视频二区| 亚洲激情图片小说视频| 亚洲成va人在线观看| 免费国产亚洲视频| 懂色中文一区二区在线播放| 成人av电影在线网| 99久久婷婷国产精品综合| 欧美日精品一区视频| 欧美男男青年gay1069videost | 91激情五月电影| 欧美日本一道本| 欧美va亚洲va在线观看蝴蝶网| 久久精品夜色噜噜亚洲aⅴ| 国产精品久久久久久久久免费桃花 | 欧美亚洲国产怡红院影院| 欧美高清dvd| 国产女同性恋一区二区| 亚洲自拍偷拍综合| 国产高清亚洲一区| 色综合久久久久综合99| 日韩欧美亚洲国产精品字幕久久久| 国产网站一区二区| 亚洲一区在线观看免费观看电影高清| 日本欧美在线看| 成人妖精视频yjsp地址| 欧美日韩在线精品一区二区三区激情 | 日本一区免费视频| 亚洲高清免费视频| 国产高清久久久久| 欧美体内she精高潮| 久久久亚洲午夜电影| 亚洲激情在线激情| 国产黄人亚洲片| 制服丝袜亚洲精品中文字幕| 中文字幕精品—区二区四季| 日产国产欧美视频一区精品| aaa亚洲精品一二三区| 91麻豆精品国产| 亚洲乱码中文字幕| 国产麻豆精品在线| 欧美剧情片在线观看| 日韩美女久久久| 国产永久精品大片wwwapp | 香蕉成人伊视频在线观看| 白白色 亚洲乱淫| 精品粉嫩超白一线天av| 亚洲综合激情另类小说区| 福利一区在线观看| 精品成a人在线观看| 日韩成人一级片| 91激情在线视频| 最新日韩av在线| 成人动漫精品一区二区| 久久综合九色综合97婷婷| 美女久久久精品| 欧美精品在线观看播放| 亚洲一区二区五区| 一本大道久久a久久综合婷婷| 国产三级精品在线| 国内精品伊人久久久久av影院| 3d动漫精品啪啪1区2区免费 | 欧美吞精做爰啪啪高潮| 亚洲欧美在线视频观看| 成人av电影免费在线播放| 国产精品网站在线观看| 国产精品资源在线看| 久久亚洲影视婷婷| 国产在线不卡一区|