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

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

?? usbhubutility.c

?? vxWorks下usb2.0的usbHUB驅動源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* usbHubUtility.c - Utility functions to provide the functionality of HUB class driver *//* Copyright 2003 Wind River Systems, Inc. *//*Modification history--------------------01a,27jun03,nrv Changing the code to WRS standards*//*DESCRIPTIONThis module provides the utility functions required for the functioning of the USB Hub Class Driver.INCLUDE FILES:  usb2/usbOsal.h usb2/usbHst.h usb2/usbHubUtility.h                usb2/usbHubGlobalVariables.h usb2/usbHubBusManager.h                usb2/usbHubEventHandler.h*//*INTERNAL ******************************************************************************* * Filename         : HUB_Utility.c * * Copyright        : * * THE COPYRIGHT IN THE CONTENTS OF THIS SOFTWARE VEST WITH WIPRO * LIMITED A COMPANY INCORPORATED UNDER THE LAWS OF INDIA AND HAVING * ITS REGISTERED OFFICE AT DODDAKANNELLI SARJAPUR ROAD  BANGALORE * 560 035. DISTRIBUTION OR COPYING OF THIS SOFTWARE BY * ANY INDIVIDUAL OR ENTITY OTHER THAN THE ADDRESSEE IS STRICTLY * PROHIBITED AND MAY INCUR LEGAL LIABILITY. IF YOU ARE NOT THE * ADDRESSEE PLEASE NOTIFY US IMMEDIATELY BY PHONE OR BY RETURN EMAIL. * THE ADDRESSEE IS ADVISED TO MAINTAIN THE PROPRIETARY INTERESTS OF * THIS COPYRIGHT AS PER APPLICABLE LAWS. * * * Description      : This module provides the utility functions required for *                    the functioning of the USB Hub Class Driver. * * ******************************************************************************//************************** INCLUDE FILES *************************************/#include "usb2/usbOsal.h"#include "usb2/usbHst.h"#include "usb2/usbHubUtility.h"#include "usb2/usbHubGlobalVariables.h"#include "usb2/usbHubBusManager.h"#include "usb2/usbHubEventHandler.h"/****************** MODULE SPECIFIC FUNCTIONS DECLARATION *********************//* * This function is used as a call back for the Reset. On failure, reset is * retried for a maximum number of tries. If the maximum number of retries * expires, the port is disabled. */LOCAL USBHST_STATUS usbHubResetCallback  ( pUSBHST_URB pResetURB);/* * This function is a general purpose call back function that can be used for * issuing a blocking request. */LOCAL USBHST_STATUSusbHubBlockingCallback (pUSBHST_URB pUrb);/* * This function is the call back for the status change interrupt IN pipe * completion. */LOCAL USBHST_STATUSusbHubInterruptRequestCallback (pUSBHST_URB pURB);/* * This Function is used to validate the Standard Descriptors */LOCAL USBHST_STATUS usbHubValidateDescriptor (UINT8 *  pDescriptor,                               UINT16 uUsbDeviceVersion,UINT8 uDescriptorType);/* * This function is the call back function for the completion of a  * Clear TT request to a High Speed Hub. */LOCAL USBHST_STATUS usbHubClearTTRequestCallback (pUSBHST_URB pURB);/* * This function is the call back function for the completion of a  * Reset TT request to a High Speed Hub. */LOCAL USBHST_STATUS usbHubResetTTRequestCallback (pUSBHST_URB pURB);/************************ GLOBAL FUNCTIONS DEFINITION *************************//***************************************************************************** usbHubFindPortNumber - finds the port number of a device .** This routine finds the port number of a device.** RETURNS: port number, PORT_NUMBER_NOT_FOUND if the match was not*          found/invalid params.** ERRNO: None** \NOMANUAL*/LOCAL UINT8 usbHubFindPortNumber    (    pUSB_HUB_INFO pHub,    UINT32 uDeviceHandle    )    {    /* Counter for the port number */    UINT8 uPortCount = 0;    /* Debug Message */        OS_LOG_MESSAGE_LOW(        HUB,        "usbHubFindPortNumber:Called pHub=0x%x,devh=0x%x\n",        (UINT32)pHub,        uDeviceHandle,        0,        0);    /* If pHub is NULL then return PORT_NUMBER_NOT_FOUND*/    if (NULL == pHub)    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,"usbHubFindPortNumber:pHub null \n",0,0,0,0);        return USB_PORT_NUMBER_NOT_FOUND;    }/* End of if (NULL==pHub) */    /*     * For all ports in the pHub::pPortList that are enabled     * i.    Retrieve the HUB_PORT_INFO from pHub::pPortList[ port count ].     * ii.   If the HUB_PORT_INFO::uDeviceHandle is equal to uDeviceHandle then     *         return the portcount.     */    for (uPortCount = 0;         uPortCount < pHub->HubDescriptor.bNbrPorts;         uPortCount++)    {       /* Retrieve the HUB_PORT_INFO structure */       pUSB_HUB_PORT_INFO pPort = pHub->pPortList[uPortCount];              /* Check if the port is enabled */       if (NULL != pPort)       {           /* Check for uDeviceHandle */           if ( uDeviceHandle == pPort->uDeviceHandle )           {               /* Debug Message */               OS_LOG_MESSAGE_LOW(                   HUB,                   "usbHubFindPortNumber:found %d\n",                   uPortCount,                   0,                   0,                   0);                              return uPortCount;                          }/* End of if (uDeviceHandle... */                  } /* End of If (NULL != pPort) */    } /* End of for (uPortCount.... */    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,"usbHubFindPortNumber:Not Found\n",0,0,0,0);    /* Return PORT_NUMBER_NOT_FOUND.*/    return USB_PORT_NUMBER_NOT_FOUND;}/* End of HUB_FindPortNumber() *//***************************************************************************** usbHubFindParentHubInBuses - searches for a parent hub.** This routine searches for a parent hub.** RETURNS: pointer to the PHUB_INFO, NULL if the match was not found/invalid* params.** ERRNO: None** \NOMANUAL*/LOCAL pUSB_HUB_INFO usbHubFindParentHubInBuses     (     UINT32 uDeviceHandle    )    {    /* The bus List pointer to be used for browsing the list */    pUSB_HUB_BUS_INFO pBusList = gpGlobalBus;    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "usbHubFindParentHubInBuses:Called,devh=0x%x\n",        uDeviceHandle,        0,        0,        0);    /*     * For every bus in the gpGlobalBus do:     *   i.     Call HUB_FindParentHub () function to find the matching hub.     *          If this returns a non NULL value, return the value.     */    while (NULL != pBusList)    {        /* Find matching hub */        pUSB_HUB_INFO pHub =            usbHubFindParentHub(uDeviceHandle,pBusList->pRootHubInfo);        /* if found return the value */        if (NULL != pHub)        {            /* Debug Message */            OS_LOG_MESSAGE_LOW(                HUB,"usbHubFindParentHubInBuses:Found\n",0,0,0,0);            return pHub;                    }/* End of if (NULL!=pHub) */        /* move the bus list pointer to the next bus pointer */        pBusList=pBusList->pNextBus;    }/* End of While (NULL != pBusList) */    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,"usbHubFindParentHubInBuses:Not Found\n",0,0,0,0);    /* Return NULL*/    return NULL;} /* End of HUB_FindParentHubInBuses() *//***************************************************************************** usbHubFindParentHub - recursively searches for the parent hub.** This routine recursively searches for the parent hub of the specified  device.** RETURNS: pointer to the PHUB_INFO, NULL if the match was not found/invalid* params.** ERRNO: None** \NOMANUAL*/LOCAL pUSB_HUB_INFO usbHubFindParentHub    (     UINT32 uDeviceHandle ,     pUSB_HUB_INFO pHub     )    {    /* Counter for the port number */    UINT8 uPortCount = 0;    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "usbHubFindParentHub:Called uDevHandle=0x%x pHub=0x%x\n",        uDeviceHandle,        (UINT32)pHub,        0,        0);            /* If pHub is NULL then return NULL*/    if (NULL==pHub)    {        /* Debug Message */        OS_LOG_MESSAGE_MEDIUM(            HUB,"usbHubFindParentHub:pHub null \n",0,0,0,0);                    return NULL;            }/* End of (NULL == pHub) */    /*      * For all ports in the pHub::pPortList that are not NULL     * i.     Retrieve the HUB_PORT_INFO from pHub::pPortList[ port count]     * ii.    If uDeviceHandle is same as HUB_PORT_INFO::uDeviceHandle  then     *        return pHub     */    for (uPortCount = 0;          uPortCount < pHub->HubDescriptor.bNbrPorts;         uPortCount++)    {       /* Retrieve the HUB_PORT_INFO structure */      pUSB_HUB_PORT_INFO pPort = pHub->pPortList[uPortCount];       /* Check if the port is enabled */       if (NULL != pPort)       {          /* Check for uDeviceHandle */          if ( uDeviceHandle == pPort->uDeviceHandle )          {              /* Debug Message */              OS_LOG_MESSAGE_LOW(                  HUB,"usbHubFindParentHub:found\n",0,0,0,0);                                return pHub;                        }/* End of if (uDeviceHandle... */       } /* End of If (NULL != pPort) */    } /* End of for (uPortCount.... */    /*      * For all ports in the pHub::pPortList that are not NULL     * i.    Retrieve the HUB_PORT_INFO from pHub::pPortList[ port count]     * ii.     If HUB_PORT_INFO::pHub is not NULL then:     * iii.    Call HUB_FindParentHub () function to find the matching hub. If     *         this     * returns a non NULL value, return the value.     */    for (uPortCount = 0;          uPortCount < pHub->HubDescriptor.bNbrPorts;          uPortCount++)    {       /* Retrieve the HUB_PORT_INFO structure */       pUSB_HUB_PORT_INFO pPort = pHub->pPortList[uPortCount];       /* Check if the port is enabled */       if (NULL != pPort)       {          /* Check for Hub device */          if ( NULL != pPort->pHub)          {              /* storage for storing the result */              pUSB_HUB_INFO pResultHub ;              /* Call for matching hub in  this sub tree. */              pResultHub = usbHubFindParentHub(uDeviceHandle,pPort->pHub);              /* Check if the hub was found */              if (NULL !=pResultHub)              {                  return pResultHub;                                }/* End of if (NULL != pResultHub ) */          }/* End of if (NULL != pPort->pHub) */       } /* End of If (NULL != pPort) */    } /* End of for (uPortCount.... */    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,"usbHUbFindParentHub:not found\n",0,0,0,0);    /* Return NULL*/    return NULL;    }/* End of HUB_FindParentHub() *//***************************************************************************** usbHubCreateBusStructure - Creates a bus structure .** Creates a bus structure and connects the same to the global Bus list.* This also launches a thread to handle the events occurring on the Bus.** RETURNS: HUB_BUS_INFO, NULL .** ERRNO: None** \NOMANUAL*/LOCAL pUSB_HUB_BUS_INFO usbHubCreateBusStructure     (    UINT8 uBusHandle    )    {    /* Bus List pointer */    pUSB_HUB_BUS_INFO pBusList = gpGlobalBus;    /* Bus Manager Thread Name */    UCHAR * pBusManagerName = (UCHAR *)"BusM  ";             /* Set the tag as the bus handle */    pBusManagerName[5] = 'A' +(uBusHandle%26);    /* Debug Message */    OS_LOG_MESSAGE_LOW(        HUB,        "usbHubCreateBusStructure:Called 0x%x \n",        uBusHandle,        0,        0,        0);    /*     * Browse the HUB_BUS_INFO list and check if gpGlobalBus exists. If it     * exists, return NULL.     */    while (NULL != pBusList)    {        /* Check for duplicate entries */        if (pBusList->uBusHandle == uBusHandle)        {            /* Debug Message */            OS_LOG_MESSAGE_MEDIUM(                HUB,                "usbHubCreateBusStructure:already there 0x%x \n",                uBusHandle,                0,                0,                0);            return NULL;        } /* End of if (pBusList->....*/        /* move to the next bus */        pBusList=pBusList->pNextBus;    } /* End of While (NULL != pBusList) */    /*     * Call OS_MALLOC() to allocate memory for HUB_BUS_INFO structure.     * If failed, return NULL     */    pBusList = OS_MALLOC(sizeof(USB_HUB_BUS_INFO));    /* Check the result */    if (NULL == pBusList)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩欧美a| 欧美亚洲国产bt| 久久久久国产精品麻豆ai换脸| 美女一区二区在线观看| 欧美电视剧免费全集观看| 韩国欧美国产1区| 日本一区二区综合亚洲| 99re66热这里只有精品3直播| 亚洲男人的天堂在线aⅴ视频| 欧美色综合天天久久综合精品| 亚洲一区二区三区美女| 欧美一区二区免费| 国产传媒日韩欧美成人| 亚洲精品乱码久久久久久黑人 | 亚洲视频网在线直播| 色先锋aa成人| 日本va欧美va瓶| 国产欧美1区2区3区| 91在线观看地址| 午夜精品久久久久久久99樱桃 | 亚洲第一主播视频| 在线成人午夜影院| 国产精品亚洲人在线观看| 亚洲欧美日韩中文播放| 欧美一区二区三区的| 国产999精品久久久久久| 亚洲免费在线视频| 精品国产一二三区| 97久久精品人人做人人爽| 免费成人在线播放| 亚洲色大成网站www久久九九| 制服丝袜亚洲色图| 97精品电影院| 麻豆专区一区二区三区四区五区| 国产欧美日韩综合精品一区二区| 在线视频欧美区| 国产成人三级在线观看| 日韩福利视频导航| 自拍偷自拍亚洲精品播放| 日韩一区二区三免费高清| 成人网男人的天堂| 美日韩一区二区| 亚洲国产另类av| 国产精品精品国产色婷婷| 欧美大片在线观看一区| 欧美亚洲一区三区| 成人天堂资源www在线| 美女视频免费一区| 亚洲成a人片在线观看中文| 中文字幕欧美日韩一区| 欧美一级日韩一级| 欧美三级电影一区| 色婷婷综合久久久中文一区二区| 国产九色sp调教91| 另类成人小视频在线| 亚洲国产va精品久久久不卡综合| 国产精品国产三级国产普通话蜜臀| 欧美tickling挠脚心丨vk| 欧美日韩成人一区| 欧美日韩一本到| 日本道精品一区二区三区| 成人av在线影院| 国产伦精品一区二区三区视频青涩 | 国产成人av影院| 国产在线视频不卡二| 热久久久久久久| 三级一区在线视频先锋 | 97se亚洲国产综合在线| 精品一区二区三区免费观看| 人妖欧美一区二区| 男女性色大片免费观看一区二区| 午夜精品久久久久久久蜜桃app| 一区二区三区在线免费视频| 亚洲女厕所小便bbb| 成人免费小视频| 亚洲欧洲国产专区| 国产精品理论在线观看| 成人欧美一区二区三区1314| 国产精品国产自产拍在线| 中文字幕在线视频一区| 日韩码欧中文字| 一区二区三区高清在线| 亚洲国产婷婷综合在线精品| 天天综合色天天综合色h| 午夜精品成人在线| 七七婷婷婷婷精品国产| 日本欧美一区二区三区乱码| 免费成人在线观看视频| 国产在线精品一区二区不卡了| 美女国产一区二区三区| 国产一区美女在线| 97久久人人超碰| 欧美日韩亚洲国产综合| 日韩精品在线一区二区| 国产日韩亚洲欧美综合| 亚洲欧美另类久久久精品2019| 亚洲一区视频在线| 热久久久久久久| 国产成人自拍在线| 欧洲精品一区二区| 51精品久久久久久久蜜臀| 久久久亚洲欧洲日产国码αv| 国产喂奶挤奶一区二区三区| 亚洲欧洲日韩av| 亚洲mv在线观看| 美女视频一区二区三区| 不卡的电影网站| 欧美蜜桃一区二区三区| 久久久久亚洲蜜桃| 亚洲精品成人在线| 久久成人免费网站| av不卡一区二区三区| 欧美一区在线视频| 国产精品国产三级国产有无不卡 | 天堂久久一区二区三区| 精品一二线国产| 91老司机福利 在线| 日韩一区二区三区视频在线| 国产精品国产精品国产专区不蜜| 亚洲成人午夜电影| 成人av网站在线观看| 欧美日韩成人在线| 国产精品久久久久国产精品日日| 日韩电影免费在线观看网站| 99久久免费精品| 亚洲精品一区二区在线观看| 亚洲午夜羞羞片| 成人黄色软件下载| 欧美大黄免费观看| 亚洲第四色夜色| www.成人网.com| www激情久久| 日本不卡一二三| 欧美主播一区二区三区美女| 国产日韩欧美高清在线| 青青草伊人久久| 欧美做爰猛烈大尺度电影无法无天| 久久色在线观看| 男女激情视频一区| 欧美日韩精品一区二区在线播放| 欧美激情综合五月色丁香| 蜜臀久久99精品久久久画质超高清 | 91视频一区二区三区| 欧美变态tickle挠乳网站| 午夜精品一区在线观看| 色香蕉久久蜜桃| 亚洲欧洲日产国码二区| 国产成人自拍网| 久久免费视频色| 久久99九九99精品| 日韩一区二区三区四区五区六区| 亚洲午夜一区二区| 91福利视频在线| 综合久久一区二区三区| 懂色av中文字幕一区二区三区| 日韩午夜精品视频| 日韩和欧美的一区| 在线播放/欧美激情| 亚洲午夜久久久久| 色噜噜狠狠色综合中国| 亚洲精品中文字幕在线观看| 99久免费精品视频在线观看| 国产精品欧美经典| 成人少妇影院yyyy| 国产精品免费视频观看| 成人毛片老司机大片| 国产精品女上位| av在线这里只有精品| 中文字幕在线视频一区| 成人午夜精品一区二区三区| 欧美国产乱子伦| 97se亚洲国产综合自在线观| 亚洲激情自拍偷拍| 91国产福利在线| 天使萌一区二区三区免费观看| 欧美日韩免费不卡视频一区二区三区| 夜夜嗨av一区二区三区网页| 欧美综合视频在线观看| 亚洲国产精品人人做人人爽| 6080亚洲精品一区二区| 麻豆91在线播放免费| 久久久噜噜噜久久人人看| 成人精品一区二区三区四区| 亚洲欧美综合网| 欧美亚洲综合另类| 美国毛片一区二区三区| 久久久.com| 91视频在线看| 日一区二区三区| 精品久久久久久久一区二区蜜臀| 国产精品99久久久久久似苏梦涵| 中文字幕色av一区二区三区| 欧洲亚洲精品在线| 久久精品国产免费| 国产精品久久久久久妇女6080 | 天天操天天综合网| 日韩欧美成人一区| 成人福利视频网站| 五月婷婷久久丁香| 久久先锋影音av|