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

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

?? usbmouselib.c

?? This the compressed USB driver source code for vxworks5.6. It has device controller driver and other
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* usbMouseLib.c - USB mouse class drive with vxWorks SIO interface *//* Copyright 2000-2002 Wind River Systems, Inc. *//*modification history--------------------01g,30oct04,hch  SPR #101127 and 9873101f,15oct04,ami  Apigen Changes01e,03aug04,ami  Warning Messages Removed01e,12jan04,cfc  merge synchronization fix01d,23sep03,cfc  Fixed Idle timeout issue01c,29oct01,wef  Remove automatic buffer creations and repalce with OSS_MALLOC.01b,20mar00,rcb  Re-write code to fetch maxPacketSize from endpoint descriptor	 	 on machines which don't support non-aligned word access.	 	 Allocate "report" structure separately from SIO_CHAN in order	 	 to avoid cache problems on MIPS platform.01a,07oct99,rcb  written.*//*DESCRIPTIONThis module implements the USB mouse class driver for the vxWorks operatingsystem.  This module presents an interface which is a superset of the vxWorksSIO (serial IO) driver model.  That is, this driver presents the external APIswhich would be expected of a standard "multi-mode serial (SIO) driver" andadds certain extensions which are needed to address adequately the requirementsof the hot-plugging USB environment.USB mice are described as part of the USB "human interface device" classspecification and related documents.  This driver concerns itself only with USBdevices which claim to be mouses as set forth in the USB HID specificationand ignores other types of human interface devices (i.e., keyboard).  USBmice can operate according to either a "boot protocol" or to a "reportprotocol".  This driver enables mouses for operation using the bootprotocol.Unlike most SIO drivers, the number of channels supported by this driver is notfixed.	Rather, USB mice may be added or removed from the system at anytime.  This creates a situation in which the number of channels is dynamic, andclients of usbMouseLib.c need to be made aware of the appearance and disappearance of channels.  Therefore, this driver adds an additional set offunctions which allows clients to register for notification upon the insertionand removal of USB mice, and hence the creation and deletion of channels.This module itself is a client of the Universal Serial Bus Driver (USBD).  Allinteraction with the USB buses and devices is handled through the USBD.INITIALIZATIONAs with standard SIO drivers, this driver must be initialized by callingusbMouseDevInit().  usbMouseDevInit() in turn initializes its connection to the USBD and other internal resources needed for operation.  Unlike some SIO drivers, there are no usbMouseLib.c data structures which need to be initialized prior to calling usbMouseDevInit().Prior to calling usbMouseDevInit(), the caller must ensure that the USBDhas been properly initialized by calling - at a minimum - usbdInitialize().It is also the caller's responsibility to ensure that at least one USB HCD(USB Host Controller Driver) is attached to the USBD - using the USBD functionusbdHcdAttach() - before mouse operation can begin.  However, it is not necessary for usbdHcdAttach() to be alled prior to initializating usbMouseLib.c.usbMouseLib.c uses the USBD dynamic attach services and is capable of recognizing USB keboard attachment and removal on the fly.  Therefore, it is possible for USB HCDs to be attached to or detached from the USBD at run time- as may be required, for example, in systems supporting hot swapping ofhardware.usbMouseLib.c does not export entry points for transmit, receive, and errorinterrupt entry points like traditional SIO drivers.  All "interrupt" drivenbehavior is managed by the underlying USBD and USB HCD(s), so there is noneed for a caller (or BSP) to connect interrupts on behalf of usbMouseLib.c.For the same reason, there is no post-interrupt-connect initialization codeand usbKeboardLib.c therefore also omits the "devInit2" entry point.OTHER FUNCTIONSusbMouseLib.c also supports the SIO ioctl interface.  However, attempts toset parameters like baud rates and start/stop bits have no meaning in the USBenvironment and will be treated as no-ops.  DATA FLOWFor each USB mouse connected to the system, usbMouseLib.c sets up aUSB pipe to monitor input from the mouse.  usbMouseLib.c supports only theSIO "interrupt" mode of operation.  In this mode, the application must install a "report callback" through the driver's callbackInstall() function.  Thiscallback is of the form:\cstypedef STATUS (*REPORT_CALLBACK)    (    void *arg,    pHID_MSE_BOOT_REPORT pReport    );\ceusbMouseLib.c will invoke this callback for each report received.  The STATUSreturned by the callback is ignored by usbMouseLib.c.  If the application isunable to accept a report, the report is discarded.  The report structure isdefined in usbHid.h, which is included automatically by usbMouseLib.h.usbMouseLib.c does not support output to the mouse.  Therefore, calls tothe txStartup() and pollOutput() functions will fail.  INCLUDE FILES: sioLib.h, usbMouseLib.h*//* includes */#include "vxWorks.h"#include "string.h"#include "sioLib.h"#include "errno.h"#include "ctype.h"#include "usb/usbPlatform.h"#include "usb/ossLib.h" 	/* operations system srvcs */#include "usb/usb.h"		/* general USB definitions */#include "usb/usbListLib.h"	/* linked list functions */#include "usb/usbdLib.h"	/* USBD interface */#include "usb/usbLib.h" 	/* USB utility functions */#include "usb/usbHid.h" 	/* USB HID definitions */#include "drv/usb/usbMouseLib.h"    /* our API *//* defines */#define MSE_CLIENT_NAME "usbMouseLib"	    /* our USBD client name *//* If your hardware platform has problems sharing cache lines, then define * CACHE_LINE_SIZE below so that critical buffers can be allocated within * their own cache lines. */#define CACHE_LINE_SIZE     16/* typedefs *//* * ATTACH_REQUEST */typedef struct attach_request    {    LINK reqLink;	    /* linked list of requests */    USB_MSE_ATTACH_CALLBACK callback;	/* client callback routine */    pVOID callbackArg;		/* client callback argument */    } ATTACH_REQUEST, *pATTACH_REQUEST;/* USB_MSE_SIO_CHAN is the internal data structure we use to track each USB * mouse. */typedef struct usb_mse_sio_chan    {    SIO_CHAN sioChan;		/* must be first field */    LINK sioLink;	    /* linked list of mouse structs */    UINT16 lockCount;		/* Count of times structure locked */    USBD_NODE_ID nodeId;	/* mouse node Id */    UINT16 configuration;	/* configuration/interface reported as */    UINT16 interface;		/* a mouse by this device */    BOOL connected;	    /* TRUE if mouse currently connected */    UINT16 intMaxPacketSize;	    /* max pkt size for interrupt pipe */    USBD_PIPE_HANDLE pipeHandle;    /* USBD pipe handle for interrupt pipe */    USB_IRP irp;	    /* IRP to monitor interrupt pipe */    BOOL irpInUse;	    /* TRUE while IRP is outstanding */    pUINT8 pIrpBfr;	    /* bfr for boot report */    pHID_MSE_BOOT_REPORT pReport;   /* points to pIrpBfr */    int mode;		    /* SIO_MODE_INT or SIO_MODE_POLL */    STATUS (*getTxCharCallback) (void *,...); /* tx callback */    void *getTxCharArg; 	/* tx callback argument */    STATUS (*putRxCharCallback) (void *, ...); /* rx callback */    void *putRxCharArg; 	/* rx callback argument */    STATUS (*putReportCallback) (void *,...); /* report callback */    void *putReportArg; 	/* report callback argument */    } USB_MSE_SIO_CHAN, *pUSB_MSE_SIO_CHAN;/* forward static declarations */LOCAL int usbMouseTxStartup (SIO_CHAN * pSioChan);LOCAL int usbMouseCallbackInstall (SIO_CHAN *pSioChan, int callbackType,    STATUS (*callback)(void *, ...), void *callbackArg);LOCAL int usbMousePollOutput (SIO_CHAN *pSioChan, char	outChar);LOCAL int usbMousePollInput (SIO_CHAN *pSioChan, char *thisChar);LOCAL int usbMouseIoctl (SIO_CHAN *pSioChan, int request, void *arg);LOCAL VOID usbMouseIrpCallback (pVOID p);/* locals */LOCAL UINT16 initCount = 0;	/* Count of init nesting */LOCAL MUTEX_HANDLE mseMutex;	    /* mutex used to protect internal structs */LOCAL LIST_HEAD sioList;	/* linked list of USB_MSE_SIO_CHAN */LOCAL LIST_HEAD reqList;	/* Attach callback request list */LOCAL USBD_CLIENT_HANDLE usbdHandle; /* our USBD client handle *//* Channel function table. */LOCAL SIO_DRV_FUNCS usbMouseSioDrvFuncs =    {    usbMouseIoctl,    usbMouseTxStartup,    usbMouseCallbackInstall,    usbMousePollInput,    usbMousePollOutput    };/***************************************************************************** interpMseReport - interprets USB mouse BOOT report** Interprets a mouse boot report and updates channel state as* appropriate.** RETURNS: N/A** ERRNO: none**\NOMANUAL*/LOCAL VOID interpMseReport    (    pUSB_MSE_SIO_CHAN pSioChan    )    {    pHID_MSE_BOOT_REPORT pReport = pSioChan->pReport;    /* Validate report */    if (pSioChan->irp.bfrList [0].actLen >= sizeof (HID_MSE_BOOT_REPORT))    {    /* invoke receive callback */    if (pSioChan->putReportCallback != NULL)	{	(*pSioChan->putReportCallback) (pSioChan->putReportArg, pReport);	}    }    }/***************************************************************************** usbMouseIoctl - special device control** This routine is largely a no-op for the usbMouseLib.	The only ioctls* which are used by this module are the SIO_AVAIL_MODES_GET and SIO_MODE_SET.** RETURNS: OK on success, ENOSYS on unsupported request, EIO on failed* request.** ERRNO: none**\NOMANUAL*/LOCAL int usbMouseIoctl    (    SIO_CHAN *pChan,	    /* device to control */    int request,	/* request code */    void *someArg	/* some argument */    )    {    pUSB_MSE_SIO_CHAN pSioChan = (pUSB_MSE_SIO_CHAN) pChan;    int arg = (int) someArg;    switch (request)    {    case SIO_MODE_SET:	/* Set driver operating mode: must be interrupt */	if (arg != SIO_MODE_INT)	return EIO;	pSioChan->mode = arg;	return OK;    case SIO_MODE_GET:	/* Return current driver operating mode for channel */	*((int *) arg) = pSioChan->mode;	return OK;    case SIO_AVAIL_MODES_GET:	/* Return modes supported by driver. */	*((int *) arg) = SIO_MODE_INT;	return OK;    case SIO_OPEN:	/* Channel is always open. */	return OK;    case SIO_BAUD_SET:    case SIO_BAUD_GET:    case SIO_HW_OPTS_SET:   /* optional, not supported */    case SIO_HW_OPTS_GET:   /* optional, not supported */    case SIO_HUP:	/* hang up is not supported */    default:	    /* unknown/unsupported command. */	return ENOSYS;    }    }/***************************************************************************** usbMouseTxStartup - start the interrupt transmitter** The USB mouse SIO driver does not support output to the mouse.** RETURNS: EIO** ERRNO: none**\NOMANUAL*/LOCAL int usbMouseTxStartup    (    SIO_CHAN *pChan	/* channel to start */    )    {    return EIO;    }/***************************************************************************** usbMouseCallbackInstall - install ISR callbacks to get/put chars** This driver allows interrupt callbacks for transmitting characters* and receiving characters.=** RETURNS: OK on success, or ENOSYS for an unsupported callback type.** ERRNO: none**\NOMANUAL*/ LOCAL int usbMouseCallbackInstall    (    SIO_CHAN *pChan,	    /* channel */    int callbackType,	    /* type of callback */    STATUS (*callback) (void *, ...),  /* callback */    void *callbackArg	    /* parameter to callback */    )    {    pUSB_MSE_SIO_CHAN pSioChan = (pUSB_MSE_SIO_CHAN) pChan;    switch (callbackType)    {    case SIO_CALLBACK_GET_TX_CHAR:	pSioChan->getTxCharCallback = callback;	pSioChan->getTxCharArg = callbackArg;	return OK;    case SIO_CALLBACK_PUT_RCV_CHAR:	pSioChan->putRxCharCallback = callback;	pSioChan->putRxCharArg = callbackArg;	return OK;    case SIO_CALLBACK_PUT_MOUSE_REPORT:	pSioChan->putReportCallback = callback;	pSioChan->putReportArg = callbackArg;	return OK;    default:	return ENOSYS;    }    }/***************************************************************************** usbMousePollOutput - output a character in polled mode** The USB mouse SIO driver does not support output to the mouse.** RETURNS: EIO** ERRNO: none**\NOMANUAL*/LOCAL int usbMousePollOutput    (    SIO_CHAN *pChan,    char outChar    )    {    return EIO;    }/***************************************************************************** usbMousePollInput - poll the device for input** This function polls the mouse device for input** RETURNS: ENOSYS** ERRNO: none**\NOMANUAL*/LOCAL int usbMousePollInput    (    SIO_CHAN *pChan,    char *thisChar    )    {    return ENOSYS;    }/***************************************************************************** initMseIrp - Initialize IRP to listen for input on interrupt pipe** This function initializes the IRP to listen tn interrupt pipe for input** RETURNS: TRUE if able to submit IRP successfully, else FALSE** ERRNO: none**\NOMANUAL*/LOCAL BOOL initMseIrp    (    pUSB_MSE_SIO_CHAN pSioChan    )    {    pUSB_IRP pIrp = &pSioChan->irp;    /* Initialize IRP */    memset (pIrp, 0, sizeof (*pIrp));    pIrp->userPtr = pSioChan;    pIrp->irpLen = sizeof (*pIrp);    pIrp->userCallback = usbMouseIrpCallback;    pIrp->timeout = USB_TIMEOUT_NONE;    pIrp->transferLen = sizeof (HID_MSE_BOOT_REPORT);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费毛片app| 亚洲va天堂va国产va久| 亚洲男帅同性gay1069| 亚洲午夜日本在线观看| 日本成人在线网站| 国产aⅴ综合色| 欧美亚洲国产一区在线观看网站| 欧美久久久久久蜜桃| 国产午夜精品美女毛片视频| 亚洲精品大片www| 蜜桃av一区二区在线观看 | 日本一区二区三区在线不卡 | 欧美影院一区二区三区| 欧美成人一级视频| 亚洲欧美偷拍三级| 久久精品国产精品亚洲精品 | 国产精品国产三级国产aⅴ中文 | 色94色欧美sute亚洲线路一ni| 欧美日韩视频在线观看一区二区三区 | 久久久久久久久久久久久夜| 亚洲欧美日韩一区| 久久er99热精品一区二区| 91色综合久久久久婷婷| 欧美第一区第二区| 亚洲免费成人av| 国产一区二区在线影院| 日本道免费精品一区二区三区| 精品欧美久久久| 一区二区三区在线不卡| 国产福利一区二区三区| 91精品国产色综合久久不卡电影| 中国色在线观看另类| 免费看日韩精品| 一本大道av伊人久久综合| 精品国产人成亚洲区| 亚洲一区二区五区| 成人动漫一区二区在线| 精品动漫一区二区三区在线观看| 亚洲综合激情另类小说区| 国产成人亚洲综合a∨婷婷图片| 欧美嫩在线观看| 一区二区三区在线视频播放| 国产99久久久国产精品潘金| 欧美一卡二卡三卡| 亚洲一区二区精品3399| 91蜜桃婷婷狠狠久久综合9色| www亚洲一区| 久久国产免费看| 欧美日韩高清影院| 亚洲激情欧美激情| 99久久精品国产观看| 中文字幕第一页久久| 国产在线视频不卡二| 日韩一区二区精品葵司在线| 亚洲成人av福利| 欧日韩精品视频| 亚洲精品视频在线观看免费| 成人教育av在线| 国产欧美一区视频| 国内精品国产成人国产三级粉色| 日韩午夜激情视频| 日韩av一区二区在线影视| 欧美日韩精品是欧美日韩精品| 亚洲猫色日本管| 色婷婷亚洲综合| 艳妇臀荡乳欲伦亚洲一区| 日本精品免费观看高清观看| 亚洲免费观看高清| 日本精品免费观看高清观看| 一区二区三区在线免费视频 | 夜夜精品视频一区二区| 91尤物视频在线观看| 国产精品久久一级| 成人高清伦理免费影院在线观看| 国产精品三级在线观看| 99久久er热在这里只有精品66| 国产欧美一区二区在线观看| 成人午夜免费电影| 国产精品国产三级国产普通话三级 | 91在线码无精品| 亚洲精品欧美二区三区中文字幕| 色丁香久综合在线久综合在线观看| 亚洲免费资源在线播放| 欧美亚洲国产一区二区三区| 午夜影院久久久| 8v天堂国产在线一区二区| 蜜臀精品久久久久久蜜臀| 精品福利一区二区三区| 国产成人精品影院| 亚洲人成7777| 欧美日韩免费在线视频| 日本va欧美va精品| 精品第一国产综合精品aⅴ| 国产a视频精品免费观看| 最新国产成人在线观看| 欧美午夜宅男影院| 日韩vs国产vs欧美| 亚洲精品一区二区在线观看| 丰满亚洲少妇av| 亚洲黄色免费电影| 欧美一区二区三区播放老司机| 国产一区亚洲一区| 国产精品盗摄一区二区三区| 欧美色区777第一页| 久久99国产精品免费| 国产精品久久久久久久久图文区 | 亚洲欧美电影一区二区| 欧美日韩激情一区二区| 国模无码大尺度一区二区三区 | 色悠悠久久综合| 亚洲福利视频导航| 26uuu欧美| 色综合天天综合网天天狠天天 | 欧美一区午夜视频在线观看| 国产一本一道久久香蕉| 亚洲女人的天堂| 日韩午夜小视频| 91老师片黄在线观看| 日韩高清不卡一区二区三区| 国产喷白浆一区二区三区| 欧美中文一区二区三区| 国产精品综合av一区二区国产馆| 日韩一区日韩二区| 日韩欧美高清在线| 色综合天天综合网天天狠天天| 美女在线一区二区| 亚洲天堂av老司机| 欧美va在线播放| 色婷婷精品久久二区二区蜜臀av| 麻豆91免费看| 亚洲久草在线视频| 26uuuu精品一区二区| 欧美日韩免费一区二区三区视频 | 亚洲理论在线观看| 久久久久久麻豆| 欧美精品乱人伦久久久久久| 国产91丝袜在线播放0| 丝袜亚洲精品中文字幕一区| 国产精品系列在线| 精品国免费一区二区三区| 色琪琪一区二区三区亚洲区| 国产精品99久久久久久宅男| 日韩av一级片| 一区二区三区免费看视频| 国产欧美日韩在线看| 日韩你懂的电影在线观看| 在线亚洲+欧美+日本专区| 粉嫩av一区二区三区粉嫩| 精品无人码麻豆乱码1区2区 | 欧美日韩国产高清一区二区三区 | 国产精品久久久久久久久免费相片| 欧美精品 国产精品| 91麻豆自制传媒国产之光| 国产精品一区二区你懂的| 蜜桃视频在线观看一区二区| 亚洲国产成人va在线观看天堂| 中文字幕一区二区三| 久久久99久久| 久久日一线二线三线suv| 日韩一区二区免费视频| 在线播放91灌醉迷j高跟美女 | 一卡二卡三卡日韩欧美| 国产精品网站导航| 国产亚洲综合性久久久影院| 日韩精品中午字幕| 91精品欧美一区二区三区综合在| 欧美视频一区二区三区四区| 91九色最新地址| 91免费版在线看| 91美女视频网站| 91丨porny丨在线| 99久精品国产| 91亚洲精品乱码久久久久久蜜桃| 成人黄色a**站在线观看| 高清在线不卡av| 成人激情免费视频| 成人黄色大片在线观看| 成人av在线资源网| 成人精品电影在线观看| 成人精品在线视频观看| 成人小视频在线| 成年人网站91| 99精品欧美一区二区蜜桃免费| av电影在线观看一区| 91玉足脚交白嫩脚丫在线播放| 91亚洲精品久久久蜜桃网站| 色拍拍在线精品视频8848| 欧美亚洲自拍偷拍| 欧美色图天堂网| 91麻豆精品国产91久久久久久| 欧美一区二区三区在线观看| 精品国产制服丝袜高跟| 国产性天天综合网| 日本一区二区成人在线| 中文字幕亚洲欧美在线不卡| 亚洲精品自拍动漫在线| 五月天国产精品| 久久精品国产亚洲a| 国产精品一区二区91| 成人黄页在线观看|