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

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

?? usbhubutility.c

?? vxWorks下usb2.0的usbHUB驅動源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,"usbHubCreateBusStructure:memory insuff -  pBusList\n",0,0,0,0);        return NULL;    }/* End of if (NULL== pBusList) */    /* Clear the allocated structure.*/    OS_MEMSET(pBusList,0,sizeof(USB_HUB_BUS_INFO));    /* set HUB_BUS_INFO::uBusHandle as uBusHandle*/    pBusList->uBusHandle = uBusHandle;    /* set HUB_BUS_INFO::pNextBus as gpGlobalBus*/    pBusList->pNextBus = gpGlobalBus;    /*      * Call the OS_CREATE_THREAD() function to create a thread (the function as     * HUB_BusManager() will be spawned as a thread with HUB_BUS_INFO as the     * parameter) If the thread creation fails:     * i.    Call the OS_FREE() function to free the memory allocated to the     *       HUB_BUS_INFO structure.     * ii.    Return NULL     * Set the HUB_BUS_INFO::BusManagerThreadID as the thread id returned by     * the OS_CREATE_THREAD() function.     */    pBusList->BusManagerThreadID=OS_CREATE_THREAD((char*) pBusManagerName,     /*NAME*/                                                   USB_HUB_THREAD_PRIORITY, /*PRIO*/                                                   usbHubThread,/* ENTRY PNT*/                                                   pBusList           /* ARGS */                                                   );    /* Check for the success  of thread creation */    if (OS_THREAD_FAILURE == pBusList->BusManagerThreadID)    {        /* Free the memory allocated */        OS_FREE(pBusList);                /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,            "usbHubCreateBusStructure:thread create failed=0x%x\n",            pBusList->BusManagerThreadID,            0,            0,            0);        /*return failure */        return NULL;    }/* End of if (NULL==pBusList->BusMan... */   /* Set  gpGlobalBus  as HUB_BUS_INFO*/   gpGlobalBus = pBusList;   /* Debug Message */   OS_LOG_MESSAGE_LOW(       HUB,"usbHubCreateBusStructure:Created ok\n",0,0,0,0);   /* Return HUB_BUS_INFO structure.*/   return pBusList;   }/* End of HUB_CreateBusStructure() *//***************************************************************************** usbHubDeleteBusStructure - deletes the Bus Structure.** This routine deletes the Bus Structure and kills any threadassociated with it.** RETURNS: None** ERRNO: None* * \NOMANUAL*/LOCAL void usbHubDeleteBusStructure     (     UINT8 uBusHandle    )    {    /* Bus List pointer */    pUSB_HUB_BUS_INFO pBusList = gpGlobalBus;    /* Previous bus pointer -to be used for unlinking */    pUSB_HUB_BUS_INFO pPrevBusList = gpGlobalBus;    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "usbHubDeleteBusStructure:Called 0x%x\n",        uBusHandle,        0,        0,        0);    /*     * Browse the gpGlobalBus list and check if uBusHandle exists. If it does     * not exists, return.     */    while (NULL != pBusList)    {        /* Check for correct entry */        if (pBusList->uBusHandle == uBusHandle)        {            /* Jump out of the loop */            break;        } /* End of if (pBusList->....*/        /* Set the previous bus list pointer as the current one */        pPrevBusList=pBusList;        /* Go to the next bus list */        pBusList=pBusList->pNextBus;    } /* End of While (NULL != pBusList) */    /* Check if we found the bus */    if (NULL==pBusList)    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,            "usbHubDeleteBusStructure: bus handle 0x%x not found\n",            uBusHandle,            0,            0,            0);        /* nope.. we did nto find the bus, so we return */        return;    } /* End of if (NULL==pBusList) */    /* Unlink the HUB_BUS_INFO from the gpGlobalBus list.(BEGIN) */    /* Check if the previous bus list is the same as the global bus list */    if ( ( pPrevBusList == gpGlobalBus)&& (pPrevBusList==pBusList) )    {        /* This is the first bus */                /* Set the global pointer to this */        gpGlobalBus = pBusList->pNextBus;    }    else    {    	/* This is not the first bus */        /* Reset the pointer to point to the next bus */        pPrevBusList->pNextBus=pBusList->pNextBus;    } /* End of if (pPrevBusList ==.. */    /* Unlink the HUB_BUS_INFO from the gpGlobalBus list.(END) */    /*     * Call OS_DESTROY_THREAD() to kill the thread with thread ID as     * HUB_BUS_INFO:: BusManagerThreadID     */    OS_DESTROY_THREAD(pBusList->BusManagerThreadID);    /* Call OS_FREE() function to free the memory allocated for HUB_BUS_INFO*/    OS_FREE(pBusList);    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "usbHubDeleteBusStructure:Done 0x%x\n",        uBusHandle,        0,        0,        0);    /* Return*/    return;}/* End of Hub_DeleteBusStructure() *//***************************************************************************** usbHubRemoveDevice - calls the remove device of the Host stack.** This routine calls the remove device of the Host stack.This also frees the * memory as required.** RETURNS: USBHST_SUCCESS, USBHST_INVALID_PARAMETER if there are invalid params** ERRNO: None** \NOMANUAL*/LOCAL USBHST_STATUS usbHubRemoveDevice    (    pUSB_HUB_INFO pHub,     UINT8 uPortIndex    )    {    /* To Store the port information */    pUSB_HUB_PORT_INFO pPort = NULL;		/* WindView Instrumentation */		USB_HUB_LOG_EVENT(			USB_HUB_WV_DEVICE,			"Entering usbHubRemoveDevice() Function",			USB_HUB_WV_FILTER);    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "usbHubRemoveDevice : Entered pHub= 0x%x, uPortIndex =%d\n",        (UINT32)pHub,        uPortIndex,        0,        0);    /* Verify the Parameters */    if (NULL == pHub)    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,"usbHubRemoveDevice: pHub is NULL\n",0,0,0,0);        /* Return invalid parameter */        return USBHST_INVALID_PARAMETER;    } /* End of if (NULL == pHub) */    /* Verify the Parameters */    if (uPortIndex >= pHub->HubDescriptor.bNbrPorts)    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,            "usbHubRemoveDevice: portIndex = %d NbrPort =%d is Invalid\n",            uPortIndex,            pHub->HubDescriptor.bNbrPorts,            0,            0);        /* Return invalid parameter */        return USBHST_INVALID_PARAMETER;    } /* End of if (uPortIndex >= pHub->HubDescriptor.bNbrPorts) */    /* Copy the pPort value */    pPort= pHub->pPortList[uPortIndex];    /*     * If the port is enabled then Call the     * g_USBHSTFunctionList::USBHST_RemoveDevice() function with     * HUB_PORT_INFO::uDeviceHandle.     */    if (NULL != pPort)    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,            "usbHubRemoveDevice: port present - deleting %d\n",            uPortIndex,            0,            0,            0);        /*         * Check what state this device was in - if this was in being configured,         * then we need to reset the global bus's variable and then mark the         * port for delete         */        USB_MARK_FOR_DELETE_PORT(pHub,pPort);         /* Check if this port is a hub device or not */        if (NULL == pPort->pHub)        {            /* Debug Message */            OS_LOG_MESSAGE_LOW(                HUB,                "usbHubRemoveDevice: non Hub Device\n",                0,                0,                0,                0);            /* disable the port */            pHub->pPortList[uPortIndex]=NULL;            /* Call remove device */            if (0 != pPort->uDeviceHandle)                {                g_usbHstFunctionList.UsbdToHubFunctionList.removeDevice(pPort->uDeviceHandle);                }/* End of if (0 != pPort->uDeviceHandle) */            /* Free the memory */            OS_FREE(pPort);            pPort=NULL;        }        else        /* an Hub device */        {            /* Debug Message */            OS_LOG_MESSAGE_LOW(                HUB,"usbHubRemoveDevice: Hub Device\n",0,0,0,0);            /* Call remove device */        g_usbHstFunctionList.UsbdToHubFunctionList.removeDevice(pPort->uDeviceHandle);        } /* End of if (NULL == pPort->pHub) */    }/* End of if (NULL != pPort ) */		/* WindView Instrumentation */		USB_HUB_LOG_EVENT(			USB_HUB_WV_DEVICE,			"Exiting usbHubRemoveDevice() Function",			USB_HUB_WV_FILTER);    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "usbHubRemoveDevice : Done pHub= 0x%x, uPortIndex =%d\n",        (UINT32)pHub,        uPortIndex,        0,        0);    /* Return SUCCESS */    return USBHST_SUCCESS;    } /* End of HUB_RemoveDevice() *//***************************************************************************** usbHubPortDebounceHandler - used for handling de-bounce condition.** This routine handles the de-bounce condition.** RETURNS: USBHST_SUCCESS, USBHST_FAILURE,* USBHST_INVALID_PARAMETER if there are invalid params** ERRNO: None* * \NOMANUAL*/LOCAL USBHST_STATUS usbHubPortDebounceHandler     (    pUSB_HUB_INFO pHub,    UINT8 uPortIndex     )    {    /* Storage for the port informaiton */    pUSB_HUB_PORT_INFO pPort=NULL;    /* Current Frame storage */    UINT16 uCurrentFrame = 0;    /* To store the port status */    USB_HUB_PORT_STATUS PortStatus;    /* To Store the time difference */    UINT16 uTimeDiff = 0;    /* To store the length of the  status */    UINT8 uLength = sizeof(USB_HUB_PORT_STATUS) ;    /* To store the result of the requests */    USBHST_STATUS  Result;    /* To store the max tier possible  */    UINT8 uMaxTier =0;    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "usbHubPortDebounceHandler:Called pHub=0x%x port=%d\n",        (UINT32)pHub,        uPortIndex,        0,        0);    /* If the pHub is NULL then return USBHST_INVALID_PARAMETER */    if (NULL==pHub)    {        /* Debug Message */        OS_LOG_MESSAGE_MEDIUM(            HUB,            "usbHubPortDebounceHandler:pHub=0x%x NULL\n",            (UINT32)pHub,            0,            0,            0);        return USBHST_INVALID_PARAMETER;    }/* End of if (NULL ==pHub) */    /*     * If the uPortIndex greater than pHub::HubDescriptor::bNbrPorts then     * return USBHST_INVALID_PARAMETER.     * Note: the actual port number is the port index + 1     */    if (uPortIndex >= pHub->HubDescriptor.bNbrPorts)    {        /* Debug Message */        OS_LOG_MESSAGE_MEDIUM(            HUB,            "usbHubPortDebounceHandler:pHub=0x%x port=%d> Max\n",            (UINT32)pHub,            uPortIndex,            pHub->HubDescriptor.bNbrPorts,            0);        return USBHST_INVALID_PARAMETER;    }/* End of if (uPortIndex >= pHub->HubDescriptor.bNbrPorts) */    /*     * Retrieve the HUB_PORT_INFO structure from pHub::pPortList for     * the uPortIndex.     */    pPort=pHub->pPortList[uPortIndex];    OS_ASSERT(NULL != pPort);                                       /* verify */    /*     * If PORT_INFO::StateOfPort is not HUB_DEBOUNCE_PENDING then     * return USBHST_INVALID_PARAMETER.     */    if (USB_HUB_DEBOUNCE_PENDING != pPort->StateOfPort)    {        /* Debug Message */        OS_LOG_MESSAGE_MEDIUM(            HUB,"usbHubPortDebounceHandler:debounce not pending\n",0,0,0,0);        return USBHST_INVALID_PARAMETER;    }/* End of if (HUB_DEBOUNCE... */    /* Retrieve the current frame by calling the USBHST_GetCurrentFrame()*/    Result=usbHstGetFrameNumber (pHub->uDeviceHandle,&uCurrentFrame);    OS_ASSERT(USBHST_SUCCESS == Result);                            /* verify */    /*     * Call the HUB_TIME_DIFF() function with HUB_PORT_INFO::uConnectFrame and     * current time. If the return value is less than HUB_PORT_DEBOUNCE_TIME,     * return USBHST_SUCCESS.     */    /* Get the time diference */    uTimeDiff = USB_HUB_TIME_DIFF(uCurrentFrame,pPort->uConnectFrame);    /* Check for the time value */    if ( USB_HUB_PORT_DEBOUNCE_TIME > uTimeDiff )    {        /* Debug Message */        OS_LOG_MESSAGE_LOW(            HUB,            "usbHubPortDebounceHandler:pHub=0x%x port=%d WAITING\n",

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
69堂精品视频| 精品国产免费久久| 成人永久免费视频| 韩国午夜理伦三级不卡影院| 三级欧美韩日大片在线看| 丝袜亚洲精品中文字幕一区| 亚洲国产美女搞黄色| 亚洲第一av色| 美女久久久精品| 久久99精品国产麻豆婷婷| 狠狠色丁香婷婷综合| 国产成人亚洲综合a∨婷婷| 国产精品 欧美精品| 成人h版在线观看| 色天天综合久久久久综合片| 欧洲生活片亚洲生活在线观看| 91精品国产入口| 91精品国产乱| 久久免费国产精品| 中文字幕在线播放不卡一区| 亚洲精品成人悠悠色影视| 亚洲国产成人高清精品| 久久66热偷产精品| 成人精品视频一区二区三区| 在线一区二区三区四区五区| 欧美一级一区二区| 亚洲国产高清aⅴ视频| 亚洲国产综合91精品麻豆| 日韩成人伦理电影在线观看| 国产成人a级片| 欧美专区日韩专区| 欧美成人精品1314www| 中文字幕一区二区三区精华液| 图片区小说区国产精品视频| 国内精品久久久久影院薰衣草| 成人性色生活片免费看爆迷你毛片| 99久久er热在这里只有精品15 | 亚洲嫩草精品久久| 麻豆精品新av中文字幕| 懂色av一区二区三区免费观看| 欧洲亚洲国产日韩| 中文字幕 久热精品 视频在线| 亚洲第一搞黄网站| av亚洲精华国产精华| 欧美电影免费观看高清完整版在线观看 | 综合自拍亚洲综合图不卡区| 婷婷久久综合九色综合绿巨人| 国产ts人妖一区二区| 欧美日韩一级黄| 最新欧美精品一区二区三区| 久久丁香综合五月国产三级网站| 色天天综合色天天久久| 欧美激情一区二区三区蜜桃视频| 日本视频免费一区| 欧美亚洲日本国产| 亚洲欧洲av在线| 风流少妇一区二区| 久久婷婷色综合| 全部av―极品视觉盛宴亚洲| 在线观看成人小视频| 中文字幕视频一区二区三区久| 久久成人久久爱| 91精品国产欧美一区二区18 | 色先锋aa成人| 最新久久zyz资源站| 成人精品电影在线观看| 久久综合久久综合九色| 精品综合免费视频观看| 制服视频三区第一页精品| 亚洲国产一区在线观看| 色婷婷av一区二区三区gif| 亚洲欧洲一区二区三区| 99v久久综合狠狠综合久久| 欧美激情一区二区三区四区| 成人综合婷婷国产精品久久| 久久美女艺术照精彩视频福利播放 | 不卡av在线免费观看| 中文字幕久久午夜不卡| 国产精品亚洲а∨天堂免在线| 欧美zozo另类异族| 国产一区二区三区免费观看| 欧美精品一区二区三区蜜臀| 激情文学综合丁香| 国产亚洲午夜高清国产拍精品| 精品一区二区三区在线观看国产| 日韩欧美第一区| 极品少妇一区二区| 欧美经典一区二区三区| 不卡av电影在线播放| 亚洲影院理伦片| 欧美高清视频一二三区 | 欧美高清精品3d| 久久机这里只有精品| 久久免费电影网| 91在线播放网址| 日韩精品成人一区二区三区| 欧美va亚洲va在线观看蝴蝶网| 国产在线精品免费| 中文字幕一区二区不卡| 欧美日韩高清一区二区三区| 美日韩黄色大片| 国产精品国产三级国产| 欧美人与性动xxxx| 大白屁股一区二区视频| 自拍偷在线精品自拍偷无码专区| 欧美日韩国产经典色站一区二区三区 | 国产成人三级在线观看| 最新国产成人在线观看| 日韩一卡二卡三卡| 99riav久久精品riav| 日本色综合中文字幕| 国产精品国产自产拍高清av王其| 欧美日韩一区二区三区不卡| 国产一区二区女| 亚洲成人综合网站| 国产精品久久久久久久久久久免费看 | 精品亚洲免费视频| 国产精品久久久久婷婷二区次| 欧美三级日韩在线| 成人国产精品免费观看动漫| 首页综合国产亚洲丝袜| 中文字幕免费不卡在线| 日韩一区二区三区免费观看| 91免费版在线| 国产精品一区二区免费不卡| 爽爽淫人综合网网站| 亚洲天堂精品在线观看| 国产亚洲欧美日韩俺去了| 4438亚洲最大| 91麻豆swag| 99v久久综合狠狠综合久久| 国模冰冰炮一区二区| 日韩高清在线一区| 亚洲一区二区精品久久av| 18成人在线视频| 国产精品美女久久久久久2018| 亚洲精品一区二区三区影院| 这里只有精品电影| 欧美无砖专区一中文字| 91麻豆6部合集magnet| eeuss鲁片一区二区三区在线看| 国产传媒一区在线| 国产精品白丝jk黑袜喷水| 久久精品久久99精品久久| 日韩国产欧美在线观看| 婷婷成人激情在线网| 亚洲国产wwwccc36天堂| 亚洲国产精品久久不卡毛片| 一区二区三区四区不卡在线| 国产精品大尺度| 中文字幕五月欧美| 亚洲三级免费电影| 亚洲伊人伊色伊影伊综合网| 亚洲精品伦理在线| 亚洲午夜三级在线| 性感美女久久精品| 日韩精品视频网站| 久久se精品一区精品二区| 国产资源在线一区| 国产精品1024| 99天天综合性| 欧美视频在线播放| 欧美日韩的一区二区| 欧美一区二区视频观看视频| 日韩一级高清毛片| 久久久精品人体av艺术| 欧美国产成人精品| 一区二区三区四区不卡在线| 三级欧美在线一区| 国产盗摄一区二区三区| www.成人网.com| 精品婷婷伊人一区三区三| 91麻豆精品国产自产在线| 精品国产乱码久久久久久久久| 久久久久国产一区二区三区四区| 国产婷婷色一区二区三区| 亚洲伦在线观看| 日本va欧美va精品发布| 国产成人高清在线| 欧美综合亚洲图片综合区| 日韩视频永久免费| 国产欧美一区二区在线| 亚洲一区二区三区中文字幕在线| 久久爱www久久做| 99re亚洲国产精品| 欧美大片免费久久精品三p | 99久久久免费精品国产一区二区| 欧美午夜寂寞影院| xf在线a精品一区二区视频网站| 亚洲品质自拍视频| 青青青伊人色综合久久| 99视频精品免费视频| 51精品秘密在线观看| 亚洲欧洲日本在线| 久久99国产精品久久99| 91国内精品野花午夜精品| 久久久精品综合| 日韩成人午夜精品| 在线视频国内自拍亚洲视频| 久久在线观看免费|