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

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

?? usbehcdtransfermanagement.c

?? vxWorks下USB2.0中的EHCI的HCD源碼,極具有參考價(jià)值
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
/* usbEhcdTransferManagement.c - transfer management functions of the EHCD *//* Copyright 2002-2003 Wind River Systems, Inc. *//*modification history--------------------01f,08Sep03,nrv Changed g_HostControllerCount to g_EHCDControllerCount01e,28Jul03,gpd Incorporated the changes after integration testing.01d,23Jul03,gpd Incorporated the changes after testing on MIPS.01c,03Jul03,gpd changed the search algorithm on a delete pipe                cancelling URBs should use the asynch on advance and frame                                            list rollover interrupts.01b,26jun03,gpd changing the code to WRS standards.01a,25apr02,ram written.*//*DESCRIPTIONThis module defines the interfaces which are registered with the USBD duringEHCI Host Controller Driver initialization.INCLUDE FILES: usbhst.h, usbEhcdDataStructures.h, usbEhcdInterfaces.h,               usbEhcdUtil.h, usbEhcdConfig.h, usbEhcdHal.h,               usbEhcdRHEmulation.h, usbEhcdDebug.hSEE ALSO:None*//*INTERNAL ******************************************************************************* * Filename         : EHCD_TransferManagement.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 contains the functions which handle the transfer *                     management requests from the USBD. * * ******************************************************************************//* includes */#include "usb2/usbOsal.h"#include "usb2/BusAbstractionLayer.h"#include "usb2/usbHst.h"#include "usb2/usbEhcdDataStructures.h"#include "usb2/usbEhcdInterfaces.h"#include "usb2/usbEhcdUtil.h"#include "usb2/usbEhcdConfig.h"#include "usb2/usbEhcdHal.h"#include "usb2/usbEhcdRhEmulation.h"#include "usb2/usbHcdInstr.h"/* globals *//* To hold the array of pointers to the HCD maintained data structures */extern pUSB_EHCD_DATA g_pEHCDData[USB_EHCD_MAX_HOST_CONTROLLERS];/* Number of host controllers present in the system */extern UINT32  g_EHCDControllerCount;/***************************************************************************** usbEhcdCreatePipe - creates a pipe specific to an endpoint.** This function creates the host controller driver specific data structure,* creates the queue head if it is a non-isochronous pipe and populates the* <puPipeHandle> parameter with the pointer to the data structure created for* the pipe. <uBusIndex> is the index of the host controller. <uDeviceAddress>* is the address of the device holding the endpoint. <uDeviceSpeed> is the * speed of the device holding the endpoint. <pEndpointDescriptor> is the * pointer to the endpoint descriptor. <uHighSpeedHubInfo> is the high speed* hub information. <puPipeHandle> is the pointer to the handle to the pipe.** RETURNS: *   USBHST_SUCCESS - Returned if the pipe was created successfully.*   USBHST_INVALID_PARAMETER - Returned if the parameters are not valid.*   USBHST_INSUFFICIENT_MEMORY - Returned if the memory allocation *                                for the pipe failed.** ERRNO:*   None.** \NOMANUAL*/USBHST_STATUS usbEhcdCreatePipe    (    UINT8   uBusIndex,          /* Host controller index      */    UINT8   uDeviceAddress,     /* USB device address         */    UINT8   uDeviceSpeed,       /* USB device speed           */    UCHAR  *pEndpointDescriptor,/* Endpoint descriptor        */    UINT16  uHighSpeedHubInfo,  /* High speed hub information */    UINT32 *puPipeHandle        /* Pointer to the pipe handle */    )    {    /* To hold the status of the request */    USBHST_STATUS Status = USBHST_FAILURE;    /* Pointer to the Endpoint Descriptor */    pUSBHST_ENDPOINT_DESCRIPTOR pEndpointDesc = NULL;    /* To hold the pointer to the EHCD maintained pipe data structure */    pUSB_EHCD_PIPE pHCDPipe = NULL;    /* Bandwidth required for this pipe */    UINT32 uBandwidth = 0;    /* Pointer to the HCD specific data structure */    pUSB_EHCD_DATA  pHCDData = NULL;    /* Microframe mask */    UINT32 uUFrameMask = 0;    /* To hold the index of the list */    UINT32 uListIndex = 0;    /* To hold the index into the microframes */    UINT32 uUFrameIndex = 0;    /* To hold the value of the step into the frame list */    UINT32 uStepValue = 0;    /* To hold the control end point */    UINT32 controlEndFlag;    /* To hold the pointer to the Queue Head */    pUSB_EHCD_QH pQH = NULL;	/* WindView Instrumentation */	USB_HCD_LOG_EVENT(		USB_EHCI_WV_TRANSFER,		"usbEhcdCreatePipe() starts",		USB_EHCD_WV_FILTER);    OS_LOG_MESSAGE_LOW(EHCD,"usbEhcdCreatePipe - Entry\n",0,0,0,0);    /* Check the validity of the parameters */    if ((g_EHCDControllerCount <= uBusIndex) ||        (USB_EHCD_MAX_DEVICE_ADDRESS < uDeviceAddress) ||        (NULL == pEndpointDescriptor) ||        (NULL == puPipeHandle))        {        OS_LOG_MESSAGE_HIGH(EHCD,"EHCD_CreatePipe - parameters are not valid\n",0,0,0,0);        return USBHST_INVALID_PARAMETER;        }    /* Extract the global data structure */    pHCDData = g_pEHCDData[uBusIndex];    /* Assert if the global pointer is not valid */    OS_ASSERT(NULL != pHCDData);    /* Check if the request is for the Root hub and route it */    if (uDeviceAddress == pHCDData->RHData.uDeviceAddress)        {        Status = usbEhcdRhCreatePipe(pHCDData,                                     uDeviceAddress,                                     uDeviceSpeed,                                     pEndpointDescriptor,                                     puPipeHandle);        return Status;        }    /* Retrieve the endpoint descriptor */    pEndpointDesc = (pUSBHST_ENDPOINT_DESCRIPTOR)pEndpointDescriptor;    /* Swap the maximum packet size to get it in CPU endian format */    pEndpointDesc->wMaxPacketSize =                        OS_UINT16_LE_TO_CPU(pEndpointDesc->wMaxPacketSize);    /* Check the validity of the endpoint type */    if ((USBHST_ISOCHRONOUS_TRANSFER !=         (pEndpointDesc->bmAttributes & USB_EHCD_ENDPOINT_TYPE_MASK)) &&        (USBHST_INTERRUPT_TRANSFER !=         (pEndpointDesc->bmAttributes & USB_EHCD_ENDPOINT_TYPE_MASK)) &&        (USBHST_CONTROL_TRANSFER !=         (pEndpointDesc->bmAttributes & USB_EHCD_ENDPOINT_TYPE_MASK)) &&        (USBHST_BULK_TRANSFER !=         (pEndpointDesc->bmAttributes & USB_EHCD_ENDPOINT_TYPE_MASK)))        {        OS_LOG_MESSAGE_HIGH(EHCD,"usbEhcdCreatePipe - endpoint types is not valid\n",0,0,0,0);        return USBHST_INVALID_PARAMETER;        }    /* Check if the endpoint type is isochronous or interrupt */    if ((USBHST_ISOCHRONOUS_TRANSFER ==         (pEndpointDesc->bmAttributes & USB_EHCD_ENDPOINT_TYPE_MASK)) ||        (USBHST_INTERRUPT_TRANSFER ==         (pEndpointDesc->bmAttributes & USB_EHCD_ENDPOINT_TYPE_MASK)))        {        /* To hold the maximum packet size for the endpoint */        UINT32 uMaxPacketSize = 0;        /* To hold the status of the bandwidth availability */        BOOLEAN bIsBwAvailable = FALSE;        /* If the device speed is high speed, the payload is         * equal the maxpacketsize * number of packets that can         * be sent in a microframe.         * The bits 0 to 10 give the maximum packet size. The bits 11 and 12         * give the (number of packets in a microframe - 1).         */        if (USBHST_HIGH_SPEED == uDeviceSpeed)            {            uMaxPacketSize =            ((pEndpointDesc->wMaxPacketSize) &             USB_EHCD_ENDPOINT_MAX_PACKET_SIZE_MASK) *            ((((pEndpointDesc->wMaxPacketSize) &               USB_EHCD_ENDPOINT_NUMBER_OF_TRANSACTIONS_MASK) >> 11) + 1);            }        /* If it is low or full speed, the maximum packet size is the same         * as that retrieved from the endpoint descriptor         */        else            {            uMaxPacketSize = pEndpointDesc->wMaxPacketSize;            }        /* Calculate the bandwidth which is required for this pipe */        uBandwidth = usbEhcdCalculateBusTime(                                            uDeviceSpeed,                                            (pEndpointDesc->bEndpointAddress) & USB_EHCD_DIR_IN,                                            (pEndpointDesc->bmAttributes) & USB_EHCD_ENDPOINT_TYPE_MASK,                                            uMaxPacketSize);        /* Check if this bandwidth can be accomodated */        bIsBwAvailable = usbEhcdCheckBandwidth(pHCDData,                                               uBandwidth,                                               uDeviceSpeed,                                               pEndpointDesc,                                               &uListIndex,                                               &uUFrameMask,                                               &uStepValue);        /* If bandwidth is not available, return an error */        if (FALSE == bIsBwAvailable)            {            OS_LOG_MESSAGE_HIGH(EHCD,"usbEhcdCreatePipe - bandwidth is not available\n",0,0,0,0);            return USBHST_INSUFFICIENT_BANDWIDTH;            }        }    /* Allocate memory for the USB_EHCD_PIPE data structure */    pHCDPipe = (pUSB_EHCD_PIPE)OS_MALLOC(sizeof(USB_EHCD_PIPE));    /* Check if memory allocation is successful */    if (NULL == pHCDPipe)        {        OS_LOG_MESSAGE_HIGH(EHCD,"usbEhcdCreatePipe - Memory not allocated for EHCD pipe\n",0,0,0,0);        return USBHST_MEMORY_NOT_ALLOCATED;        }    /* Update the pointer to the pipe handle */    *puPipeHandle = (UINT32)pHCDPipe;    /* Initialize the pipe data structure */    USB_EHCD_PIPE_INITIALIZE(pHCDPipe);    /* Update the endpoint speed */    pHCDPipe->uSpeed = uDeviceSpeed;    /* Update the device address which holds the endpoint */    pHCDPipe->uAddress = uDeviceAddress;    /* Update the high speed hub information */    pHCDPipe->uHubInfo = uHighSpeedHubInfo;    /* Update the type of endpoint to be created */    pHCDPipe->uEndpointType =    (pEndpointDesc->bmAttributes) & USB_EHCD_ENDPOINT_TYPE_MASK;    /* Update the direction of the endpoint */    pHCDPipe->uEndpointDir =    ((pEndpointDesc->bEndpointAddress & USB_EHCD_DIR_IN) >> USB_EHCD_DIR_BIT_POSITION) & 0x1;    /* Update Endpoint address */    pHCDPipe->uEndpointAddress = pEndpointDesc->bEndpointAddress;    /* Store the maximum packet size - for high speed includes the number     * of transactions in a microframe also     */    pHCDPipe->uMaximumPacketSize = pEndpointDesc->wMaxPacketSize;    /* If it is an interrupt or isochronous endpoint, update the bandwidth */    if ((USBHST_ISOCHRONOUS_TRANSFER == pHCDPipe->uEndpointType) ||        (USBHST_INTERRUPT_TRANSFER == pHCDPipe->uEndpointType))        {        /* To hold the status of the bandwidth reservation */        BOOLEAN bStatus = FALSE;        /* Update the bandwidth occupied by the endpoint */        pHCDPipe->uBandwidth = uBandwidth;        /* Copy the list index */        pHCDPipe->uListIndex = uListIndex;        /* Copy the mask value */        pHCDPipe->uUFrameMaskValue = uUFrameMask;        /* Update the tree node bandwidth if it is an interrupt endpoint */        if (USBHST_INTERRUPT_TRANSFER == pHCDPipe->uEndpointType)            {            /* Copy the list index */            pHCDPipe->uListIndex = uListIndex;            /* Exclusively access the bandwidth resource */            OS_WAIT_FOR_EVENT(pHCDData->BandwidthEventID,OS_WAIT_INFINITE);            /* This loop will update the tree bandwidth for every microframe */            for (uUFrameIndex = 0;                USB_EHCD_MAX_MICROFRAME_NUMBER > uUFrameIndex;                uUFrameIndex++)                {                /* Check if bandwidth is to be updated for this                 * microframe and update the bandwidth                 */                if (0 != ((uUFrameMask >> uUFrameIndex) & 0x01))                    {                    pHCDData->TreeListData[uListIndex].uBandwidth[uUFrameIndex]                    += uBandwidth;                    }                }            /* Release the bandwidth exclusive access */            OS_RELEASE_EVENT(pHCDData->BandwidthEventID);            /* Update the overall bandwidth */            bStatus = usbEhcdUpdateBandwidth(pHCDData);            /*             * If the bandwidth reservation is not successful,             * release the bandwidth             */            if (FALSE == bStatus)

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91猫先生在线| 4438x成人网最大色成网站| 视频一区二区不卡| 欧美极品少妇xxxxⅹ高跟鞋| 精品视频在线视频| 成人综合在线观看| 老汉av免费一区二区三区| 亚洲欧洲综合另类在线| 国产午夜精品理论片a级大结局 | 蜜臀久久久久久久| 亚洲视频每日更新| 欧美激情在线看| 日韩欧美一区电影| 欧美日韩视频在线一区二区| 成人免费视频app| 国产一区二区日韩精品| 蜜芽一区二区三区| 婷婷综合久久一区二区三区| 亚洲精品乱码久久久久久日本蜜臀| 久久久久高清精品| 日韩精品在线看片z| 91麻豆精品久久久久蜜臀| 色婷婷久久99综合精品jk白丝| 粉嫩aⅴ一区二区三区四区五区| 精品系列免费在线观看| 日本一不卡视频| 午夜精品福利在线| 亚洲成人免费视| 亚洲一区二区高清| 一个色在线综合| 亚洲精品videosex极品| 国产精品丝袜91| 中文字幕日韩av资源站| 国产精品理伦片| 亚洲欧美综合在线精品| 亚洲视频一区二区在线| 亚洲人午夜精品天堂一二香蕉| 国产精品久久久久久久久快鸭| 国产精品美女久久久久久2018 | 日本二三区不卡| av午夜精品一区二区三区| 成人动漫一区二区在线| 成人a区在线观看| 色综合天天性综合| 欧洲视频一区二区| 欧美日韩国产另类不卡| 91精品中文字幕一区二区三区| 日韩欧美一区中文| xnxx国产精品| 欧美激情一区三区| 亚洲欧美日韩小说| 性做久久久久久免费观看欧美| 日韩电影在线观看电影| 极品美女销魂一区二区三区免费 | 欧美伊人久久大香线蕉综合69| 91免费视频观看| 欧美三级电影精品| 日韩一级黄色大片| 久久综合给合久久狠狠狠97色69| 中文字幕成人av| 亚洲国产视频a| 日本aⅴ亚洲精品中文乱码| 狠狠色综合播放一区二区| 成人黄色软件下载| 欧美日韩一区小说| 精品入口麻豆88视频| 成人欧美一区二区三区在线播放| 亚洲午夜精品在线| 精品一区二区三区影院在线午夜| 高清国产一区二区| 欧美视频在线观看一区| 久久综合久久久久88| 日韩美女久久久| 毛片基地黄久久久久久天堂| 国产一本一道久久香蕉| 91国偷自产一区二区开放时间| 欧美一级理论片| 亚洲欧洲无码一区二区三区| 亚洲成精国产精品女| 国产成人一区在线| 欧美日韩美少妇| 国产精品另类一区| 热久久免费视频| 99麻豆久久久国产精品免费| 欧美一区二区三区在线| 国产精品欧美一区喷水| 日韩精品一二区| 91香蕉视频mp4| 久久新电视剧免费观看| 亚洲国产欧美在线| 国产成人精品一区二区三区四区 | 欧美日韩国产一二三| 久久精品网站免费观看| 无码av免费一区二区三区试看 | 91成人网在线| 久久先锋资源网| 日韩精品1区2区3区| 91在线一区二区三区| 久久久国产午夜精品| 午夜精品福利视频网站| 91免费国产在线观看| 国产欧美日韩另类视频免费观看 | 97久久超碰精品国产| 91精品国产一区二区| 亚洲天堂av一区| 国产v日产∨综合v精品视频| 91麻豆精品国产综合久久久久久| 亚洲欧美日韩一区| 成人精品国产免费网站| 久久综合九色综合久久久精品综合| 亚洲mv在线观看| 欧美优质美女网站| 中文字幕在线一区二区三区| 国产福利视频一区二区三区| 日韩欧美你懂的| 日韩精品久久理论片| 精品视频免费看| 亚洲综合激情网| 在线一区二区视频| 亚洲三级在线播放| av在线综合网| 国产精品热久久久久夜色精品三区| 国模娜娜一区二区三区| 日韩一区二区三| 日韩和欧美的一区| 欧美高清精品3d| 日韩高清不卡一区二区三区| 欧美日韩情趣电影| 亚洲丰满少妇videoshd| 欧美日本一道本在线视频| 午夜免费久久看| 91精品国产综合久久蜜臀| 青青草91视频| 日韩一区二区在线观看视频| 日本视频一区二区三区| 欧美一级片在线观看| 免费看黄色91| 2023国产精华国产精品| 国产高清久久久久| 国产精品美女久久久久aⅴ | 国产电影精品久久禁18| 国产人妖乱国产精品人妖| 懂色av中文字幕一区二区三区| 欧美国产一区在线| av资源网一区| 亚洲成人av一区二区| 欧美一级二级在线观看| 国产乱码精品一品二品| 国产精品久久久久影视| 91一区二区三区在线观看| 一区二区三区免费在线观看| 欧美性色黄大片| 日韩高清不卡在线| 久久久久久久国产精品影院| 国产成a人亚洲精| 亚洲视频一区二区在线观看| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 亚洲国产成人精品视频| 日韩免费电影网站| 播五月开心婷婷综合| 亚洲国产综合色| 26uuu色噜噜精品一区| 成人aa视频在线观看| 亚洲丶国产丶欧美一区二区三区| 欧美一区二区三区系列电影| 国产91高潮流白浆在线麻豆| 一区二区三区四区激情| 日韩视频国产视频| 成人国产精品免费观看视频| 亚洲网友自拍偷拍| 久久亚洲精精品中文字幕早川悠里| 99精品视频中文字幕| 美女爽到高潮91| 国产精品电影院| 日韩午夜精品视频| 91在线你懂得| 精品综合久久久久久8888| 国产精品精品国产色婷婷| 日韩一区和二区| 色综合视频一区二区三区高清| 青青草国产精品亚洲专区无| 最新热久久免费视频| 日韩视频免费观看高清在线视频| av亚洲产国偷v产偷v自拍| 毛片不卡一区二区| 亚洲黄色免费网站| 久久久久久久综合日本| 欧美日韩激情在线| av亚洲精华国产精华| 国产在线国偷精品产拍免费yy| 一区二区三区视频在线看| 久久精子c满五个校花| 欧美男人的天堂一二区| av中文字幕不卡| 国产精品中文字幕日韩精品 | 黄色成人免费在线| 亚洲成人激情社区| 亚洲视频图片小说| 国产欧美日韩三级| 精品国产乱码久久|