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

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

?? ezusbsys.c

?? cy7c68013usbdriver驅動程序,非常方便
?? C
?? 第 1 頁 / 共 5 頁
字號:
//////////////////////////////////////////////////////////////////////
//
// File:      ezusbsys.c
// $Archive: /USB/Drivers/ezusbdrv/ezusbsys.c $
//
// Purpose:
//    General purpose USB device driver
//
// Environment:
//    kernel mode
//
// $Author: Mdn $
//
// $History: ezusbsys.c $           
//  
//  *****************  Version 6  *****************
//  User: Mdn          Date: 9/17/01    Time: 10:54a
//  Updated in $/USB/Drivers/ezusbdrv
//  Fixed memory leak bug in ISO streaming code.  Was setting the
//  PendingTransfers variable to the wrong value and not properly freeing
//  after stopping the ISO stream.
//  
//  *****************  Version 5  *****************
//  User: Mdn          Date: 10/06/00   Time: 10:08a
//  Updated in $/USB/Drivers/ezusbdrv
//  Added IOCTL_EZUSB_SET_FEATURE
//  
//  *****************  Version 4  *****************
//  User: Mdn          Date: 8/17/00    Time: 9:46a
//  Updated in $/USB/Drivers/ezusbdrv
//  added a generic get descriptor function.
//  
//  *****************  Version 3  *****************
//  User: Mdn          Date: 8/04/00    Time: 11:41a
//  Updated in $/USB/Drivers/ezmon
//  added support for monitor download to FX2
//  
//  *****************  Version 2  *****************
//  User: Mdn          Date: 7/21/00    Time: 4:27p
//  Updated in $/USB/Drivers/ezusbdrv
//  Added a Started flag to the device extension.  This flag gets set after
//  the device has successfully Started.  It is used to prevent a potential
//  race condition where an application could get a handle (with
//  CreateFile()) before the device is completely enumerated.
//  
//  *****************  Version 1  *****************
//  User: Tpm          Date: 6/09/00    Time: 6:32p
//  Created in $/USB/Drivers/ezusbdrv
//  
//  *****************  Version 42  *****************
//  User: Mdn          Date: 5/05/00    Time: 10:24a
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  comments
//  
//  *****************  Version 41  *****************
//  User: Mdn          Date: 4/18/00    Time: 2:45p
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  fixed memory leak where I wasn't freeing an URB allocated for
//  vendor/class requests.
//  
//  *****************  Version 40  *****************
//  User: Mdn          Date: 1/21/00    Time: 10:03a
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  modified device removal code to send an abort message to all pipes
//  before proceding with device removal.  This solves the deadlock problem
//  that can occur when a transfer is pending and the device receives a
//  remove message.  Before this change, the driver would block the removal
//  indefinitely waiting for all pending transfers to complete.
//  
//  *****************  Version 39  *****************
//  User: Markm        Date: 12/17/99   Time: 11:17a
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  Removed interface select workaround for an obscure OSR2.1 bug since the
//  driver no longer supports Win95.  Changed interface select so that it
//  selects the first interface/alternate setting in the config descriptor.
//  Before, it was hardcoded to select interface 0, AS 0.  This should
//  allow the driver to handle composite devices more easily, although I
//  haven't tested it.
//  
//  *****************  Version 38  *****************
//  User: Markm        Date: 10/06/99   Time: 1:18p
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  Made changes to Power IRP handling to fix the blue screen on shutdown
//  that was occuring under Win2K.  Specifically, started using PoXXX()
//  calls for handling power IRPs.  See code comments in
//  Ezusb_DispatchPower(). The PoXXX() calls are not supported by Win95, so
//  as of this revision, the driver will no longer work with Windows 95.
//  
//  *****************  Version 37  *****************
//  User: Markm        Date: 5/18/99    Time: 3:37p
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  
//  *****************  Version 36  *****************
//  User: Markm        Date: 4/29/99    Time: 9:48a
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  Fixed IOCTL_EZUSB_VENDOR_OR_CLASS_REQUEST so that it correctly returns
//  the number of bytes transferred.
//  
//  *****************  Version 35  *****************
//  User: Markm        Date: 4/16/99    Time: 3:39p
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  more minor changes to get rid of compiler warnings.
//  
//  *****************  Version 34  *****************
//  User: Markm        Date: 4/12/99    Time: 10:26a
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  minor changes to get rid of compiler warnings.
//  
//  *****************  Version 33  *****************
//  User: Markm        Date: 3/25/99    Time: 4:16p
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  Fixed a bug in the surprise removal code I just added.  I was returning
//  from the PnP dispatch function without unlocking the device object.
//  
//  *****************  Version 32  *****************
//  User: Markm        Date: 3/25/99    Time: 2:03p
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  Added code to allow unplugs (surprise removal) under NT5 without
//  notifying the user.
//  
//  *****************  Version 31  *****************
//  User: Markm        Date: 2/23/99    Time: 9:50a
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  Driver now supports ISO IN streaming with a path to user mode.
//  
//  *****************  Version 30  *****************
//  User: Markm        Date: 2/10/99    Time: 3:31p
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  removed lots of unused code.  Added ring buffer support functions.
//  
//  *****************  Version 29  *****************
//  User: Markm        Date: 2/01/99    Time: 11:57a
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  Added preliminary support for ISO streaming.
//  
//  *****************  Version 28  *****************
//  User: Markm        Date: 6/12/98    Time: 4:23p
//  Updated in $/EzUsb/Drivers/ezusbdrv
//  modified pipe reset and abort code so that the driver will work
//  correctly under Windows 95 OSR2.1.  For Win98, MS changed the size of
//  the URB_PIPE_REQUEST structure.  They added an extra ulong to it.  So,
//  a driver compiled with the 98 DDk and run under 95 will send the wrong
//  URB size.  The solution is to check the USBDI version whenever I do a
//  pipe reset or abort.  If the USBDI version is pre-win98, I subtract 4
//  from the size of the urb.  
//  
//  *****************  Version 27  *****************
//  User: Markm        Date: 4/10/98    Time: 2:52p
//  Updated in $/EZUSB/ezmon
//  Modified Intel Hex download code to stop the 8051 before downloading to
//  internal RAM.
//  
//  *****************  Version 26  *****************
//  User: Markm        Date: 4/09/98    Time: 4:39p
//  Updated in $/EZUSB/ezusb driver
//  Was not returning status information for ISO transfers.  Now it does!
//  
//  *****************  Version 25  *****************
//  User: Markm        Date: 4/09/98    Time: 4:39p
//  Updated in $/EZUSB/ezmon
//  changes for monitor version of driver
//  
//  *****************  Version 24  *****************
//  User: Markm        Date: 4/09/98    Time: 3:09p
//  Updated in $/EZUSB/ezusb driver
//  nothing much
//  
//  *****************  Version 23  *****************
//  User: Markm        Date: 4/09/98    Time: 3:00p
//  Updated in $/EZUSB/ezusb driver
//  Added function to download Intel Hex File records to EZ-USB.  For now,
//  this function is only used by the conditional build of the driver that
//  automatically downloads the Keil monitor.
//  
//  *****************  Version 22  *****************
//  User: Markm        Date: 4/07/98    Time: 1:52p
//  Updated in $/EZUSB/ezusb driver
//  Added IOCTL_EZUSB_GET_DRIVER_VERSION
//  
//  *****************  Version 21  *****************
//  User: Markm        Date: 4/06/98    Time: 4:26p
//  Updated in $/EZUSB/ezusb driver
//  Modified ISO transfer code.
//  * Transfer descriptors for the ISO transfer are now sent up to the
//  caller along with the actual data, so the caller can get the status of
//  the transfer on a packet-by-packet basis. 
//  * Disabled default values.  Caller must specify all fields in the ISO
//  control structure.
//  * Corrected bug where the Stream and Transfer objects weren't being
//  freed.
//  
//  Added some code to measure the latency of a bulk transfer.
//  
//  *****************  Version 20  *****************
//  User: Markm        Date: 3/19/98    Time: 10:13a
//  Updated in $/EZUSB/ezusb driver
//  Added IOCTL_EZUSB_ANCHOR_DOWNLOAD to support A0 loads to a specific
//  memory offset.
//  
//  *****************  Version 19  *****************
//  User: Markm        Date: 2/26/98    Time: 4:04p
//  Updated in $/EZUSB/ezusb driver
//  Added functions to perform anchor downloads and 8051 reset.
//  Added conditionally compiled code to support a special version of the
//  driver that will automatically download the Keil 8051 monitor after
//  device attachment.
//  
//  *****************  Version 18  *****************
//  User: Markm        Date: 2/25/98    Time: 2:09p
//  Updated in $/EZUSB/ezusb driver
//  changes for adding version resource to the driver
//  
//  *****************  Version 17  *****************
//  User: Markm        Date: 2/11/98    Time: 9:51a
//  Updated in $/EZUSB/ezusb driver
//  1. Added code to handle IRP_MN_CLOSE.
//  2. Now maintain a count of open file handles in the device extension.
//  3. Added workaround in Ezusb_SelectInterfaces() to avoid system hangs
//  during device removal under OSR2.1.  See comments there.
//  
//  *****************  Version 16  *****************
//  User: Markm        Date: 2/02/98    Time: 3:35p
//  Updated in $/EZUSB/ezusb driver
//  
//  *****************  Version 15  *****************
//  User: Markm        Date: 1/27/98    Time: 11:36a
//  Updated in $/EZUSB/ezusb driver
//  Modified ISO transfer code so that the number of transfer buffers and
//  the number of ISO frames per buffer can be specified by the caller.
//  
//  *****************  Version 14  *****************
//  User: Markm        Date: 1/26/98    Time: 10:11a
//  Updated in $/EZUSB/ezusb driver
//  1) modified device removal code that was crashing OSR2.1.  MS sample
//  code says that during device removal, the remove IRP should be passed
//  down the stack, and then the deviceobject should be deleted.  This
//  causes a bugcheck under OSR2.1.  Reversing the order of these
//  operations fixes the problem.
//  2) hardcoded the initial alternate setting to 2.  It was set to 1, but
//  this was also causing system crashes under OSR 2.1 during device
//  removal.  Still under investigation.
//  
//  *****************  Version 13  *****************
//  User: Markm        Date: 1/22/98    Time: 11:50a
//  Updated in $/EZUSB/ezusb driver
//  Fixed a bug in the device removal handler.  It wasn't deleteting the
//  symbolic link for the deviceobject after removal.
//  Removed lots of unused code.
//  Rewrote ISO loopback test code.
//  Wrote new ISO read/write functions.
//  
//  *****************  Version 12  *****************
//  User: Markm        Date: 1/18/98    Time: 3:20p
//  Updated in $/EZUSB/ezusb driver
//  renamed variables.  DeviceExtension becomes pdx and DeviceObject
//  becomes fdo.
//  rewrote handlers for device removal.   Cleaned up power management
//  dispatch.  Added code to maintain a usage count for the device.
//  
//  *****************  Version 11  *****************
//  User: Markm        Date: 1/15/98    Time: 4:36p
//  Updated in $/EZUSB/ezusb driver
//  Added
//  IOCTL_EZUSB_GET_CURRENT_FRAME_NUMBER
//  IOCTL_EZUSB_VENDOR_OR_CLASS_REQUEST
//  IOCTL_EZUSB_GET_LAST_ERROR
//  preliminary code for handling device removal gracefully.
//  
//  *****************  Version 10  *****************
//  User: Markm        Date: 1/14/98    Time: 10:29a
//  Updated in $/EZUSB/ezusb driver
//  Cleanup.
//  New functions for handling bulk transfers.
//  
//  *****************  Version 9  *****************
//  User: Markm        Date: 1/08/98    Time: 5:14p
//  Updated in $/EZUSB/ezusb driver
//  major changes to PnP IRP handling.  lots of reformatting.
//  
//  *****************  Version 8  *****************
//  User: Markm        Date: 1/02/98    Time: 1:41p
//  Updated in $/EZUSB/ezusb driver
//  Added support for setting the interface, preliminary code for naming
//  pipes, get string descriptor
//  
//  *****************  Version 7  *****************
//  User: Markm        Date: 11/18/97   Time: 4:40p
//  Updated in $/EZUSB/ezusb driver
//  Added abort pipe IOCTL
//  Added function to dump a buffer to the debuger
//  Added experimental file I/O code (from Brad Carpenter)
//  
//  *****************  Version 6  *****************
//  User: Markm        Date: 11/17/97   Time: 9:37a
//  Updated in $/EZUSB/ezusb driver
//  fixed bug where I set the pipesize
//  
//  *****************  Version 5  *****************
//  User: Markm        Date: 11/14/97   Time: 4:53p
//  Updated in $/EZUSB/ezusb driver
//  started using USBD_CreateConfigurationRequestEx
//  
//  *****************  Version 4  *****************
//  User: Markm        Date: 11/14/97   Time: 4:31p
//  Updated in $/EZUSB/ezusb driver
//  added code to experiment wth different methods of switiching
//  interfaces.
//  
//  *****************  Version 3  *****************
//  User: Markm        Date: 11/07/97   Time: 1:23p
//  Updated in $/EZUSB/ezusb driver
//  added sourcesafe keywords
//  
// Copyright (c) 1997 Anchor Chips, Inc.  May not be reproduced without
// permission.  See the license agreement for more details.
//
//////////////////////////////////////////////////////////////////////

// #define DRIVER
//
// Include files needed for WDM driver support
//
#include <wdm.h>
#include "stdarg.h"
#include "stdio.h"

//
// Include files needed for USB support
//
#include "usbdi.h"
#include "usbdlib.h"

//
// Include file for the Ezusb Device
//
#include "ezusbsys.h"

//
// incude file containing driver version
//
#include "version.h"

#ifdef DOWNLOAD_KEIL_MONITOR

extern INTEL_HEX_RECORD mon_ext_sio1_ezusb[];
extern INTEL_HEX_RECORD mon_ext_sio1_fx2[];
extern INTEL_HEX_RECORD loader[];

#endif // ifdef DOWNLOAD_KEIL_MONITOR


void
DumpBuffer(PVOID pvBuffer, ULONG length);

NTSTATUS
DriverEntry(
    IN PDRIVER_OBJECT DriverObject,
    IN PUNICODE_STRING RegistryPath
    )
/*++

Routine Description:
   Installable driver initialization entry point.
   This is where the driver is called when the driver is being loaded
   by the I/O system.  This entry point is called directly by the I/O system.

Arguments:
   DriverObject - pointer to the driver object
   RegistryPath - pointer to a unicode string representing the path
                  to driver-specific key in the registry

Return Value:
   STATUS_SUCCESS if successful,
   STATUS_UNSUCCESSFUL otherwise

--*/
{
   NTSTATUS ntStatus = STATUS_SUCCESS;
   PDEVICE_OBJECT deviceObject = NULL;

   Ezusb_KdPrint (("entering (Ezusb) DriverEntry (Build: %s/%s\n",__DATE__,__TIME__));

   //
   // Create dispatch points for the various events handled by this
   // driver.  For example, device I/O control calls (e.g., when a Win32
   // application calls the DeviceIoControl function) will be dispatched to
   // routine specified below in the IRP_MJ_DEVICE_CONTROL case.
   //
   DriverObject->MajorFunction[IRP_MJ_CREATE] = Ezusb_Create;
   DriverObject->MajorFunction[IRP_MJ_CLOSE] = Ezusb_Close;
   DriverObject->DriverUnload = Ezusb_Unload;

   DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = Ezusb_ProcessIOCTL;

   DriverObject->MajorFunction[IRP_MJ_PNP] = Ezusb_DispatchPnp;
   DriverObject->MajorFunction[IRP_MJ_POWER] = Ezusb_DispatchPower;
   DriverObject->DriverExtension->AddDevice = Ezusb_PnPAddDevice;

   Ezusb_KdPrint (("exiting (Ezusb) DriverEntry (%x)\n", ntStatus));

   return ntStatus;
}

