⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 periph.lst

📁 在Linux中
💻 LST
字号:
C51 COMPILER V6.14  PERIPH                                                                 01/09/2002 17:28:31 PAGE 1   


C51 COMPILER V6.14, COMPILATION OF MODULE PERIPH
OBJECT MODULE PLACED IN .\periph.OBJ
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE .\periph.c DEBUG OBJECTEXTEND

stmt level    source

   1          #pragma NOIV	
   2          #include <ezusb.h>
   3          #include <ezregs.h>
   4          #include <intrins.h>
   5          #include <fx.h>
   6          
   7          extern BOOL	GotSUD;			// Received setup data flag
   8          extern BOOL	Sleep;
   9          extern BOOL	Rwuen;
  10          extern BOOL	Selfpwr;
  11          //+++++++++++++++++
  12          #define P0  			OUTA
  13          #define P1	        	OUTB
  14          #define P3			OUTD
  15          //+++++++++++++++++
  16          
  17          
  18          BYTE	Configuration;		// Current configuration
  19          BYTE	AlternateSetting;	// Alternate settings
  20          BYTE  suspCount;
  21          
  22                 
  23          
  24          
  25          
  26          
  27          BYTE InReportBytes;
  28          void *dscr_ptr;
  29          
  30          
  31          //-----------------------------------------------------------------------------
  32          // Task Dispatcher hooks
  33          //	The following hooks are called by the task dispatcher.
  34          //-----------------------------------------------------------------------------
  35          
  36          void TD_Init(void) 				// Called once at startup
  37          {
  38   1      	
  39   1             	PORTACFG = 0x00;
  40   1      	OEA = 0xFF;
  41   1      
  42   1              PORTBCFG = 0x00;
  43   1              OEB = 0xFF;
  44   1           
  45   1              OED = 0xFF;
  46   1      
  47   1      
  48   1      	IN07VAL |= bmEP2 ;
  49   1      	OUT07VAL |= bmEP2;
  50   1      
  51   1         OUT07IEN |= bmEP2;
  52   1      
  53   1         IN07IEN |= bmEP2;
  54   1      
  55   1      
C51 COMPILER V6.14  PERIPH                                                                 01/09/2002 17:28:31 PAGE 2   

  56   1      
  57   1         suspCount = 1;
  58   1      
  59   1         OEA = 0xFF;
  60   1      
  61   1         Rwuen = TRUE;				// Enable remote-wakeup
  62   1      }
  63          
  64          void TD_Poll(void) 				// Called repeatedly while the device is idle
  65          {
  66   1      }
  67          
  68          BOOL TD_Suspend(void) 			// Called before the device goes into suspend mode
  69          {
  70   1      	return(TRUE);
  71   1      }
  72          
  73          BOOL TD_Resume(void) 			// Called after the device resumes
  74          {
  75   1      	return(TRUE);
  76   1      }
  77          
  78          //-----------------------------------------------------------------------------
  79          // Device Request hooks
  80          //	The following hooks are called by the end point 0 device request parser.
  81          //-----------------------------------------------------------------------------
  82          
  83          BOOL DR_GetDescriptor(void)
  84          {
  85   1      	return(TRUE);
  86   1      }
  87          
  88          BOOL DR_SetConfiguration(void)	// Called when a Set Configuration command is received
  89          {
  90   1      	Configuration = SETUPDAT[2];
  91   1      	return(TRUE);				// Handled by user code
  92   1      }
  93          
  94          BOOL DR_GetConfiguration(void)	// Called when a Get Configuration command is received
  95          {
  96   1      	IN0BUF[0] = Configuration;
  97   1      	EZUSB_SET_EP_BYTES(IN0BUF_ID,1);
  98   1      	return(TRUE);				// Handled by user code
  99   1      }
 100          
 101          BOOL DR_SetInterface(void) 		// Called when a Set Interface command is received
 102          {
 103   1      	AlternateSetting = SETUPDAT[2];
 104   1      	return(TRUE);				// Handled by user code
 105   1      }
 106          
 107          BOOL DR_GetInterface(void) 		// Called when a Set Interface command is received
 108          {
 109   1      	IN0BUF[0] = AlternateSetting;
 110   1      	EZUSB_SET_EP_BYTES(IN0BUF_ID,1);
 111   1      	return(TRUE);				// Handled by user code
 112   1      }
 113          
 114          BOOL DR_GetStatus(void)
 115          {
 116   1      	return(TRUE);
 117   1      }
