📄 main.lst
字号:
C51 COMPILER V6.23a MAIN 06/01/2003 16:27:44 PAGE 1
C51 COMPILER V6.23a, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: E:\Program Files\keil\C51\BIN\C51.EXE main.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include <REGSND1.H>
2 #include "uart.h"
3 #include "atmelusbci.h"
4 #include "main.h"
5
6 unsigned char ReadEp(unsigned char EpNum,unsigned char *Data)
7 {
8 1 unsigned char i=0,nLength;
9 1 UEPNUM=EpNum;
10 1
11 1 nLength=UBYCTX;
12 1 while(nLength--) {Data[i++]=UEPDATX;/*printuf("%x ",Data[i]);*/}
13 1
14 1 UEPSTAX&=~(RXOUTB0|RXOUTB1|RXSETUP);
15 1 return(i);
16 1 }
17
18 void Get_Status()
19 {
20 1 printu("Get_Status\n");
21 1 }
22 void Clear_Feature()
23 {
24 1 printu("Clear_Feature\n");
25 1 }
26 void Set_Feature()
27 {
28 1 printu("Set_Feature\n");
29 1 }
30 void Set_Address(unsigned char EpNum)
31 {
32 1 printu("Set_Address\n");
33 1 }
*** WARNING C280 IN LINE 30 OF MAIN.C: 'EpNum': unreferenced local variable
34 void Get_Descriptor(unsigned char DesType,unsigned char nLength)
35 {
36 1 printu("Get_Descriptor\n");
37 1 }
*** WARNING C280 IN LINE 34 OF MAIN.C: 'DesType': unreferenced local variable
*** WARNING C280 IN LINE 34 OF MAIN.C: 'nLength': unreferenced local variable
38 void Get_Configuration()
39 {
40 1 printu("Get_Configuration\n");
41 1 }
42 void Set_Configuration(unsigned char wValue)
43 {
44 1 printu("Set_Configuration\n");
45 1 }
*** WARNING C280 IN LINE 42 OF MAIN.C: 'wValue': unreferenced local variable
46 void Get_Interface()
47 {
48 1 printu("Get_Interface\n");
49 1 }
50 void Set_Interface()
51 {
C51 COMPILER V6.23a MAIN 06/01/2003 16:27:44 PAGE 2
52 1 printu("Set_Interface\n");
53 1 }
54 void Reserved()
55 {
56 1 }
57
58 void Ep0Int()
59 {
60 1 unsigned char i,j;
61 1 unsigned char ControlData[32]={0,};
62 1 // printu("\nEp0 Interrrupted!");
63 1 i=ReadEp(0,ControlData);//读端点0数据
64 1 for(j=0;j<i;j++) printuf("%x ",ControlData[j]);
65 1 j=ControlData[0]&0x60; //判断是否是USB标准请求
66 1 if((j==0)&&i){ //如果端点0数据长度非零且为标准请求
67 2 switch(ControlData[1]){ //分支处理
68 3 case get_status : Get_Status();break;
69 3 case clear_feature : Clear_Feature();break;
70 3
71 3 case set_feature : Set_Feature();break;
72 3
73 3 case set_address : Set_Address(ControlData[2]);break;
74 3 case get_descriptor : Get_Descriptor(ControlData[3],ControlData[6]);break;
75 3
76 3 case get_configuration : Get_Configuration();break;
77 3 case set_configuration : Set_Configuration(ControlData[2]);break;
78 3 case get_interface : Get_Interface();break;
79 3 case set_interface : Set_Interface();break;
80 3 default : Reserved();break;
81 3 }
82 2 }
83 1 }
84
85 void main_txdone()
86 {}
87 void main_rxdone()
88 {}
89 void main()
90 {
91 1 printu("Test Ep0 Intterupt\n");
92 1 AtmelUSBInit(0,2,0);
93 1 EpEnable();
94 1 while(1){
95 2 if(UEPINT&EP0INT) Ep0Int();
96 2 if(UEPINT&EP1INT) main_txdone();
97 2 if(UEPINT&EP2INT) main_rxdone();
98 2 UEPINT=0;
99 2 }
100 1 }
101
102
103
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 336 ----
CONSTANT SIZE = 193 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 41
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
C51 COMPILER V6.23a MAIN 06/01/2003 16:27:44 PAGE 3
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 4 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -