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

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

?? fw.lst

?? ezUSB fireware 的固件
?? LST
?? 第 1 頁 / 共 2 頁
字號:
C51 COMPILER V5.50,  FW                                                                    26/07/00  13:53:26  PAGE 1   


DOS C51 COMPILER V5.50, COMPILATION OF MODULE FW
OBJECT MODULE PLACED IN FW.OBJ
COMPILER INVOKED BY: C:\C51\BIN\C51.EXE FW.C DB OE MODDP2

stmt level    source

   1          //-----------------------------------------------------------------------------
   2          //	File:		fw.c
   3          //	Contents:	Firmware frameworks task dispatcher and device request parser
   4          //				source.
   5          //
   6          //	Copyright (c) 1997 AnchorChips, Inc. All rights reserved
   7          //      Adapted for use with HIDs by Jan Axelson (jan@lvr.com)
   8          //-----------------------------------------------------------------------------
   9          #include "ezusb.h"
  10          #include "ezregs.h"
  11          
  12          //-----------------------------------------------------------------------------
  13          // Random Macros
  14          //-----------------------------------------------------------------------------
  15          #define	min(a,b) (((a)<(b))?(a):(b))
  16          #define	max(a,b) (((a)>(b))?(a):(b))
  17          
  18          //-----------------------------------------------------------------------------
  19          // Constants
  20          //-----------------------------------------------------------------------------
  21          #define	DELAY_COUNT				0x9248*8L		// Delay for 8 sec at 24Mhz, 4 sec at 48
  22                                                                                                
  23          //-----------------------------------------------------------------------------
  24          // Global Variables
  25          //-----------------------------------------------------------------------------
  26          volatile BOOL	GotSUD;
  27          BOOL		Rwuen;
  28          BOOL		Selfpwr;
  29          volatile BOOL	Sleep;						// Sleep mode enable flag
  30          
  31          WORD	pDeviceDscr;	// Pointer to Device Descriptor; Descriptors may be moved
  32          WORD	pConfigDscr;	
  33          WORD	pStringDscr;
  34          // HID code start
  35          WORD	pReportDscr;
  36          BYTE	reportlen;
  37          // HID code end	
  38          
  39          //-----------------------------------------------------------------------------
  40          // Prototypes
  41          //-----------------------------------------------------------------------------
  42          void SetupCommand(void);
  43          void TD_Init(void);
  44          void TD_Poll(void);
  45          BOOL TD_Suspend(void);
  46          BOOL TD_Resume(void);
  47          
  48          BOOL DR_GetDescriptor(void);
  49          BOOL DR_SetConfiguration(void);
  50          BOOL DR_GetConfiguration(void);
  51          BOOL DR_SetInterface(void);
  52          BOOL DR_GetInterface(void);
  53          BOOL DR_GetStatus(void);
  54          BOOL DR_ClearFeature(void);
  55          BOOL DR_SetFeature(void);
  56          BOOL DR_VendorCmnd(void);
  57          
  58          //-----------------------------------------------------------------------------
  59          // Code
