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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? usbhubutility.c

?? vxWorks下usb2.0的usbHUB驅(qū)動(dòng)源碼
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
                /* Free the memory allocated */                OS_FREE (pDeviceDescriptor);                /* Free the memory allocated */                OS_FREE (pConfigDescriptor);                return USBHST_INVALID_PARAMETER ;				}/* end of if(USBHST_SUCCESS != Result) */				/* this is valid interface descriptor */                /* this is default interface descriptor */                if(pParseDesc[3] == 0 )				    {                     pParseInterfaceDesc = (pUSBHST_INTERFACE_DESCRIPTOR)pParseDesc;                     uDescriptorSequence = (0x0001<<(4 * uCount)) | uDescriptorSequence ;				    }/* end of if(pParseDesc[3]......)*/                /* this is Alternate interface descriptor */                else				{                     pParseAlternateInterfaceDesc = (pUSBHST_INTERFACE_DESCRIPTOR)pParseDesc;                     uDescriptorSequence = (0x0004<<(4 * uCount)) | uDescriptorSequence ;				} /* end of else */         break;         /* this is a endpoint descriptor */         case USBHST_ENDPOINT_DESC :             /*validate the endpoint descriptor */             Result = usbHubValidateDescriptor                        (                        pParseDesc,                        pParseDeviceDesc->bcdUSB,                        USBHST_ENDPOINT_DESC                        );    	     if(USBHST_SUCCESS != Result)	      	    {                /* Debug Message */                OS_LOG_MESSAGE_HIGH(                  HUB,"usbHubConfigure:ValidateEndpointDescriptor fail \n",0,0,0,0);                /* Free the memory allocated */                OS_FREE (pDeviceDescriptor);                /* Free the memory allocated */                OS_FREE (pConfigDescriptor);                return USBHST_INVALID_PARAMETER ;				}/* end of if(USBHST_SUCCESS != Result) */				/* This is a valid endpoint descriptor */		        pParseEndpointDesc = (pUSBHST_ENDPOINT_DESCRIPTOR) pParseDesc;                uDescriptorSequence  =                                 (0x0002<<(4 * uCount)) | uDescriptorSequence ;            break;        /* this is a configuration descriptor */        case USBHST_CONFIG_DESC :         /* validate the configuration descriptor */	    Result = usbHubValidateDescriptor                (                pParseDesc,                pParseDeviceDesc->bcdUSB,                USBHST_CONFIG_DESC                );            if(USBHST_SUCCESS != Result)		        {                /* Debug Message */                OS_LOG_MESSAGE_HIGH(                   HUB,"usbHubConfigure:ValidateConfigurationDescriptor fail \n",0,0,0,0);                /* Free the memory allocated */                OS_FREE (pDeviceDescriptor);                /* Free the memory allocated */                OS_FREE (pConfigDescriptor);                return USBHST_INVALID_PARAMETER ;			}/* end of if(USBHST_SUCCESS != Result) */             /* This is a valid configuration descriptor */			 pParseConfigDesc = (pUSBHST_CONFIG_DESCRIPTOR)pParseDesc;             break;        default : /* invalid descriptor type */            /* Debug Message */            OS_LOG_MESSAGE_HIGH(                HUB,"usbHubConfigure:InvalidDesc fail \n",0,0,0,0);            /* Free the memory allocated */            OS_FREE (pDeviceDescriptor);             /* Free the memory allocated */            OS_FREE (pConfigDescriptor);            return USBHST_INVALID_PARAMETER ;		}/*end of switch (pParseDesc[1]) */    uDescLength= pParseDesc[0];    /* check are  we jumping off the  descriptor  */    if ( uDescLength + uLengthParsed >= USB_HUB_CONFIG_wTotalLength((UINT8 *)                                                           pParseConfigDesc))	{        break;    }/* end of if ( uDescLength + ....)*/     /* update the length parsed */     uLengthParsed += uDescLength ;     /*     * move the pointer to the next desc by adding the length of     * descriptor to the pointer     */     pParseDesc =(UINT8 *) ( ((UINT32)pParseDesc)+(UINT32)uDescLength);     uCount ++;     }/* end of  while(uCount < 3)    */    /* Validate if the  descriptor have arrived in correct sequence */    if(1!= ( USB_VALIDATE_DESCRIPTOR_SEQUENCE(uDescriptorSequence)                & (uCount <= 3)))	{        OS_LOG_MESSAGE_HIGH(            HUB,"usbHubConfigure:InvalidDescSequence fail \n",0,0,0,0);        /* Free the memory allocated */        OS_FREE (pDeviceDescriptor);        /* Free the memory allocated */        OS_FREE (pConfigDescriptor);         return USBHST_INVALID_PARAMETER ;	}/* end of if(1!= ( USB_VALIDATE_DESCRIPTOR_SEQUENCE(uDescriptorSequence).....)*/     /*     * Call USBHST_SetConfiguration() with configuration value and device     * handle. if failed:     * i.    Call OS_FREE() to free the configuration buffer.     * ii.   Return result.     */    Result= usbHstSetConfiguration ( uDeviceHandle,                                      USB_DEF_ACTIVE_HUB_CONFIG_INDEX);    /* Check the result */    if (USBHST_SUCCESS != Result)    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,"usbHubConfigure:setconf fail R=0x%x \n",Result,0,0,0);        /* Free the memory allocated */        OS_FREE (pDeviceDescriptor);        /* Free the memory allocated */        OS_FREE (pConfigDescriptor);        return Result;            } /* End of (USBHST_SUCCESS !=Result ) */    /* Set the Hub Descriptor length as 6 */    uLength = 6;    /*      * Call HUB_GetHubDescriptor() for uDeviceHandle,     * HUB_DESCRIPTOR and for 6 bytes. If call fails,     * i.    Call OS_FREE() to free the configuration buffer.     * ii.   Return USBHST_FAILURE.     */    Result= usbHubGetDescriptor(uDeviceHandle, /* Device Handle */                                 /* buffer to copy to */                                 (UINT8 *)pHubDescriptor,                                 /* Size of the descriptor */                                 &uLength);    /* Check the result */    if ( (USBHST_SUCCESS != Result) ||(6 != uLength) )    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,            "usbHubConfigureHub:gethubdesc fail R=0x%x L=%d\n",            Result,            uLength,            0,            0);        /* Free the memory allocated */        OS_FREE (pDeviceDescriptor);        /* Free the memory allocated */        OS_FREE (pConfigDescriptor);        return Result;    } /* End of (USBHST_SUCCESS !=Result ) */    /*     * Get the Power requirement of the hub      * - Do a get status to the hub.     * If the current status returns that the hub is     * self powered, it can supply 500 mA per port     * if it is bus powered, it can supply 100mA per port     */    Result = usbHstGetStatus(uDeviceHandle, /* Device Handle */                              USBHST_RECIPIENT_DEVICE, /* uRecipient */                              0,  /* Index */                              (UCHAR *) &uStatusOfHub);  /* Buffer */    /* Check the result */    if ( (USBHST_SUCCESS != Result) ||(6 != uLength) )    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,            "usbHubConfigure:getStatusOfDevice fail R=0x%x \n",            Result,            0,            0,            0);        /* Free the memory allocated */        OS_FREE (pDeviceDescriptor);        /* Free the memory allocated */        OS_FREE (pConfigDescriptor);        return Result;    } /* End of (USBHST_SUCCESS !=Result ) */    /* swap */    uStatusOfHub = OS_UINT16_LE_TO_CPU(uStatusOfHub);        /* Parse the number of ports from the hub descriptor.*/    uNumPorts=USB_HUB_DESC_bNbrPorts(pHubDescriptor);    /*     * Call OS_MALLOC() to allocate HUB_BYTE_GRANURALITY(number of ports + 1)     * bytes of status change data buffer. If failed,     * i.    Call OS_FREE() to free the configuration buffer.     * ii.    Return USBHST_INSUFFICIENT_MEMORY.     */    uLength= USB_HUB_BYTE_GRANULARITY(uNumPorts + 1);    /* allocate the memory */    pStatusChangeData= OS_MALLOC(uLength);    /* Check the result */    if (NULL == pStatusChangeData)    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,            "usbHubConfigure:INSUFF MEMORY-pStatusChngData %d\n",uLength,0,0,0);                    /* Free the memory allocated */        OS_FREE (pDeviceDescriptor);       /* Free the memory allocated */        OS_FREE (pConfigDescriptor);        return USBHST_INSUFFICIENT_MEMORY;    } /* End of (USBHST_SUCCESS !=Result ) */    /* allocate the memory */    pStatusData= OS_MALLOC(uLength);    /* Check the result */     if (NULL == pStatusData)    {        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,"usbHubConfigure:INSUFF MEMORY-pStatusData %d\n",uLength,0,0,0);        /* Free the memory allocated */        OS_FREE (pDeviceDescriptor);        OS_FREE (pConfigDescriptor);        /* Free the memory allocated */        OS_FREE (pStatusChangeData);        return USBHST_INSUFFICIENT_MEMORY;    } /* End of (USBHST_SUCCESS !=Result ) */    /* Clear the allocated buffer for status change data. */    OS_MEMSET(pStatusChangeData,0,uLength);    /* Clear the allocated buffer for the status data. */    OS_MEMSET(pStatusData,0,uLength);    /*     * Call OS_MALLOC() to allocate memory for HUB_INFO as     * sizeof(USB_HUB_INFO)+ ((number of ports-1)*sizeof(PHUB_PORT_INFO)) bytes.     * If Failed,     * i.    Call OS_FREE() to free the configuration buffer.     * ii.    Call OS_FREE() to free the status change buffer.     * iii.    Return USBHST_INSUFFICIENT_MEMORY.     */    /*     * This is an over allocation of the HUB_INFO structure.     * this allows us to access pPortList[n] count for all the ports.     * [<------------->y][y][y][y]...     * [<------------->y] is the normal size of HUB_INFO with pPortList[1]     * If there are two ports then it should be pPortList[2]. or:     * [<------------->yy]     * and so on.. we shud be still be able to access pPortList[uPortIndex].     * hence we allocate     * [<------------->y] bytes + (number of ports-1) * sizeof(y)     * thus for 5 ports we get automatically get     * [<------------->y]followed by[y][y][y][y] in one single memory chunk.     */    pNewHub=OS_MALLOC( sizeof(USB_HUB_INFO)+                       ((uNumPorts-1)* sizeof(pUSB_HUB_PORT_INFO)));    /* Check the result */    if (NULL == pNewHub)    {        /* Free the memory allocated */        OS_FREE (pDeviceDescriptor);        /* Free the memory allocated */        OS_FREE (pConfigDescriptor);        /* Free the memory allocated */        OS_FREE (pStatusChangeData);        /* Free the memory allocated */        OS_FREE (pStatusData);        /* Debug Message */        OS_LOG_MESSAGE_HIGH(            HUB,            "usbHubConfigure:INSUFF MEMORY-pNewHub: %d\n",            sizeof(USB_HUB_INFO)+((uNumPorts-1)* sizeof(pUSB_HUB_PORT_INFO)),            0,            0,            0);        return USBHST_INSUFFICIENT_MEMORY;    } /* End of (USBHST_SUCCESS !=Result ) */    /* Clear the allocated structure.*/    OS_MEMSET(pNewHub,0,        sizeof(USB_HUB_INFO)+((uNumPorts-1)* sizeof(pUSB_HUB_PORT_INFO)) );    /*Here we find the TT Organization  */    /* this switch checks the bDeviceProtocol field in device descriptor */    switch(pParseDeviceDesc->bDeviceProtocol)	{    case 0 :        /* this hub does not support TT */        pNewHub->uHubTTInfo = 0;        break;    case 1 :        /* this is a single TT Hub */        if(pParseInterfaceDesc->bInterfaceProtocol == 0)		{            pNewHub->uHubTTInfo = 1;		}/* end of if(pParseInterfaceDesc ....*/        /* invalid parameters in descriptor */        else		{            /* Debug Message */            OS_LOG_MESSAGE_HIGH(            HUB,"usbHubConfigure:InvalidInterfaceDesc fail \n",0,0,0,0);            /* Free the memory allocated */             OS_FREE (pDeviceDescriptor);            /* Free the memory allocated */             OS_FREE (pConfigDescriptor);            /* Free the memory allocated */            OS_FREE (pStatusChangeData);            /* Free the memory allocated */            OS_FREE (pStatusData);            /* Free the memory allocated */             OS_FREE (pNewHub);             return USBHST_INVALID_PARAMETER ;		}/* end of else  */        break;     case 2 :         /* check if we have recieved default i/f and alternate i/f descriptor*/        if(uDescriptorSequence == 0x24210)		{             /* this is a multiple TT hub */            if(pParseAlternateInterfaceDesc->bInterfaceProtocol == 2)			{                pNewHub->uHubTTInfo = 2;			}  /*  if != 2 then .....*/		}/* end of if(uDescriptorSequence == 0x24210) */        /* invalid descriptor */        else		{             /* Debug Message */             OS_LOG_MESSAGE_HIGH(                 HUB,"usbHubConfigure:InvalidAltInterfaceDesc fail \n",0,0,0,0);             /* Free the memory allocated */             OS_FREE (pDeviceDescriptor);             /* Free the memory allocated */             OS_FREE (pConfigDescriptor);             /* Free the memory allocated */             OS_FREE (pStatusChangeData);             /* Free the memory allocated */             OS_FREE (pStatusData);             /* Free the memory allocated */             OS_FREE (pNewHub);             return USBHST_INVALID_PARAMETER ;		} /* end of else */        break ;     default :          /* Debug Message */          OS_LOG_MESSAGE_HIGH(            HUB,"usbHubConfigure:UnknownInterfaceDesc fail \n",0,0,0,0);            /* Free the memory allocated */            OS_FREE (pDeviceDescriptor);            /* Free the memory allocated */             OS_FREE (pConfigDescriptor);            /* Free the memory allocated */            OS_FREE (pStatusChangeData);

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷av一区二区三区大白胸| 欧美三级电影一区| 亚洲一卡二卡三卡四卡无卡久久| 欧美大白屁股肥臀xxxxxx| eeuss鲁一区二区三区| 婷婷六月综合亚洲| 亚洲免费av高清| 国产日产亚洲精品系列| 91精品国产综合久久精品| 色综合激情久久| 成人综合婷婷国产精品久久免费| 七七婷婷婷婷精品国产| 亚洲综合久久久| 国产精品激情偷乱一区二区∴| 精品国产一区二区国模嫣然| 欧美日韩日日摸| 91免费精品国自产拍在线不卡| 国产麻豆一精品一av一免费| 麻豆精品久久久| 日韩精品色哟哟| 亚洲超碰97人人做人人爱| 亚洲免费观看高清完整| 中文字幕一区二区三区视频| 精品国产自在久精品国产| 91精品黄色片免费大全| 在线中文字幕一区| 91免费版在线看| 不卡在线视频中文字幕| 成人性生交大片免费看视频在线 | 亚洲一区二区三区免费视频| 中文字幕日韩精品一区| 欧美激情中文不卡| 亚洲国产精品99久久久久久久久| 精品国内片67194| 精品国产凹凸成av人网站| 欧美一激情一区二区三区| 欧美日韩国产经典色站一区二区三区 | 在线观看国产91| 色婷婷狠狠综合| 99麻豆久久久国产精品免费优播| 成人一道本在线| 高清国产一区二区| 国产91综合网| 国产福利精品一区| 成av人片一区二区| 色综合天天性综合| 色婷婷国产精品综合在线观看| 色婷婷国产精品综合在线观看| 日韩精品最新网址| 欧美成人午夜电影| 久久新电视剧免费观看| 国产网站一区二区| 欧美激情一区在线| 亚洲色图视频免费播放| 一区二区三区av电影 | 精品无人区卡一卡二卡三乱码免费卡| 日本女人一区二区三区| 麻豆视频一区二区| 国产高清不卡二三区| 成人av集中营| 欧美婷婷六月丁香综合色| 欧美一区三区二区| 久久久久国产一区二区三区四区| 日本一区二区三区四区在线视频| 综合av第一页| 日本亚洲欧美天堂免费| 国产剧情一区二区| 91亚洲精品乱码久久久久久蜜桃| 欧美视频在线一区| 精品欧美一区二区久久| 国产精品天干天干在观线| 一级中文字幕一区二区| 日本成人在线电影网| 国产激情偷乱视频一区二区三区| 91蝌蚪porny| 91精品国产91热久久久做人人| 久久久99精品免费观看不卡| 亚洲免费电影在线| 久88久久88久久久| 99久久99精品久久久久久| 宅男噜噜噜66一区二区66| 国产欧美精品一区aⅴ影院| 亚洲免费av高清| 国模无码大尺度一区二区三区| 色老汉av一区二区三区| 欧美成人精品3d动漫h| 国产精品久久久久影院色老大 | 亚洲色图清纯唯美| 免费成人小视频| 91性感美女视频| 精品国产乱码久久久久久牛牛 | 精品污污网站免费看| 2020日本不卡一区二区视频| 亚洲精品国产a| 国产乱对白刺激视频不卡| 欧美日韩高清一区| 亚洲手机成人高清视频| 国产在线看一区| 欧美精品久久久久久久久老牛影院| 亚洲国产精品成人综合| 麻豆freexxxx性91精品| 91国内精品野花午夜精品| 国产欧美日韩另类一区| 首页欧美精品中文字幕| 91丨porny丨首页| 久久先锋资源网| 毛片av一区二区| 欧美男人的天堂一二区| 亚洲精品国产一区二区精华液 | 日韩精品久久久久久| 99re视频精品| 久久久午夜精品理论片中文字幕| 奇米综合一区二区三区精品视频 | 精品国产髙清在线看国产毛片| 一区二区三区美女视频| av动漫一区二区| 国产天堂亚洲国产碰碰| 国产一区二区三区久久久| 91精品国产麻豆| 亚洲成人午夜电影| 欧美综合天天夜夜久久| 国产精品久久久久久户外露出 | 亚洲成人精品一区| 91国产免费看| 亚洲男人的天堂在线观看| 岛国av在线一区| 国产日产精品1区| 国产激情视频一区二区三区欧美| 久久久五月婷婷| 国产麻豆精品在线观看| 26uuu久久天堂性欧美| 久久99国产乱子伦精品免费| 欧美一区二区视频免费观看| 三级久久三级久久| 欧美视频一区二| 香蕉av福利精品导航| 欧美日本免费一区二区三区| 午夜精品久久久久久久99水蜜桃 | 在线视频欧美区| 樱桃国产成人精品视频| 欧美主播一区二区三区美女| 亚洲综合色视频| 欧美日韩另类国产亚洲欧美一级| 亚洲国产日韩a在线播放| 欧美视频一区二区三区四区 | 色婷婷综合久久久| 亚洲精品国产无天堂网2021| 欧美午夜在线观看| 婷婷综合五月天| 日韩精品中文字幕在线一区| 国产一区不卡精品| 欧美国产精品劲爆| 92精品国产成人观看免费| 一区二区三区鲁丝不卡| 91精品在线观看入口| 久久99久久精品| 久久精品欧美一区二区三区不卡 | 成人丝袜视频网| 亚洲欧美日韩电影| 337p亚洲精品色噜噜| 狠狠色丁香婷综合久久| 国产精品第13页| 欧美日韩一区中文字幕| 蜜桃av噜噜一区| 欧美激情自拍偷拍| 欧美日韩在线不卡| 国产美女一区二区三区| 亚洲特级片在线| 日韩一卡二卡三卡| 粉嫩绯色av一区二区在线观看| 亚洲精品免费视频| 精品国产乱子伦一区| 色吊一区二区三区| 久久国产日韩欧美精品| 中文字幕一区日韩精品欧美| 555夜色666亚洲国产免| 成人中文字幕合集| 亚洲1区2区3区视频| 欧美国产成人精品| 欧美人与性动xxxx| 国产suv精品一区二区6| 亚洲第一成人在线| 国产精品乱子久久久久| 91精品国产综合久久国产大片| 成人av免费观看| 美腿丝袜亚洲综合| 亚洲免费观看高清完整版在线| 精品久久免费看| 91蜜桃婷婷狠狠久久综合9色| 美女在线视频一区| 亚洲精品视频在线| 久久久久久免费网| 欧美一区欧美二区| 91福利精品视频| 成人毛片在线观看| 激情综合网天天干| 亚洲国产精品天堂| 国产精品不卡一区| 精品粉嫩超白一线天av| 欧美三级在线播放|