NTSTATUS

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产激情av| 国产一区二区三区蝌蚪| 午夜欧美电影在线观看| 日本一区二区三区dvd视频在线 | 日韩精品影音先锋| 日韩欧美一区二区不卡| 久久久综合激的五月天| 国产精品伦理一区二区| 亚洲高清在线精品| 久久99久久精品| av色综合久久天堂av综合| 在线免费观看一区| 久久综合久久综合久久综合| 亚洲视频 欧洲视频| 国内外成人在线| 国产成人久久精品77777最新版本| 国产精品一区二区你懂的| av一二三不卡影片| 欧美一区二区三区公司| 国产精品第一页第二页第三页| 亚洲综合激情网| 国产一区二区三区日韩| 欧美在线免费观看视频| www亚洲一区| 日日夜夜精品视频免费| 99久久er热在这里只有精品15| 欧美久久久久久久久中文字幕| 欧美国产日本视频| 欧美a级一区二区| 日本乱人伦一区| 欧美一卡在线观看| 国产午夜精品在线观看| 日韩精品一级中文字幕精品视频免费观看| 国产a精品视频| 久久久一区二区三区| 日韩精品一区第一页| 日本韩国欧美一区| 亚洲欧美日韩久久| 91在线视频在线| 日韩伦理免费电影| 国产馆精品极品| 国产女主播一区| 国产激情一区二区三区| 日韩你懂的电影在线观看| 亚洲超丰满肉感bbw| 一本大道久久a久久精品综合| 国产欧美综合在线观看第十页| 韩国精品免费视频| 久久综合狠狠综合久久激情 | 狠狠色丁香久久婷婷综合丁香| 欧美日韩中文国产| 日日骚欧美日韩| 欧美一区二区三区免费在线看| 日本不卡123| 欧美电影免费观看高清完整版在线 | 色成人在线视频| 亚洲综合一区二区精品导航| 日韩av不卡在线观看| 91麻豆精品国产自产在线观看一区 | 91精品国产高清一区二区三区蜜臀| 五月综合激情婷婷六月色窝| 91精品一区二区三区久久久久久 | 欧美视频自拍偷拍| 日韩黄色在线观看| 国产亚洲精品bt天堂精选| av毛片久久久久**hd| 午夜欧美大尺度福利影院在线看| 日韩女优电影在线观看| 色综合久久六月婷婷中文字幕| 日日夜夜精品视频天天综合网| 欧美mv日韩mv国产| 欧美亚洲尤物久久| 国产美女av一区二区三区| 亚洲一区二区高清| 久久久久久麻豆| 欧美精品日韩综合在线| 成人18视频在线播放| 天天综合日日夜夜精品| 亚洲日本va午夜在线影院| 精品久久久久久综合日本欧美 | 在线一区二区三区四区| 激情亚洲综合在线| 亚洲一区电影777| 亚洲国产精品精华液ab| 欧美电影免费观看高清完整版在线| 91网站视频在线观看| 国产成人无遮挡在线视频| 丝袜亚洲另类欧美| 一级女性全黄久久生活片免费| 国产偷国产偷亚洲高清人白洁| 欧美一区二区三区四区视频| 91精品福利在线| 99精品欧美一区| 成人福利视频网站| 丁香激情综合国产| 成人在线视频一区| 成人午夜在线播放| 国产成人免费视频网站| 国产老女人精品毛片久久| 激情综合网最新| 韩国一区二区三区| 成人精品视频一区二区三区| 丁香天五香天堂综合| 国产成人免费av在线| 成人av免费在线播放| aaa亚洲精品| 91美女片黄在线观看91美女| 色婷婷亚洲综合| 欧美日韩国产综合视频在线观看| 欧美系列在线观看| 欧美日韩大陆在线| 久久综合一区二区| 久久久久国产精品厨房| 欧美色图免费看| 日韩精品一区二区三区视频| ww亚洲ww在线观看国产| 中文字幕日韩一区| 夜夜亚洲天天久久| 久久精品噜噜噜成人av农村| 国产福利一区二区三区视频在线| 国产91丝袜在线18| 欧美日韩一区国产| 欧美经典一区二区| 亚洲成人在线观看视频| 国产在线视频不卡二| 色婷婷精品大在线视频| 日韩情涩欧美日韩视频| 一区二区三区视频在线看| 久久99国产精品久久| 99久久久国产精品| 久久综合狠狠综合久久激情 | 91精品一区二区三区在线观看| 国产欧美一区二区精品仙草咪| 亚洲图片欧美综合| 成人性视频免费网站| 日韩免费电影网站| 亚洲综合在线电影| 成人爱爱电影网址| 久久婷婷久久一区二区三区| 亚洲国产视频在线| 99久久久国产精品免费蜜臀| 久久久国产午夜精品 | 久久综合九色综合97婷婷女人| 国产v综合v亚洲欧| 欧美少妇bbb| 欧美成人a在线| 亚洲国产日日夜夜| 色偷偷成人一区二区三区91| 国产精品久久久久一区二区三区 | 一本久久综合亚洲鲁鲁五月天| 久久综合色8888| 狠狠色丁香九九婷婷综合五月| 91 com成人网| 日本免费在线视频不卡一不卡二| 在线欧美小视频| 婷婷综合五月天| 91精品国产综合久久香蕉的特点| 三级影片在线观看欧美日韩一区二区 | 欧美日韩一级大片网址| 亚洲一区av在线| 成人欧美一区二区三区在线播放| 国产美女在线精品| 久久久久9999亚洲精品| 国产成a人亚洲精| 国产精品久久久久久户外露出| 成人深夜福利app| 亚洲一线二线三线视频| 欧美精品乱码久久久久久按摩| 亚洲1区2区3区视频| 精品少妇一区二区三区视频免付费| 久久99九九99精品| 国产精品国产三级国产aⅴ原创 | 蜜桃免费网站一区二区三区| 日韩一区二区电影| 国产成人午夜视频| 亚洲一本大道在线| 久久久精品黄色| 欧洲中文字幕精品| 日本不卡免费在线视频| 麻豆精品视频在线观看视频| 国产亚洲精品aa午夜观看| 在线这里只有精品| 国产一区二区三区四区五区入口 | 国产日韩在线不卡| 欧美视频一区二| 国产精品一区二区黑丝| 一区二区在线观看av| 精品成人在线观看| 欧美日韩一本到| jlzzjlzz亚洲日本少妇| 国产在线一区二区| 亚洲一区二区av电影| 一区免费观看视频| 2020国产精品自拍| 日韩欧美中文字幕精品| 91在线视频免费91| 成人激情免费电影网址| 精品伊人久久久久7777人| 水野朝阳av一区二区三区| 国产精品午夜在线|