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

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

?? usbhcdlib.c

?? Vxworks5.5的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一区二区三区免费野_久草精品视频
91免费小视频| 精品国产乱码久久久久久闺蜜 | 日韩精品资源二区在线| 国产欧美一区二区三区沐欲| 亚洲bdsm女犯bdsm网站| 国产成人精品免费一区二区| 91麻豆精品国产91久久久使用方法 | 亚洲人吸女人奶水| 极品少妇xxxx精品少妇偷拍| 91成人网在线| 国产美女一区二区三区| 欧美肥妇bbw| 亚洲在线视频一区| 91麻豆成人久久精品二区三区| 精品久久久影院| 日本欧美大码aⅴ在线播放| 一本色道久久综合亚洲aⅴ蜜桃 | 亚洲裸体xxx| 国产中文字幕一区| 日韩亚洲欧美成人一区| 日韩不卡在线观看日韩不卡视频| 欧美日韩亚洲综合一区| 亚洲自拍偷拍麻豆| 在线一区二区三区四区五区| 最新日韩在线视频| 日韩视频中午一区| 日本不卡视频在线观看| 欧美精品乱码久久久久久按摩| 亚洲综合精品久久| 欧美三级视频在线播放| 亚洲国产视频一区| 欧美日韩视频在线观看一区二区三区 | 一本大道av一区二区在线播放| 最新国产成人在线观看| 91网站在线播放| 亚洲色图在线播放| 日本精品视频一区二区三区| 国产一区二区三区综合| 国产亚洲精品7777| 不卡区在线中文字幕| 中文字幕不卡一区| 色综合久久天天综合网| 亚洲自拍偷拍图区| 日韩欧美一卡二卡| 国产在线精品免费av| 天堂成人免费av电影一区| 日韩欧美一区二区三区在线| 国产在线精品视频| 亚洲欧洲制服丝袜| 欧美巨大另类极品videosbest| 日本欧美在线观看| 久久综合一区二区| 99国产精品久久久久久久久久久| 国产精品系列在线观看| 综合久久综合久久| 91精品啪在线观看国产60岁| 国产在线观看一区二区| 亚洲丝袜精品丝袜在线| 欧美一区二区久久| 成人一区二区在线观看| 亚洲国产成人av网| 亚洲大片一区二区三区| 欧美一级电影网站| 成人久久18免费网站麻豆| 亚洲自拍与偷拍| 久久综合久久久久88| 91极品视觉盛宴| 激情久久五月天| 一区二区三区在线观看欧美| 一区二区久久久| 欧美xxxxx裸体时装秀| hitomi一区二区三区精品| 午夜久久电影网| 欧美激情综合五月色丁香| 欧美久久久久久久久| 风间由美一区二区av101| 午夜国产精品一区| 国产精品国产三级国产普通话99 | 日本韩国欧美国产| 国产一区二区三区精品视频| 一区二区三区日韩| 日韩电影在线免费观看| 亚洲欧洲av另类| 精品国产免费一区二区三区四区| 91网页版在线| 欧美日韩国产免费一区二区 | 风流少妇一区二区| 亚洲一区免费观看| 欧美国产1区2区| 精品黑人一区二区三区久久| 欧美性生活久久| caoporen国产精品视频| 久久99精品久久久久久国产越南| 国产乱一区二区| 日韩激情视频网站| 亚洲高清久久久| 亚洲丝袜美腿综合| 国产精品久久久久久久久免费丝袜| 欧美一级夜夜爽| 欧美精选一区二区| 欧美做爰猛烈大尺度电影无法无天| 7777精品伊人久久久大香线蕉超级流畅| 国产成人精品免费网站| 激情都市一区二区| 国产一区二区在线影院| 日本午夜一本久久久综合| 中文字幕亚洲综合久久菠萝蜜| 欧美成人一区二区| 自拍偷拍国产精品| 成人欧美一区二区三区黑人麻豆| 久久精品亚洲一区二区三区浴池| 日韩欧美国产综合一区| 欧美一级欧美三级在线观看| 日韩一区二区麻豆国产| 欧美一区二区私人影院日本| 在线综合视频播放| 日韩一区二区电影网| 亚洲摸摸操操av| 亚洲婷婷在线视频| 樱花影视一区二区| 一区二区三区精品视频| 亚洲一区二区三区美女| 亚洲高清免费在线| 蜜桃视频一区二区三区在线观看| 日韩国产精品大片| 亚洲.国产.中文慕字在线| 成人av在线观| 91免费国产在线观看| 国产精品视频第一区| 宅男噜噜噜66一区二区66| 日韩美一区二区三区| 精品国产乱码久久久久久牛牛 | 精品少妇一区二区三区| 日韩欧美中文字幕公布| 精品久久久久久久久久久院品网| 久久婷婷色综合| 国产精品色噜噜| 亚洲国产视频直播| 国产尤物一区二区| 色呦呦日韩精品| 在线播放中文字幕一区| 亚洲成人一区二区| 久久精品免费观看| av中文字幕不卡| 欧美高清你懂得| 国产亚洲福利社区一区| 亚洲综合成人在线| 久久精品国产99国产| 99久久久精品| 日韩欧美一级二级三级久久久| 国产欧美日韩在线看| 成人黄色在线网站| 中文字幕在线不卡一区| 亚洲国产日韩精品| 国产一区二区三区美女| 欧美性猛片xxxx免费看久爱| 欧美电影免费观看高清完整版在线观看 | 51精品视频一区二区三区| 婷婷国产v国产偷v亚洲高清| 国产福利一区在线| 欧美精品电影在线播放| 日本一二三不卡| 日韩av电影免费观看高清完整版| www.欧美.com| 久久蜜桃av一区精品变态类天堂| 亚洲精品国产精华液| 国产精品综合久久| 欧美美女一区二区在线观看| 久久成人久久爱| 欧美性猛片xxxx免费看久爱| 日本一区二区视频在线| 伦理电影国产精品| 欧美婷婷六月丁香综合色| 中文在线资源观看网站视频免费不卡 | 成人av在线资源| 亚洲精品一区二区三区99| 国产白丝精品91爽爽久久| 精品久久久三级丝袜| 日本欧美在线观看| 欧美日韩免费一区二区三区 | 久久99九九99精品| 欧美福利视频导航| 亚洲网友自拍偷拍| 91亚洲午夜精品久久久久久| 日本午夜一区二区| 欧美三级韩国三级日本三斤| 亚洲裸体在线观看| 91麻豆swag| 亚洲色图在线看| 91在线国产观看| 中文字幕一区二区三区在线观看| 国产盗摄一区二区| 国产亚洲精品福利| 成人小视频在线| 中文字幕精品一区二区三区精品| 91精品中文字幕一区二区三区| 亚洲第一久久影院| 制服丝袜亚洲色图| 日本中文字幕不卡| 日韩欧美亚洲另类制服综合在线 |