C51 COMPILER V5.50,  FW                                                                    26/07/00  13:53:26  PAGE 2   

  60          //-----------------------------------------------------------------------------
  61          
  62          // Task dispatcher
  63          void main(void)
  64          {
  65   1      	DWORD	i;
  66   1      	WORD	offset;
  67   1      	DWORD	DevDescrLen;
  68   1      	DWORD	j=0;
  69   1      	WORD	IntDescrAddr;
  70   1      	WORD	ExtDescrAddr;
  71   1      
  72   1      	// Initialize Global States
  73   1      	Sleep = FALSE;					// Disable sleep mode
  74   1      	Rwuen = FALSE;					// Disable remote wakeup
  75   1      	Selfpwr = FALSE;				// Disable self powered
  76   1      	GotSUD = FALSE;					// Clear "Got setup data" flag
  77   1      
  78   1      	// Initialize user device
  79   1      	TD_Init();
  80   1      
  81   1      	// The following section of code is used to relocate the descriptor table. 
  82   1      	// Since the SUDPTRH and SUDPTRL are assigned the address of the descriptor 
  83   1      	// table, the descriptor table must be located in on-part memory.
  84   1      	// The 4K demo tools locate all code sections in external memory.
  85   1      	// The descriptor table is relocated by the frameworks ONLY if it is found 
  86   1      	// to be located in external memory.
  87   1      	pDeviceDscr = (WORD)&DeviceDscr;
  88   1      	pConfigDscr = (WORD)&ConfigDscr;
  89   1      	pStringDscr = (WORD)&StringDscr;
  90   1      // HID code start
  91   1      	pReportDscr = (WORD)&ReportDscr;
  92   1      // HID code end
  93   1      
  94   1      	if ((WORD)&DeviceDscr & 0xe000)
  95   1      	{
  96   2      		IntDescrAddr = INTERNAL_DSCR_ADDR;
  97   2      		ExtDescrAddr = (WORD)&DeviceDscr;
  98   2      		DevDescrLen = (WORD)&UserDscr - (WORD)&DeviceDscr + 2;
  99   2      		for (i = 0; i < DevDescrLen; i++)
 100   2      			*((BYTE xdata *)IntDescrAddr+i) = 0xCD;
 101   2      		for (i = 0; i < DevDescrLen; i++)
 102   2      			*((BYTE xdata *)IntDescrAddr+i) = *((BYTE xdata *)ExtDescrAddr+i);
 103   2      		pDeviceDscr = IntDescrAddr;
 104   2      		offset = (WORD)&DeviceDscr - INTERNAL_DSCR_ADDR;
 105   2      		pConfigDscr -= offset;
 106   2      		pStringDscr -= offset;
 107   2      // HID code start
 108   2      		pReportDscr -= offset;
 109   2      // HID code end
 110   2      	}
 111   1      
 112   1      	EZUSB_IRQ_ENABLE();				// Enable USB interrupt (INT2)
 113   1      	EZUSB_ENABLE_RSMIRQ();				// Wake-up interrupt
 114   1      
 115   1      	// The 8051 is responsible for all USB events, even those that have happened
 116   1      	// before this point.  We cannot ignore pending USB interrupts.
 117   1      	// The chip will come out of reset with the flags all cleared.
 118   1      	//	USBIRQ = 0xff;				// Clear any pending USB interrupt requests
 119   1      	PORTCCFG |= 0xc0;				// Turn on r/w lines for external memory 
 120   1      
 121   1      	USBBAV = USBBAV | 1 & ~bmBREAK;	// Disable breakpoints and autovectoring
 122   1      	USBIEN |= bmSUDAV | bmSUTOK | bmSUSP | bmURES;	// Enable selected interrupts
 123   1      	EA = 1;						// Enable 8051 interrupts
 124   1      
 125   1      	// This loop waits until we receive a setup packet from the host.
C51 COMPILER V5.50,  FW                                                                    26/07/00  13:53:26  PAGE 3   

 126   1      	// NOTE: The device will continue to renumerate until it receives a setup
 127   1      	// packet.  This fixes a microsoft USB bug that loses disconnect/reconnect 
 128   1      	// events during initial USB device driver configuration dialog box.
 129   1      	// B2 Load:  This code is not needed for B2 load, only for renumeration.
 130   1      	#ifndef NO_RENUM
 131   1      		while(!GotSUD)
 132   1      		{
 133   2      			if(!GotSUD)
 134   2      				EZUSB_Discon(TRUE);	// renumerate until setup received
 135   2      			for(j=0;(j<DELAY_COUNT) && (!GotSUD);++j);
 136   2      		}
 137   1      	#endif
 138   1      
 139   1      
 140   1      	CKCON = (CKCON&(~bmSTRETCH)) | FW_STRETCH_VALUE; // Set stretch to 0 (after renumeration)
 141   1      
 142   1      	// Task Dispatcher
 143   1      	while(TRUE)					// Main Loop
 144   1      	{
 145   2      		if(GotSUD)				// Wait for SUDAV
 146   2      		{
 147   3      			SetupCommand();	 		// Implement setup command
 148   3        			GotSUD = FALSE;		   	// Clear SUDAV flag
 149   3      		}
 150   2      
 151   2      		// Poll User Device
 152   2      		// NOTE: Idle mode stops the processor clock.  There are only two
 153   2      		// ways out of idle mode, the WAKEUP pin, and detection of the USB
 154   2      		// resume state on the USB bus.  The timers will stop and the
 155   2      		// processor will not wake up on any other interrupts.
 156   2      		if (Sleep)
 157   2      		    {
 158   3          		if(TD_Suspend())
 159   3          		    { 
 160   4          		    Sleep = FALSE;	   		// Clear the "go to sleep" flag.  Do it here to prevent any race condition b
             -etween wakeup and the next sleep.
 161   4          		    do
 162   4          		        {
 163   5             			    EZUSB_Susp();			// Place processor in idle mode.
 164   5          		        }
 165   4                      while(!Rwuen && EZUSB_EXTWAKEUP());
 166   4                      // Must continue to go back into suspend if the host has disabled remote wakeup
 167   4                      // *and* the wakeup was caused by the external wakeup pin.
 168   4                      
 169   4          			// 8051 activity will resume here due to USB bus or Wakeup# pin activity.
 170   4          			EZUSB_Resume();	// If source is the Wakeup# pin, signal the host to Resume.		
 171   4          			TD_Resume();
 172   4          		    }   
 173   3      		    }
 174   2      		TD_Poll();
 175   2      	}
 176   1      }
 177          
 178          // Device request parser
 179          void SetupCommand(void)
 180          // A Setup packet has been received.
 181          {
 182   1      	//*dscr_ptr is the address of a descriptor??	
 183   1      	void	*dscr_ptr;
 184   1      	DWORD	i;
 185   1      
 186   1      	switch(SETUPDAT[1])
 187   1      	//SETUPDAT[1] contains the control request
 188   1      	{
 189   2      		case SC_GET_DESCRIPTOR:						// *** Get Descriptor
 190   2      			if(DR_GetDescriptor())
C51 COMPILER V5.50,  FW                                                                    26/07/00  13:53:26  PAGE 4   

 191   2      			//If the request is Get_Descriptor, find out which descriptor was requested.
 192   2      				switch(SETUPDAT[3])
 193   2      				//The descriptor type is in the high byte of wValue, stored in SETUPDAT[3].			
 194   2      				{
 195   3      					case GD_DEVICE:				// Device
 196   3      					//If the request is for a device descriptor, store the pointers
 197   3      					//in SUDPTRH and SUDPTRL and the hardware does the rest.
 198   3      						SUDPTRH = MSB(pDeviceDscr);
 199   3      						SUDPTRL = LSB(pDeviceDscr);
 200   3      						break;
 201   3      					case GD_CONFIGURATION:			// Configuration
 202   3      					/*If the request is for a configuration descriptor, find out if the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av激情综合网| 欧美激情在线观看视频免费| 精品久久人人做人人爰| 日韩美女视频一区二区| 久久国产精品色婷婷| 色欧美片视频在线观看在线视频| 欧美成人国产一区二区| 亚洲精品乱码久久久久久黑人| 毛片av一区二区三区| 欧美写真视频网站| 中文在线资源观看网站视频免费不卡| 日本视频一区二区三区| 在线观看国产一区二区| 国产精品美女久久久久久久久| 美女爽到高潮91| 欧美精品少妇一区二区三区| 亚洲另类一区二区| 99国产精品国产精品久久| 久久久精品影视| 国产一区视频在线看| 欧美一区二区在线观看| 亚洲成在线观看| 欧洲生活片亚洲生活在线观看| 国产精品久久久久久久午夜片| 国产乱子伦一区二区三区国色天香| 日韩你懂的在线播放| 日本sm残虐另类| 91精品国产综合久久福利| 亚洲成av人片观看| 6080yy午夜一二三区久久| 五月综合激情网| 欧美一区二区播放| 美女任你摸久久| 久久亚洲一区二区三区四区| 精品一区二区在线看| 久久久亚洲精华液精华液精华液| 精品在线一区二区| 久久久久成人黄色影片| 国产麻豆精品视频| 国产精品美女久久久久av爽李琼| 成人国产精品免费观看动漫| 国产精品毛片a∨一区二区三区| 成人精品小蝌蚪| 亚洲精品综合在线| 欧美日韩一区二区三区四区五区 | 日韩色在线观看| 青青草伊人久久| 久久久精品蜜桃| 97se亚洲国产综合自在线观| 亚洲一区免费观看| 91精品国产丝袜白色高跟鞋| 狠狠色丁香婷婷综合| 中文一区二区在线观看| 一道本成人在线| 日韩成人一级片| 国产色91在线| 在线观看一区二区视频| 久久激情五月激情| 国产精品福利影院| 欧美日韩一区在线| 国产精华液一区二区三区| 136国产福利精品导航| 欧美精品久久天天躁| 国产综合色在线视频区| 亚洲日本丝袜连裤袜办公室| 欧美一区午夜视频在线观看| 国产大片一区二区| 亚洲福利一二三区| 久久亚洲一区二区三区四区| 在线观看精品一区| 国产成人免费视频一区| 亚洲国产日韩一级| 国产精品三级视频| 欧美一区二区三区系列电影| 夫妻av一区二区| 日本成人在线看| 亚洲精品中文字幕乱码三区| 欧美精品一区二区久久久| 91在线视频在线| 国产美女久久久久| 亚洲制服丝袜一区| 日本一区二区免费在线| 91精品欧美一区二区三区综合在| 成人一区在线观看| 精品一区二区国语对白| 亚洲二区视频在线| 最新高清无码专区| 国产婷婷色一区二区三区| 欧美三级中文字| 精品噜噜噜噜久久久久久久久试看 | 久久尤物电影视频在线观看| 91欧美一区二区| 极品少妇一区二区| 亚洲主播在线播放| 亚洲欧美综合色| 欧美国产在线观看| 久久婷婷久久一区二区三区| 91精品国产91热久久久做人人 | 国产精品亚洲人在线观看| 亚洲成人av一区| 亚洲欧美另类久久久精品2019| 中文字幕欧美国产| 日本一区二区三区四区| 久久久久久9999| 久久久不卡网国产精品二区| 欧美成人综合网站| 日韩欧美一区在线| 日韩免费在线观看| 日韩欧美视频一区| 日韩精品一区二区三区视频播放 | 免费看欧美女人艹b| 亚洲成av人片| 亚洲成人福利片| 日韩电影在线一区二区| 五月天亚洲精品| 日韩成人伦理电影在线观看| 日韩电影在线一区二区| 免费在线一区观看| 六月丁香综合在线视频| 极品美女销魂一区二区三区 | 色婷婷综合久久久| 色老头久久综合| 欧美视频一区二区三区四区| 在线观看一区二区精品视频| 欧美裸体一区二区三区| 69av一区二区三区| 久久综合国产精品| 国产精品国产三级国产aⅴ入口 | 久热成人在线视频| 国产精品综合一区二区三区| 国产成人免费视频一区| 99久久精品免费| 欧美日本一区二区在线观看| 日韩欧美电影在线| 国产三级三级三级精品8ⅰ区| 国产精品视频看| 一区二区三区在线高清| 免费观看成人av| 成人妖精视频yjsp地址| 欧美自拍丝袜亚洲| 日韩欧美一区电影| 国产精品成人免费| 午夜精品久久久久久久久久| 美国毛片一区二区| 99re这里只有精品6| 欧美丝袜丝交足nylons| 精品成人免费观看| 亚洲日本护士毛茸茸| 免费观看成人av| 99这里只有久久精品视频| 7777精品伊人久久久大香线蕉经典版下载| 精品久久久久99| 一区二区成人在线| 国产一区二区在线观看免费 | 一区二区三区**美女毛片| 五月婷婷综合激情| 国产成人免费在线观看不卡| 欧美日韩午夜在线视频| 日本一区二区三区在线不卡| 亚洲成人精品一区二区| 成人在线视频首页| 欧美一区二区美女| 综合在线观看色| 国内欧美视频一区二区| 欧美亚洲综合另类| 中文字幕乱码久久午夜不卡| 午夜精品久久久久久久99水蜜桃| 国产成人自拍高清视频在线免费播放 | 欧美一级一级性生活免费录像| 亚洲日本乱码在线观看| 国产一区二区三区日韩| 欧美日高清视频| ㊣最新国产の精品bt伙计久久| 蜜乳av一区二区| 欧美精品在线一区二区三区| 一区二区中文视频| 国产伦精品一区二区三区在线观看| 7777精品伊人久久久大香线蕉 | 国产精品国产三级国产| 久久成人av少妇免费| 欧美性videosxxxxx| 亚洲啪啪综合av一区二区三区| 国产一区二区三区视频在线播放| 欧美二区乱c少妇| 一区二区三区免费| 99久久精品国产导航| 中文字幕av一区二区三区高 | 自拍偷拍欧美激情| 国产成人精品一区二区三区四区| 日韩美女视频在线| 久久精品噜噜噜成人88aⅴ| 欧美精选午夜久久久乱码6080| 亚洲高清中文字幕| 91国偷自产一区二区三区成为亚洲经典 | 欧美色网站导航| 亚洲综合小说图片| 精品视频免费看| 亚洲电影中文字幕在线观看| 欧美日韩mp4| 日本在线不卡一区|