C51 COMPILER V6.14  PERIPH                                                                 01/09/2002 17:28:31 PAGE 3   

 118          
 119          BOOL DR_ClearFeature(void)
 120          {
 121   1      	return(TRUE);
 122   1      }
 123          
 124          BOOL DR_SetFeature(void)
 125          {
 126   1      	return(TRUE);
 127   1      }
 128          
 129          #define EZUSB_UNARM_EP(ep_id)  			EPIO[ep_id].cntrl = bmEPBUSY
 130          
 131          BOOL DR_VendorCmnd(void)
 132          {
 133   1         return(TRUE);
 134   1      }
 135          
 136          //-----------------------------------------------------------------------------
 137          // USB Interrupt Handlers
 138          //	The following functions are called by the USB interrupt jump table.
 139          //-----------------------------------------------------------------------------
 140          
 141          
 142          
 143          void ISR_Sudav(void) interrupt 0
 144          {
 145   1      	GotSUD = TRUE;				// Set flag
 146   1      
 147   1      
 148   1      	EZUSB_IRQ_CLEAR();
 149   1      	USBIRQ = bmSUDAV;			// Clear SUDAV IRQ
 150   1      }
 151          
 152          void ISR_Sutok(void) interrupt 0
 153          {
 154   1      	EZUSB_IRQ_CLEAR();
 155   1      	USBIRQ = bmSUTOK;			// Clear SUTOK IRQ
 156   1      }
 157          
 158          void ISR_Sof(void) interrupt 0
 159          {
 160   1      	EZUSB_IRQ_CLEAR();
 161   1      	USBIRQ = bmSOF;				// Clear SOF IRQ
 162   1      }
 163          
 164          void ISR_Ures(void) interrupt 0
 165          {
 166   1        
 167   1         REPORTDSCR *rdp;
 168   1         dscr_ptr = (REPORTDSCR xdata *) pReportDscr;
 169   1         rdp = dscr_ptr;
 170   1         InReportBytes = rdp -> Report_Count_In_Value;
 171   1         EPIO[IN2BUF_ID].bytes = InReportBytes;
 172   1      
 173   1         EPIO[OUT2BUF_ID].bytes = 64;
 174   1      
 175   1      
 176   1      	EZUSB_IRQ_CLEAR();
 177   1      	USBIRQ = bmURES;			// Clear URES IRQ
 178   1      }
 179          
C51 COMPILER V6.14  PERIPH                                                                 01/09/2002 17:28:31 PAGE 4   

 180          void ISR_IBN(void) interrupt 0
 181          {
 182   1        
 183   1      }
 184          
 185          void ISR_Susp(void) interrupt 0
 186          {
 187   1         Sleep = TRUE;
 188   1      
 189   1         EZUSB_IRQ_CLEAR();
 190   1         USBIRQ = bmSUSP;
 191   1      }
 192          
 193          void ISR_Ep0in(void) interrupt 0
 194          {
 195   1      }
 196          
 197          void ISR_Ep0out(void) interrupt 0
 198          {
 199   1      }
 200          
 201          void ISR_Ep1in(void) interrupt 0
 202          {
 203   1      
 204   1      }
 205          
 206          void ISR_Ep1out(void) interrupt 0
 207          {
 208   1      
 209   1      }
 210          
 211          void ISR_Ep2in(void) interrupt 0
 212          {
 213   1      
 214   1      	IN2BC = InReportBytes;
 215   1      
 216   1      	EZUSB_IRQ_CLEAR();
 217   1      	IN07IRQ = bmEP2;
 218   1      
 219   1      }
 220          
 221          void ISR_Ep2out(void) interrupt 0
 222          
 223          {
 224   1         int i;
 225   1      
 226   1         if (EPIO[IN2BUF_ID].cntrl & bmEPBUSY)
 227   1         {
 228   2            TOGCTL = 0x08 | IN2BUF_ID;
 229   2            WRITEDELAY();
 230   2            if (TOGCTL & 0x80)
 231   2               TOGCTL |= 0x20;
 232   2            else
 233   2               TOGCTL |= 0x40;
 234   2         }
 235   1      
 236   1        
 237   1         for (i=0; i < OUT2BC; i++)
 238   1         {
 239   2       
 240   2              P0=OUT2BUF[0];
 241   2      	P1=OUT2BUF[1];           //-------------------------------------------------
C51 COMPILER V6.14  PERIPH                                                                 01/09/2002 17:28:31 PAGE 5   

 242   2              P3=OUT2BUF[2];  
 243   2             
 244   2         }
 245   1         
 246   1         
 247   1         OUT2BC = 0;
 248   1      
 249   1      
 250   1      	EZUSB_IRQ_CLEAR();
 251   1      	OUT07IRQ = bmEP2;
 252   1      }
 253          
 254          void ISR_Ep3in(void) interrupt 0
 255          {
 256   1      }
 257          
 258          void ISR_Ep3out(void) interrupt 0
 259          {
 260   1       
 261   1      }
 262          
 263          void ISR_Ep4in(void) interrupt 0
 264          {
 265   1      }
 266          
 267          void ISR_Ep4out(void) interrupt 0
 268          {
 269   1         }
 270          
 271          void ISR_Ep5in(void) interrupt 0
 272          {
 273   1      }
 274          
 275          void ISR_Ep5out(void) interrupt 0
 276          {
 277   1        
 278   1      }
 279          
 280          void ISR_Ep6in(void) interrupt 0
 281          {
 282   1      }
 283          
 284          void ISR_Ep6out(void) interrupt 0
 285          {
 286   1        
 287   1      }
 288          
 289          void ISR_Ep7in(void) interrupt 0
 290          {
 291   1      }
 292          
 293          void ISR_Ep7out(void) interrupt 0
 294          {
 295   1        
 296   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    470    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
C51 COMPILER V6.14  PERIPH                                                                 01/09/2002 17:28:31 PAGE 6   

   DATA SIZE        =      7       1
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -