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

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

?? usbehcdtransfermanagement.c

?? vxWorks下USB2.0中的EHCI的HCD源碼,極具有參考價值
?? C
?? 第 1 頁 / 共 5 頁
字號:
            {            OS_LOG_MESSAGE_HIGH(EHCD,"usbEhcdIsBandwidthAvailable - Current descriptor should be NULL\n",0,0,0,0);            return USBHST_INVALID_PARAMETER;            }        /* Get the current configuration descriptor */        pCurrentConfigDesc =        (pUSBHST_CONFIG_DESCRIPTOR)pCurrentDescriptor;        /* Get the new configuration descriptor */        pNewConfigDesc =        (pUSBHST_CONFIG_DESCRIPTOR)pNewDescriptor;        }    /*     * If it is not an interface or configuration descriptor,     * then it is an error     */    else        {        OS_LOG_MESSAGE_HIGH(EHCD,"Descriptor type is not valid\n",0,0,0,0);        return USBHST_INVALID_PARAMETER;        }    OS_LOG_MESSAGE_LOW(EHCD,"usbEhcdIsBandwidthAvailable - Exit\n",0,0,0,0);#endif    /* Return success */    return USBHST_SUCCESS;    }/* End of usbEhcdIsBandwidthAvailable() *//***************************************************************************** usbEhcdSubmitURB - submits a request to a pipe.** This function is used to submit a request to the pipe. <uBusIndex> specifies* the host controller bus index. <uPipeHandle> holds the pipe handle. <pURB>* is the pointer to the URB holding the request details.** RETURNS: *   USBHST_SUCCESS - Returned if the URB is submitted successfully.*   USBHST_INVALID_PARAMETER - Returned if the parameters are not valid.*   USBHST_INSUFFICIENT_BANDWIDTH - Returned if memory is insufficient for the*       request.** ERRNO:*   None.** \NOMANUAL*/USBHST_STATUS usbEhcdSubmitURB    (    UINT8  uBusIndex,        /* Index of the host controller */    UINT32   uPipeHandle,    /* Pipe handle */    pUSBHST_URB  pURB        /* Pointer to the URB */    )                        {    /* To hold the pointer to the data structure */    pUSB_EHCD_DATA pHCDData = NULL;    /* To hold the PID value */    UINT32 pId;    /* Pointer to the HCD maintained pipe */    pUSB_EHCD_PIPE pHCDPipe = NULL;    /* To hold the request information */    pUSB_EHCD_REQUEST_INFO  pRequestInfo = NULL;    /* To hold the status of the request */    USBHST_STATUS Status = USBHST_FAILURE;    /* To hold the status of the function call */    BOOLEAN bStatus = FALSE;    /* Pointer to the QTD */    pUSB_EHCD_QTD pQTD = NULL;    /* To hold the current frame index */    UINT32 uFrameNumber = 0;	/* WindView Instrumentation */	USB_HCD_LOG_EVENT(		USB_EHCI_WV_TRANSFER,		"usbEhcdSubmitURB() starts",		USB_EHCD_WV_FILTER);    OS_LOG_MESSAGE_LOW(EHCD,"usbEhcdSubmitURB - Entry\n",0,0,0,0);    /* Check the validity of the parameters */    if ((g_EHCDControllerCount <= uBusIndex) ||        (0 == uPipeHandle) ||        (NULL == pURB))        {        OS_LOG_MESSAGE_HIGH(EHCD,"usbEhcdSubmitURB - 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);    /* Extract the USB_EHCD_PIPE data structure */    pHCDPipe = (pUSB_EHCD_PIPE)uPipeHandle;    /* Check if the request is for the Root hub and route it */    if ((pHCDData->RHData.pInterruptPipe == pHCDPipe) ||        (pHCDData->RHData.pControlPipe == pHCDPipe) ||        ((pHCDData->pDefaultPipe == pHCDPipe) &&         (0 == pHCDData->RHData.uDeviceAddress)))        {        Status = usbEhcdRHSubmitURB(pHCDData,                                    uPipeHandle,                                    pURB);        return Status;        }    /* Exclusively access the list */    OS_WAIT_FOR_EVENT(pHCDData->RequestSynchEventID,OS_WAIT_INFINITE);    /* It is of the assumption that the USBD always gives a valid pipe handle.     * This also includes not giving a submit URB request while the pipe     * is being deleted.     */    /* Allocate the request information structure */    pRequestInfo =    (pUSB_EHCD_REQUEST_INFO)OS_MALLOC(sizeof(USB_EHCD_REQUEST_INFO));    /* Check if memory allocation is successful */    if (NULL == pRequestInfo)        {        OS_LOG_MESSAGE_HIGH(EHCD,"usbEhcdSubmitURB - Memory not allocated for the request info\n",0,0,0,0);        /* Release the event */        OS_RELEASE_EVENT(pHCDData->RequestSynchEventID);        return USBHST_MEMORY_NOT_ALLOCATED;        }    /* Initialize the fields of the data structure */    OS_MEMSET(pRequestInfo, 0, sizeof(USB_EHCD_REQUEST_INFO));    /* Copy the URB pointer */    pRequestInfo->pUrb = pURB;    /* Store the USB_EHCD_PIPE pointer */    pRequestInfo->pHCDPipe = pHCDPipe;    /* Check if it is a control transfer request */    if (USBHST_CONTROL_TRANSFER == pHCDPipe->uEndpointType)        {        /* To hold the number of bytes to be transferred */        UINT32 uNumBytes = 0;        /* Pointer to the setup packet */        pUSBHST_SETUP_PACKET pSetup = NULL;        /* Retrieve the setup packet information */        pSetup = (pUSBHST_SETUP_PACKET)(pURB->pTransferSpecificData);        /* Swap the 16 bit values */        pSetup->wValue = OS_UINT16_LE_TO_CPU(pSetup->wValue);        pSetup->wIndex = OS_UINT16_LE_TO_CPU(pSetup->wIndex);        pSetup->wLength = OS_UINT16_LE_TO_CPU(pSetup->wLength);        /* create TD for the SETUP TRANSACTION */        pQTD = usbEhcdFormEmptyQTD();        /* Check if QTD is created successfully */        if (NULL == pQTD)            {            OS_LOG_MESSAGE_HIGH(EHCD,"usbEhcdSubmitURB - Head TD is not created\n",0,0,0,0);            /* Release memory allocated for the request element */            OS_FREE(pRequestInfo);                        /* Release the event */            OS_RELEASE_EVENT(pHCDData->RequestSynchEventID);            return USBHST_INSUFFICIENT_BANDWIDTH;            }        /* Update the buffer pointer fields of the TD */        uNumBytes = usbEhcdFillQTDBuffer(pQTD,                                         pURB->pTransferSpecificData,                                         sizeof(USBHST_SETUP_PACKET),                                         pHCDPipe->uMaximumPacketSize);        /* Check if the buffer pointer fields are updated */        if (0 == uNumBytes)            {            OS_LOG_MESSAGE_HIGH(EHCD,"usbEhcdSubmitURB - Head TD is not created\n",0,0,0,0);            /* Add the QH to the free list             * Nothing can be done with return value             */            usbEhcdAddToFreeQTDList(pQTD);            /* Release memory allocated for the request element */            OS_FREE(pRequestInfo);                        /* Release the event */            OS_RELEASE_EVENT(pHCDData->RequestSynchEventID);            return USBHST_FAILURE;            }        /* Update the data toggle bit */        USB_EHCD_SET_BITFIELD(QTD,                              pQTD->uTransferInfo,                              0,                              TOKEN_DT);        /* Indicate that it is a SETUP token */        USB_EHCD_SET_BITFIELD(QTD,                              pQTD->uTransferInfo,                              USB_EHCD_SETUP_PID,                              TOKEN_PID_CODE);        /* Copy the TD to the head of the request */        pRequestInfo->pHead = (VOID *)pQTD;        /* create qTD for the STATUS TRANSACTION */        pQTD = usbEhcdFormEmptyQTD();        /* Check if QTD is created successfully */        if (NULL == pQTD)            {            OS_LOG_MESSAGE_HIGH(EHCD,"usbEhcdSubmitURB - Status TD is not created\n",0,0,0,0);            /* Add the head TD to the free list */            usbEhcdAddToFreeQTDList((pUSB_EHCD_QTD)pRequestInfo->pHead);            /* Release memory allocated for the request element */            OS_FREE(pRequestInfo);                        /* Release the event */            OS_RELEASE_EVENT(pHCDData->RequestSynchEventID);            return USBHST_INSUFFICIENT_BANDWIDTH;            }        /* Update the buffer pointer fields of the TD */        usbEhcdFillQTDBuffer(pQTD, (VOID *) NULL, 0, pHCDPipe->uMaximumPacketSize);        /* update the data toggle field */        USB_EHCD_SET_BITFIELD(QTD,                              pQTD->uTransferInfo,                              1,                              TOKEN_DT);        /* Indicate that an interrupt is to be         * generated on completion of the status stage         */        USB_EHCD_SET_BITFIELD(QTD,                              pQTD->uTransferInfo,                              1,                              TOKEN_IOC);        /* Indicate that there are no elements after the status stage */        pQTD->pNext = NULL;        /* Based on the direction of data transfer, update the status         * stage direction. The status stage would be in a direction         * opposite to the data stage direction.         */        pId = (0 != (pSetup->bmRequestType & USB_EHCD_DIR_IN))?                                    USB_EHCD_OUT_PID:USB_EHCD_IN_PID;        USB_EHCD_SET_BITFIELD(QTD,                              pQTD->uTransferInfo,                              pId,                              TOKEN_PID_CODE);        /* Make this as the tail */        pRequestInfo->pTail = (VOID *)pQTD;        /* Flush the contents of the cache to the RAM */    	CACHE_DMA_FLUSH(pQTD, sizeof(USB_EHCD_QTD));        /* Invalidate the cache */    	CACHE_DMA_INVALIDATE(pQTD, sizeof(USB_EHCD_QTD));        /* Create TDs for the DATA TRANSACTION */        if (0 != pURB->uTransferLength)            {            /* Pointer to the head of the data TD list */            pUSB_EHCD_QTD pDataHead = NULL;            /* Pointer to the tail of the data TD list */            pUSB_EHCD_QTD pDataTail = NULL;            /* To hold the PID value */            UINT8 uPid = (0 != (pSetup->bmRequestType & USB_EHCD_DIR_IN))?                         USB_EHCD_IN_PID:USB_EHCD_OUT_PID;            /* Create the TD chain for the data stage */            bStatus = usbEhcdCreateQTDs(&pDataHead,                                        &pDataTail,                                        pURB->pTransferBuffer,                                        pURB->uTransferLength,                                        pHCDPipe->uMaximumPacketSize,                                        1,                                        uPid);            /* Check if the TDs are not created successfully */            if (FALSE == bStatus)                {                OS_LOG_MESSAGE_HIGH(EHCD,"usbEhcdSubmitURB - Data TDs not created\n",0,0,0,0);                /* Add the head TD to the free list */                usbEhcdAddToFreeQTDList((pUSB_EHCD_QTD)pRequestInfo->pHead);                /* Add the tail TD to the free list */                usbEhcdAddToFreeQTDList((pUSB_EHCD_QTD)pRequestInfo->pTail);                /* Release memory allocated for the request element */                OS_FREE(pRequestInfo);                            /* Release the event */                OS_RELEASE_EVENT(pHCDData->RequestSynchEventID);                return USBHST_FAILURE;                }            /* Store the head of the Request list */            pQTD = (pUSB_EHCD_QTD)pRequestInfo->pHead;            /* Update the next element of the head of the request */            pQTD->pNext = pDataHead;            /* Update the HC's link pointers */            USB_EHCD_SET_BITFIELD(QTD,                                  pQTD->uNextQTDPointer,                                  (((unsigned)USB_EHCD_CONVERT_TO_PCI(pDataHead))                                   >> 5),                                  NEXTQTD_POINTER);            /* Indicate that the head element of             * the request is not the last element in the list             */            USB_EHCD_SET_BITFIELD(QTD,                                  pQTD->uNextQTDPoint

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
9l国产精品久久久久麻豆| 精品国产电影一区二区| 91精品国产综合久久精品app| 日韩一区二区视频| 亚洲色图一区二区| 国产综合久久久久久鬼色| 色狠狠一区二区| 久久久久97国产精华液好用吗| 一片黄亚洲嫩模| 成人午夜伦理影院| 精品久久久久久久一区二区蜜臀| 一区二区三区在线观看欧美| 国产99精品视频| 欧美变态口味重另类| 亚洲精品视频在线观看网站| 国产麻豆欧美日韩一区| 7777精品伊人久久久大香线蕉经典版下载| 中文字幕av在线一区二区三区| 男人的天堂亚洲一区| 在线看日韩精品电影| 国产精品欧美经典| 国产精品中文字幕一区二区三区| 中文字幕一区av| 国产精品伊人色| 日韩美女主播在线视频一区二区三区| 亚洲第一成人在线| 欧美中文字幕不卡| 亚洲国产日韩综合久久精品| 91麻豆精品在线观看| 亚洲色图在线播放| 一本色道a无线码一区v| 有码一区二区三区| 91官网在线免费观看| 亚洲特级片在线| 色综合一区二区| 亚洲精品老司机| 欧美天堂一区二区三区| 亚洲一二三区在线观看| 欧美天堂亚洲电影院在线播放| 亚洲国产成人91porn| 欧美电影在哪看比较好| 热久久久久久久| 久久综合久久鬼色| 国产成人午夜精品影院观看视频| 国产欧美日韩视频一区二区| av不卡在线观看| 亚洲国产精品自拍| 日韩欧美国产一区在线观看| 国产综合色视频| 中文字幕免费不卡| 在线精品亚洲一区二区不卡| 亚洲不卡一区二区三区| 日韩精品一区二区三区四区视频| 美女视频黄频大全不卡视频在线播放| 欧美va亚洲va在线观看蝴蝶网| 国产美女视频一区| 亚洲精品视频在线| 日韩一区二区三区视频在线观看| 精品午夜一区二区三区在线观看| 欧美国产在线观看| 欧美色图片你懂的| 国产在线播放一区| 一区二区三区日韩精品视频| 欧美一级视频精品观看| 高清久久久久久| 天堂久久久久va久久久久| 精品国产乱码久久久久久久| 91在线国内视频| 青青草国产成人99久久| 国产精品免费观看视频| 欧美群妇大交群的观看方式| 国产夫妻精品视频| 丝袜美腿成人在线| 亚洲欧美在线观看| 日韩女优av电影在线观看| 91一区在线观看| 九九国产精品视频| 亚洲国产欧美在线| 日本一区二区三区四区| 6080日韩午夜伦伦午夜伦| 国产91在线观看| 青青草伊人久久| 亚洲欧美一区二区久久| 久久综合色8888| 欧美欧美欧美欧美首页| 91精品国产综合久久福利| 国产a区久久久| 美洲天堂一区二卡三卡四卡视频| 成人免费在线视频观看| 久久综合九色综合欧美98| 欧美日韩一区二区不卡| 91网上在线视频| 成人高清免费观看| 九九精品一区二区| 日韩av一级电影| 一区二区成人在线| 中文字幕亚洲一区二区av在线| 精品噜噜噜噜久久久久久久久试看| 91成人在线观看喷潮| 91色在线porny| 成人免费毛片高清视频| 韩国一区二区视频| 美国av一区二区| 日韩国产精品大片| 午夜精品福利久久久| 亚洲一级在线观看| 亚洲综合区在线| 亚洲自拍偷拍欧美| 一区二区三区精品| 亚洲精品日日夜夜| 中文字幕中文乱码欧美一区二区| 久久久久97国产精华液好用吗| 欧美va天堂va视频va在线| 日韩一级成人av| 日韩视频在线你懂得| 欧美理论电影在线| 欧美久久久久久久久| 欧美精品18+| 欧美一级生活片| 精品国产亚洲在线| 欧美激情艳妇裸体舞| 中文在线资源观看网站视频免费不卡| 久久精品视频在线免费观看| 日韩欧美成人激情| 国产午夜精品久久久久久久| 久久久综合九色合综国产精品| 2021中文字幕一区亚洲| 久久久99精品久久| 国产精品第13页| 亚洲一卡二卡三卡四卡 | 男人操女人的视频在线观看欧美| 亚洲成人在线免费| 久久国产精品区| 国产成人免费9x9x人网站视频| 成人综合激情网| 色94色欧美sute亚洲线路一ni| 在线观看精品一区| 欧美高清视频一二三区 | 日韩高清中文字幕一区| 美女mm1313爽爽久久久蜜臀| 国产精品一二三区在线| 99久久免费精品高清特色大片| 一本色道久久加勒比精品 | 国产女同互慰高潮91漫画| 国产精品不卡在线观看| 午夜精品久久久久久久99水蜜桃| 久久国产生活片100| av综合在线播放| 69成人精品免费视频| 国产欧美日韩不卡| 亚洲一区在线免费观看| 国内精品在线播放| 色一情一乱一乱一91av| 欧美成人vr18sexvr| 亚洲欧洲日本在线| 久久精品国产77777蜜臀| 99精品欧美一区| 日韩一区二区三免费高清| 中文字幕日韩一区| 另类小说视频一区二区| 日本韩国欧美一区| 久久久九九九九| 日韩高清欧美激情| 色88888久久久久久影院按摩| 精品美女一区二区| 亚州成人在线电影| voyeur盗摄精品| 337p日本欧洲亚洲大胆精品| 一区二区三区免费网站| 国产成a人亚洲| 欧美mv日韩mv| 亚洲成a人片在线观看中文| www.在线成人| 久久综合色8888| 日本不卡中文字幕| 欧美日韩在线精品一区二区三区激情 | 亚洲午夜电影在线观看| 国产·精品毛片| 久久免费午夜影院| 久热成人在线视频| 51精品久久久久久久蜜臀| 亚洲乱码中文字幕| 91免费国产在线观看| 国产亚洲精品超碰| 国产综合久久久久久鬼色| 日韩欧美在线123| 日韩黄色小视频| 欧美日韩一区二区三区高清| 夜夜夜精品看看| 色香蕉久久蜜桃| 亚洲婷婷综合久久一本伊一区| 国产99久久久国产精品潘金| 欧美精品一区二区在线播放| 日本不卡的三区四区五区| 欧美疯狂做受xxxx富婆| 亚洲国产成人av网| 欧美日本视频在线| 青青草97国产精品免费观看无弹窗版| 欧美日韩成人在线| 亚洲电影激情视频网站|