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

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

?? usbhcdlib.c

?? vxworks嵌入式實時系統的 usb底層驅動代碼
?? C
字號:
/* usbHcdLib.c - Implements HCD functional API *//* Copyright 2000 Wind River Systems, Inc. *//*Modification history--------------------01e,26jan00,rcb  Change <bytesPerFrame> parameter in usbHcdPipeCreate() to		 <bandwidth> and redefined as UINT32.01d,29nov99,rcb  Remove obsolete function usbHcdBusReset().		 Increase frame number fields to 32 bits.01c,23nov99,rcb  Replace bandwidth alloc/release functions with pipe		 create/destroy functions...generalizes approach for use		 with OHCI HCD.01b,07sep99,rcb  Add support for management callback param in attach.		 Add set-bus-state API.01a,09jun99,rcb  First.*//*DESCRIPTIONThis file implements the functional interface to the HCD.*//* includes */#include "usb/usbPlatform.h"#include "string.h"#include "usb/usbHcdLib.h"	/* our API *//* functions *//***************************************************************************** hrbInit - Initialize an HCD request block** RETURNS: N/A*/LOCAL VOID hrbInit     (    pHRB_HEADER pHrb,     pHCD_NEXUS pNexus,     UINT16 function,    UINT16 totalLen    )    {    memset (pHrb, 0, totalLen);    if (pNexus != NULL)	pHrb->handle = pNexus->handle;    pHrb->function = function;    pHrb->hrbLength = totalLen;    }/***************************************************************************** usbHcdAttach - Attach to the HCD** Attempts to connect the caller to the HCD.  The <param> value is HCD-* implementation-specific.  Returns an HCD_CLIENT_HANDLE if the HCD was* able to initialize properly.	If <pBusCount> is not NULL, also returns* number of buses managed through this nexus.** <callback> is an optional pointer to a routine which should be invoked* if the HCD detects "management events" (e.g., remote wakeup/resume).* <callbackParam> is a caller-defined parameter which will be passed to* the <callback> routine each time it is invoked.** RETURNS: OK, or ERROR if unable to initialize HCD.*/STATUS usbHcdAttach    (    HCD_EXEC_FUNC hcdExecFunc,	    /* HCD's primary entry point */    pVOID param,		    /* HCD-specific param */    USB_HCD_MNGMT_CALLBACK callback,/* management callback */    pVOID callbackParam,	    /* parameter to management callback */    pHCD_NEXUS pNexus,		    /* nexus will be initialized on return */    pUINT16 pBusCount    )    {    HRB_ATTACH hrb;    STATUS s;    /* Initialize HRB */    hrbInit (&hrb.header, NULL, HCD_FNC_ATTACH, sizeof (hrb));    hrb.param = param;    hrb.mngmtCallback = callback;    hrb.mngmtCallbackParam = callbackParam;    /* Execute HRB */    s = (*hcdExecFunc) ((pVOID) &hrb);    /* Return results */        if (pNexus != NULL)	{	pNexus->hcdExecFunc = hcdExecFunc;	pNexus->handle = hrb.header.handle;	}    if (pBusCount != NULL)	*pBusCount = hrb.busCount;    return s;    }/***************************************************************************** usbHcdDetach - Detach from the HCD** Disconnects a caller which has previously attached to an HCD.** RETURNS: OK, or ERROR if unable to shutdown HCD.*/STATUS usbHcdDetach    (    pHCD_NEXUS pNexus		    /* client's nexus */    )    {    HRB_DETACH hrb;    /* Initialize HRB */    hrbInit (&hrb.header, pNexus, HCD_FNC_DETACH, sizeof (hrb));    /* Execute HRB */    return (*pNexus->hcdExecFunc) ((pVOID) &hrb);    }/***************************************************************************** usbHcdSetBusState - sets bus suspend/resume state** Sets the state for <bus> no as specified in <busState>.  <busState>* is a bit mask.  Typically, the caller will set USB_BUS_SUSPEND or* USB_BUS_RESUME to suspend or resume the indicated bus.** RETURNS: OK, or ERROR if unable to place bus in specified state*/STATUS usbHcdSetBusState    (    pHCD_NEXUS pNexus,		    /* client's nexus */    UINT16 busNo,		    /* bus number */    UINT16 busState		    /* desired bus state */    )    {    HRB_SET_BUS_STATE hrb;    /* Initialize HRB */    hrbInit (&hrb.header, pNexus, HCD_FNC_SET_BUS_STATE, sizeof (hrb));    hrb.busNo = busNo;    hrb.busState = busState;    /* Execute HRB */    return (*pNexus->hcdExecFunc) ((pVOID) &hrb);    }/***************************************************************************** usbHcdCurrentFrameGet - Returns current frame number for a bus** Returns the current <pFrameNo> and the frame window, <pFrameWindow>* for the specified bus.** RETURNS: OK, or ERROR if unable to retrieve current frame number.*/STATUS usbHcdCurrentFrameGet    (    pHCD_NEXUS pNexus,		    /* client's nexus */    UINT16 busNo,		    /* bus number */    pUINT32 pFrameNo,		    /* current frame number */    pUINT32 pFrameWindow	    /* size of frame window */    )    {    HRB_CURRENT_FRAME_GET hrb;    STATUS s;    /* Initialize HRB */    hrbInit (&hrb.header, pNexus, HCD_FNC_CURRENT_FRAME_GET, sizeof (hrb));    hrb.busNo = busNo;    /* Execute HRB */    s = (*pNexus->hcdExecFunc) ((pVOID) &hrb);    /* return results */    if (pFrameNo != NULL)	*pFrameNo = hrb.frameNo;    if (pFrameWindow != NULL)	*pFrameWindow = hrb.frameWindow;    return s;    }/***************************************************************************** usbHcdIrpSubmit - Submits an IRP to the HCD for execution** This function passes the <pIrp> to the HCD for scheduling.  The function* returns as soon as the HCD has queued/scheduled the IRP.  The <pIrp>* must include a non-NULL <callback> which will be invoked upon IRP* completion.** RETURNS: OK, or ERROR if unable to submit IRP for transfer.*/STATUS usbHcdIrpSubmit    (    pHCD_NEXUS pNexus,		    /* client's nexus */    HCD_PIPE_HANDLE pipeHandle,     /* pipe to which IRP is directed */    pUSB_IRP pIrp		    /* IRP to be executed */    )    {    HRB_IRP_SUBMIT hrb;    /* Initialize HRB */    hrbInit (&hrb.header, pNexus, HCD_FNC_IRP_SUBMIT, sizeof (hrb));    hrb.pipeHandle = pipeHandle;    hrb.pIrp = pIrp;    /* Execute HRB */    return (*pNexus->hcdExecFunc) ((pVOID) &hrb);    }/***************************************************************************** usbHcdIrpCancel - Requests the HCD to cancel a pending IRP** This function requests the HCD to cancel the specified <pIrp>.  If* the IRP can be canceled before it completes execution normally, its * result will be set to S_usbHcdLib_IRP_CANCELED and the IRPs callback* will be invoked.** There is no guarantee that an IRP, once submitted to the HCD, can be* canceled before it otherwise completes normally (or times out).** RETURNS: OK, or ERROR if unable to cancel transfer.*/STATUS usbHcdIrpCancel    (    pHCD_NEXUS pNexus,		    /* client's nexus */    pUSB_IRP pIrp		    /* IRP to be canceled */    )    {    HRB_IRP_CANCEL hrb;    /* Initialize HRB */    hrbInit (&hrb.header, pNexus, HCD_FNC_IRP_CANCEL, sizeof (hrb));    hrb.pIrp = pIrp;    /* Execute HRB */    return (*pNexus->hcdExecFunc) ((pVOID) &hrb);    }/***************************************************************************** usbHcdPipeCreate - create a pipe and calculate / reserve bus bandwidth** The USBD calls this function to notify the HCD that it is attempting to* create a new pipe.  The USBD passes the type of pipe in <transferType>.** If the pipe is an interrupt or isochronous pipe, the HCD calculates the * amount of time a transfer of a given number of bytes will require on the * bus - measured in nanoseconds (10E-9 seconds).  The formulas used here are * taken from Section 5.9.3 of Revision 1.1 of the USB spec.** If enough bus bandwidth is available, then that amount of bandwidth will* be reserved by the HCD.  Reserved bandwidth must later be released using * usbHcdPipeDestroy().** <transferType>, <direction>, and <speed> should describe the characteristics* of the pipe/transfer as USB_XFRTYPE_xxxx, USB_DIR_xxxx, and USB_SPEED_xxxx,* repsectively.  <packetSize> is the size of packets to be used.** For interrupt pipes, <bandwidth> is the total number of bytes which will * be sent each frame.  For isochronous pipes, <bandwidth> is the number of* bytes per second.  <bandwidth> should be 0 for control and bulk pipes.** The worst-case transfer time is returned in <pTime>.** The HCD will return an HCD_PIPE_HANDLE in <pPipeHandle>.  The USBD will use* this HCD_PIPE_HANDLE to identify the pipe in the future.  ** RETURNS: OK, or ERROR if unable to reserve bandwdith.*/STATUS usbHcdPipeCreate    (    pHCD_NEXUS pNexus,		    /* client's nexus */    UINT16 busNo,		    /* bus number for IRP */    UINT16 busAddress,		    /* bus address of USB device */    UINT16 endpoint,		    /* endpoint on device */    UINT16 transferType,	    /* transfer type */    UINT16 direction,		    /* pipe/transfer direction */    UINT16 speed,		    /* transfer speed */    UINT16 maxPacketSize,	    /* packet size */    UINT32 bandwidth,		    /* bandwidth required by pipe */    UINT16 interval,		    /* service interval */    pUINT32 pTime,		    /* calculated packet time on return */    pHCD_PIPE_HANDLE pPipeHandle    /* HCD pipe handle */    )    {    HRB_PIPE_CREATE hrb;    STATUS s;    /* Initialize HRB */    hrbInit (&hrb.header, pNexus, HCD_FNC_PIPE_CREATE, sizeof (hrb));    hrb.busNo = busNo;    hrb.busAddress = busAddress;    hrb.endpoint = endpoint;    hrb.transferType = transferType;    hrb.direction = direction;    hrb.speed = speed;    hrb.maxPacketSize = maxPacketSize;    hrb.bandwidth = bandwidth;    hrb.interval = interval;    /* Execute HRB */    s = (*pNexus->hcdExecFunc) ((pVOID) &hrb);    /* return results */    if (pTime != NULL)	*pTime = hrb.time;    if (pPipeHandle != NULL)	*pPipeHandle = hrb.pipeHandle;    return s;    }    /***************************************************************************** usbHcdPipeDestroy - destroys pipe and releases previously allocated bandwidth** Destroys the pipe identified by <pipeHandle> and releases any bandwidth used* by the pipe.	** RETURNS: OK, or ERROR if HCD fails to destroy pipe.*/STATUS usbHcdPipeDestroy    (    pHCD_NEXUS pNexus,		    /* client's nexus */    HCD_PIPE_HANDLE pipeHandle	    /* pipe to be destroyed */    )    {    HRB_PIPE_DESTROY hrb;    /* Initialize HRB */    hrbInit (&hrb.header, pNexus, HCD_FNC_PIPE_DESTROY, sizeof (hrb));    hrb.pipeHandle = pipeHandle;    /* Execute HRB */    return (*pNexus->hcdExecFunc) ((pVOID) &hrb);    }	/***************************************************************************** usbHcdPipeModify - modify characteristics of an existing pipe** Two characteristics of a pipe, the device's USB bus address and the * maximum packet size, may change after a pipe is first created.  Typically,* this will happen only with the default control pipe for a given device,* which must be created before issuing SET_ADDRESS to the device and before* reading the device descriptor to determine the maximum packet size supported* by the default control endpoint.  The USBD will typically use this function* to update either the <busAddress> or the <maxPacketSize> for the indicated* <pipeHandle>.  If either <busAddress> or <maxPacketSize> is 0, then the* corresponding pipe attribute remains unchanged.  ** RETURNS: OK, or ERROR if HCD fails to modify pipe*/STATUS usbHcdPipeModify    (    pHCD_NEXUS pNexus,		    /* client's nexus */    HCD_PIPE_HANDLE pipeHandle,     /* pipe to be modified */    UINT16 busAddress,		    /* new bus address or 0 */    UINT16 maxPacketSize	    /* new max packet size or 0 */    )    {    HRB_PIPE_MODIFY hrb;    /* Initialize HRB */    hrbInit (&hrb.header, pNexus, HCD_FNC_PIPE_MODIFY, sizeof (hrb));    hrb.pipeHandle = pipeHandle;    hrb.busAddress = busAddress;    hrb.maxPacketSize = maxPacketSize;    /* Execute HRB */    return (*pNexus->hcdExecFunc) ((pVOID) &hrb);    }	/***************************************************************************** usbHcdSofIntervalGet - retrieves SOF interval for a bus** Returns the SOF interval for <busNo> in <pSofInterval>.  The SOF * interval is expressed in terms of high-speed bit times, and is typically* close to 12,000.** RETURNS: OK, or ERROR if HCD failed to retrieve SOF interval*/STATUS usbHcdSofIntervalGet    (    pHCD_NEXUS pNexus,		    /* client's nexus */    UINT16 busNo,		    /* bus number */    pUINT16 pSofInterval	    /* bfr to receive SOF interval */    )    {    HRB_SOF_INTERVAL_GET_SET hrb;    STATUS s;    /* Initialize HRB */    hrbInit (&hrb.header, pNexus, HCD_FNC_SOF_INTERVAL_GET, sizeof (hrb));    hrb.busNo = busNo;    /* Execute HRB */    s = (*pNexus->hcdExecFunc) ((pVOID) &hrb);    /* return results */    if (pSofInterval != NULL)	*pSofInterval = hrb.sofInterval;    return s;    }	/***************************************************************************** usbHcdSofIntervalSet - sets SOF interval for a bus** Sets the SOF interval for <busNo> to <sofInterval>.  <sofInterval>* must express the new SOF interval in terms of high-speed bit times, and* should be in the neighborhood of 12,000.  Certain HCD implementations* may impose narrower or wider limits on the allowable <sofInterval>.** RETURNS: OK, or ERROR if HCD failed to set SOF interval.*/STATUS usbHcdSofIntervalSet    (    pHCD_NEXUS pNexus,		    /* client's nexus */    UINT16 busNo,		    /* bus number */    UINT16 sofInterval		    /* new SOF interval */    )    {    HRB_SOF_INTERVAL_GET_SET hrb;    /* Initialize HRB */    hrbInit (&hrb.header, pNexus, HCD_FNC_SOF_INTERVAL_SET, sizeof (hrb));    hrb.busNo = busNo;    hrb.sofInterval = sofInterval;    /* Execute HRB */    return (*pNexus->hcdExecFunc) ((pVOID) &hrb);    }	/* End of file. */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
性久久久久久久久久久久| 国产精品看片你懂得| 午夜精品久久一牛影视| 在线免费观看视频一区| 亚洲电影一区二区| 欧美一区二区三区在线观看视频| 日日欢夜夜爽一区| 精品日韩在线一区| 国产精品 欧美精品| 国产精品区一区二区三区| 日本精品一区二区三区高清| 亚洲国产中文字幕在线视频综合| 欧美一区二区三区在线观看视频| 国产在线国偷精品免费看| 国产午夜精品久久久久久久| 色哦色哦哦色天天综合| 日韩中文字幕av电影| 久久久精品免费观看| 在线观看日韩电影| 蜜臀av性久久久久蜜臀aⅴ| 欧美国产成人在线| 欧美日韩亚洲综合一区二区三区 | 国产精品嫩草99a| www.日韩av| 亚洲大片在线观看| 久久精品一区八戒影视| 欧洲一区二区av| 寂寞少妇一区二区三区| 亚洲色图欧美在线| 日韩一区二区视频| 91免费精品国自产拍在线不卡| 婷婷六月综合亚洲| 国产精品视频免费看| 欧美精品电影在线播放| 成人av综合在线| 日韩不卡手机在线v区| 亚洲天堂精品在线观看| 精品福利在线导航| 欧洲色大大久久| 高清不卡一区二区在线| 日本特黄久久久高潮| 亚洲欧美韩国综合色| 久久影院视频免费| 欧美日韩二区三区| 91亚洲国产成人精品一区二三| 精品一二三四区| 一区二区三区高清| 日韩一区有码在线| 久久免费美女视频| 欧美一区二区美女| 精品视频1区2区| 91婷婷韩国欧美一区二区| 狠狠网亚洲精品| 午夜精品免费在线| 一区二区视频在线| 中文字幕乱码日本亚洲一区二区| 精品人在线二区三区| 欧美日韩一区二区三区不卡 | 丝袜脚交一区二区| 亚洲啪啪综合av一区二区三区| 亚洲精品一区二区三区影院 | 欧美视频在线观看一区| 成人午夜精品一区二区三区| 国产麻豆精品久久一二三| 免费成人结看片| 无吗不卡中文字幕| 亚洲va韩国va欧美va精品| 夜夜亚洲天天久久| 亚洲综合激情另类小说区| 亚洲色图在线视频| 亚洲日本一区二区| 一区二区视频在线| 亚洲一区二区精品视频| 亚洲香肠在线观看| 亚洲成av人片在线| 视频一区二区三区入口| 污片在线观看一区二区| 日韩av一级片| 久久精品国产亚洲a| 黑人巨大精品欧美黑白配亚洲| 久久激情综合网| 精品综合免费视频观看| 久久99久久精品| 国产综合色在线视频区| 国产精品69毛片高清亚洲| 国产精品18久久久久久久久久久久| 国模无码大尺度一区二区三区| 国产又粗又猛又爽又黄91精品| 激情六月婷婷久久| 国产伦精一区二区三区| 国产一区二区三区电影在线观看| 国产91精品免费| 91麻豆高清视频| 欧美天天综合网| 欧美日韩欧美一区二区| 91精品国产高清一区二区三区| 日韩三级免费观看| 久久综合色一综合色88| 国产精品美女久久久久高潮| 亚洲你懂的在线视频| 日韩精品乱码免费| 国产精品一区久久久久| 99精品国产一区二区三区不卡| 欧美影视一区二区三区| 欧美成人一区二区三区片免费| 久久精品综合网| 亚洲精品欧美激情| 蜜臀国产一区二区三区在线播放| 国产精品一区二区三区99| 99re视频这里只有精品| 日韩一区二区在线播放| 中文天堂在线一区| 亚洲高清在线精品| 国产精品系列在线播放| 欧美最猛性xxxxx直播| 欧美r级电影在线观看| 亚洲三级在线免费| 免费成人av在线| 97久久超碰国产精品电影| 欧美日精品一区视频| 久久久久久久久久久久电影| 一区二区三区丝袜| 国产精品一区二区果冻传媒| 欧美日韩一级二级| 国产精品久久午夜| 蜜臀av亚洲一区中文字幕| 99久久精品免费看国产| 91精品国产91久久综合桃花| 国产精品不卡在线观看| 日本系列欧美系列| 日本道色综合久久| 欧美激情在线一区二区三区| 三级不卡在线观看| av电影在线观看完整版一区二区| 欧美一区二区高清| 亚洲最大成人综合| 成人高清在线视频| 日韩欧美另类在线| 亚洲一区二区成人在线观看| 极品少妇xxxx精品少妇| 欧美日韩亚洲综合一区| 亚洲视频综合在线| 国产一区二区不卡| 日韩欧美一级二级三级久久久 | 亚洲男同性恋视频| 国产一区二区三区不卡在线观看| 欧美精品丝袜中出| 亚洲福中文字幕伊人影院| 懂色av中文字幕一区二区三区| 欧美日韩日日摸| 亚洲欧美电影一区二区| 99久久久国产精品免费蜜臀| 国产色产综合产在线视频| 精品在线一区二区三区| 欧美高清dvd| 调教+趴+乳夹+国产+精品| 日本精品一区二区三区四区的功能| 国产精品区一区二区三区| 国产成人在线色| 国产女人aaa级久久久级| 国产在线看一区| 精品国产91亚洲一区二区三区婷婷| 一区二区三区四区视频精品免费| 色婷婷国产精品| 亚洲欧美日韩电影| 91老司机福利 在线| 亚洲丝袜另类动漫二区| 91麻豆免费观看| 尤物视频一区二区| 欧美熟乱第一页| 亚洲成人av一区二区三区| 欧美日韩精品专区| 免费成人性网站| 精品国产一区二区精华| 国产一区二区三区免费观看| 日本一区二区三区在线观看| 成人综合婷婷国产精品久久免费| 国产精品视频九色porn| av电影在线观看一区| 亚洲综合清纯丝袜自拍| 欧美年轻男男videosbes| 欧美a一区二区| 欧美精品一区二区在线播放| 韩国成人在线视频| 中文字幕欧美日本乱码一线二线| 91色porny| 图片区日韩欧美亚洲| 久久这里只精品最新地址| 成人午夜电影网站| 亚洲精品久久久蜜桃| 欧美精品成人一区二区三区四区| 另类欧美日韩国产在线| 国产夜色精品一区二区av| 91女人视频在线观看| 午夜精品久久一牛影视| 久久青草国产手机看片福利盒子| 91丨porny丨首页| 日韩中文字幕麻豆| 久久网站热最新地址| 一本大道久久a久久综合婷婷|