?? chap_9.lst
字號:
C51 COMPILER V7.06 CHAP_9 07/02/2003 10:05:13 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE CHAP_9
OBJECT MODULE PLACED IN chap_9.OBJ
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE chap_9.c OPTIMIZE(2,SPEED) BROWSE DEBUG OBJECTEXTEND
stmt level source
1 //***********************************************************************
2 // *
3 // P H I L I P S P R O P R I E T A R Y *
4 // *
5 // COPYRIGHT (c) 1999 BY PHILIPS SINGAPORE (APIC). *
6 // -- ALL RIGHTS RESERVED -- *
7 // *
8 // File Name : USBDebug.c *
9 // Author : Albert Goh *
10 // Created : 3 March 2000 *
11 // *
12 //***********************************************************************
13 //***********************************************************************
14 // *
15 // USBDebug has the ability to test the USB core in Bus enumeration or *
16 // in CBI/bulk mode. *
17 // *
18 //***********************************************************************
19 //***********************************************************************
20 // *
21 // Module History *
22 // ************** *
23 // *
24 // Date Version Author Changes *
25 // ==== ======= ====== ======= *
26 // 030300 0.1 Albert Created *
27 // *
28 //***********************************************************************
29
30 //***********************************************************************
31 //* *
32 //* Include Files Definition *
33 //* *
34 //***********************************************************************
35
36 #include "standard.h"
37 #include "Kernel.h"
38 #include "D14.h"
39 #include "usb.h"
40 #include "viic_c51.h"
41
42 extern D14_CNTRL_REG volatile xdata D14_Cntrl_Reg;
43 extern void Init_D14(void);
44 extern UC code Standard_Device_Descriptor[];
45 extern UC code Bulk_Interface_Descriptor[];
46 extern UC code Iso_Interface_Descriptor[];
47 extern UC code Standard_Config_Descriptor[];
48 extern UC code Standard_Manufacturer_String[];
49 extern UC code Standard_Product_String[];
50 extern UC code Standard_String_ID[];
51 extern UC code Bulk_In_Descriptor[];
52 extern UC code Bulk_Out_Descriptor[];
53 extern UC code Int_In_Descriptor[];
54 extern UC code Int_Out_Descriptor[];
55 extern UC code Iso_In_Descriptor[];
C51 COMPILER V7.06 CHAP_9 07/02/2003 10:05:13 PAGE 2
56 extern UC code Iso_Out_Descriptor[];
57 extern UC code Iso_In_Zero_Descriptor[];
58 extern UC code Iso_Out_Zero_Descriptor[];
59 extern UC code HS_Device_Descriptor[];
60 extern UC code HS_Device_Qualifier[];
61 extern UC code HS_Bulk_Interface_Descriptor[];
62 extern UC code HS_Bulk_In_Descriptor[];
63 extern UC code HS_Bulk_Out_Descriptor[];
64 extern UC code HS_Int_In_Descriptor[];
65 extern UC code HS_Int_Out_Descriptor[];
66 extern UC code Other_Speed_Config_Descriptor[];
67 extern UI count;
68 extern void Start_mSEC_Timer(Data);
69 extern void Start_SEC_Timer(Data);
70 extern void Check_Busy(void);
71 extern void TaskFile_Update(void);
72 extern UI Temp;
73 extern UC Device_Config_Value;
74 extern KERNEL Kernel_Flag;
75 extern DMA_INT_FLAG DMA_Int_Flag;
76 extern USB_INT_FLAG USB_Int_Flag;
77 extern USBCBW USB_CBW;
78 extern void Init_Device(void);
79 extern UC code Test_Packet[];
80 extern void Init_Endpoint(void);
81 extern void Init_Device(void);
82 extern void Set_USB(void);
83 extern void ZLG7290_SendBuf(unsigned char * disp_buf,unsigned char num);
84
85 //***********************************************************************
86 //* *
87 //* Prototype Routine Definition *
88 //* *
89 //***********************************************************************
90 unsigned int read_endpoint(unsigned char endp,unsigned int len,unsigned char *buf);
91 void USB_Setup(void);
92 void reserved(void);
93 void Send_Device_Status(void);
94 void Send_Interface_Status(void);
95 void Send_Endpoint_Status(void);
96
97 void Vendor_Specific_Command(void);
98 void Send_Status(unsigned char tran_status);
99
100 void Set_Interface_Value(void);
101 void Get_Interface_Value(void);
102 void Process_Synch_Frame(void);
103
104 void get_status(void);
105 void clear_feature(void);
106 void set_feature(void);
107 void set_address(void);
108 void get_descriptor(void);
109 void get_config(void);
110 void set_config(void);
111 void get_interface(void);
112 void set_interface(void);
113
114 void Set_Descriptor(void);
115 void reserved(void);
116
117 void ep0in_ack(void);
C51 COMPILER V7.06 CHAP_9 07/02/2003 10:05:13 PAGE 3
118 void ep0out_ack(void);
119 void wait_ep0tx(void);
120 void wait_ep0rx(void);
121
122 //***********************************************************************
123 //* *
124 //* Variable Definition *
125 //* *
126 //***********************************************************************
127
128 USB_INT_FLAG USB_Int_Flag;
129 USB_DEVICE_REQ idata USB_Device_Request;
130 USB_DEVICE USB_Device;
131
132 UC code disp_buf0[8]={0,0,0,0,0,0,0,0}; //LED初始化值
133 UC code disp_buf1[8]={1,1,1,1,1,1,1,1}; //LED初始化值
134
135 UC code *Descriptor_Ptr;
136
137 UC idata Endpt_FIFO[MAX_BUF];
138 UI FIFO_Count;
139 UC VID[2],PID[2];
140 FILESIZE FileSize;
141 UI PIO_Count;
142 UC File_Number;
143 UC Current_File,bytecouter;
144 ULI bytecount;
145
146 //USB標準請求
147 code void (*StandardDeviceRequest[])(void) =
148 {
149 get_status,
150 clear_feature,
151 reserved,
152 set_feature,
153 reserved,
154 set_address,
155 get_descriptor,
156 reserved,
157 get_config,
158 set_config,
159 get_interface,
160 set_interface,
161 reserved,
162 reserved,
163 reserved,
164 reserved
165 };
166
167
168
169 //***********************************************************************
170 //* *
171 //* Routine Definition *
172 //* *
173 //***********************************************************************
174
175 //***********************************************************************
176 //* *
177 //* Routine : USB Debug Mode *
178 //* Input : USB Interrupt Register *
179 //* Output : None *
C51 COMPILER V7.06 CHAP_9 07/02/2003 10:05:13 PAGE 4
180 //* Function : Branch to respective ISR *
181 //* *
182 //***********************************************************************
183
184 void USB_Debug_Mode(void)
185 {
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -