📄 isr.lst
字号:
C51 COMPILER V8.02 ISR 08/03/2006 10:10:36 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE ISR
OBJECT MODULE PLACED IN .\ISR.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\Firmware\Firmware\ISR.C OMF2 BROWSE DEBUG PRINT(.\ISR.lst) OBJECT(.\ISR.
-obj)
line level source
1 #include "stdio.h"
2 #include "HAL.H"
3 //#include "USBD12.H"
4 #include "SMPro.H"
5 //#include "USB110.H"
6 #include "USB.H"
7 #include "VDOR.H"
8 #include "Isp1581.h"
9 #include "main.h"
10 #include "Isr.h"
11 #include "Iso.h"
12 #include "Hal4sys.h"
13 /*
14 //*************************************************************************
15 // Public static data
16 //*************************************************************************
17 */
18
19 extern ZBOARDFLAGS bZBoardFlags;
20 extern CONTROL_XFER ControlData;
21 extern GLOBE_VARIABLE globe_variable;
22 extern IO_REQUEST idata ioRequest;
23 unsigned char idata GenEpBuf[EP1_PACKET_SIZE];
24 /* ISR static vars */
25 unsigned long lClockTicks = 0;
26
27 /*
28 void ISR_Timer2(void) interrupt 5
29 {
30 }
31
32 void ISR_COMM(void) interrupt 4
33 {
34 }
35
36 void ISR_Timer1(void) interrupt 3
37 {
38 }
39
40 void ISR_INT1(void) interrupt 2
41 {
42 }
43 */
44 void ISR_Timer0(void) interrupt 1
45 {
46 1 DISABLE_INTERRUPTS;
47 1 lClockTicks ++;
48 1 bZBoardFlags.bits.bTimer = 1;
49 1 ENABLE_INTERRUPTS;
50 1 }
51
52
53 void ISR_INT0(void) interrupt 0
54 {
C51 COMPILER V8.02 ISR 08/03/2006 10:10:36 PAGE 2
55 1 DISABLE_INTERRUPTS;
56 1 ISRx_FN_USB();
57 1 ENABLE_INTERRUPTS;
58 1 }
59
60 void ISRx_FN_USB()
61 {
62 1 //unsigned int nST;
63 1 USHORT int_low, int_high;
64 1 unsigned char nosetup;
65 1 //bZBoardFlags.bits.bIN_ISR = 1;
66 1 bZBoardFlags.bits.At_IRQL1 = 1;
67 1
68 1 int_low = ISP1581_ReadInterruptRegisterLow();
69 1 int_high = ISP1581_ReadInterruptRegisterHigh();
70 1 if(int_low != 0 || int_high != 0)
71 1 {
72 2 if(int_low & int_busreset)
73 2 {
74 3 ISP1581_IntClearl(int_busreset);
75 3 if(int_low & int_hs_stat)
76 3 {
77 4 bZBoardFlags.bits.ConnectSpeed = HighSpeed;
78 4 bZBoardFlags.bits.bBus_Reset = 1;
79 4 int_low &= ~int_hs_stat;
80 4 ISP1581_IntClearl(int_hs_stat);
81 4
82 4 }
83 3 else
84 3 {
85 4 bZBoardFlags.bits.ConnectSpeed = FullSpeed;
86 4 bZBoardFlags.bits.bBus_Reset = 1;
87 4 MCU_LED1 = 1;
88 4 }
89 3 }
90 2 if(int_low & int_hs_stat)
91 2 {
92 3 ISP1581_IntClearl(int_hs_stat);
93 3 if(bZBoardFlags.bits.ConnectSpeed == FullSpeed)
94 3 {
95 4 bZBoardFlags.bits.ConnectSpeed = HighSpeed;
96 4 bZBoardFlags.bits.bBus_Reset = 1;
97 4 MCU_LED1 = 0;
98 4 }
99 3 }
100 2 else if(int_low & int_susp)
101 2 {Isr_SuspendChange();}
102 2 else if(int_low & int_resume)
103 2 {Isr_Resume();}
104 2 else if(int_low & int_dma)
105 2 {Isr_DmaEot();}
106 2 else if(int_low & (int_sof|int_psof))
107 2 {Isr_SOF();}
108 2 else {
109 3 if(int_low & int_ep0set)
110 3 {nosetup = 0x0;}
111 3 else
112 3 {nosetup = 0x1;}
113 3 if(int_low & int_ep1rx)
114 3 Isr_Ep01rxDone();
115 3 if(int_low & int_ep1tx)
116 3 Isr_Ep01txDone();
C51 COMPILER V8.02 ISR 08/03/2006 10:10:36 PAGE 3
117 3 if(int_low & int_ep2rx)
118 3 Isr_Ep02rxDone();
119 3 if(int_low & int_ep2tx)
120 3 Isr_Ep02txDone();
121 3 if(int_high & int_ep3rx)
122 3 Isr_Ep03rxDone();
123 3 if(int_high & int_ep3tx)
124 3 Isr_Ep03txDone();
125 3 // *************************** Control pipe *******************************
126 3 if(int_low & int_ep0tx)
127 3 Isr_Ep00TxDone(nosetup);
128 3
129 3 if(int_low & int_ep0rx) /*Keep Control Out of EP0 at Highest priority*/
130 3 Isr_Ep00RxDone(nosetup);
131 3
132 3 if(nosetup == 0)
133 3 Isr_EP0Setup();
134 3 //**************************** not used endpoints*************************
135 3 if(int_high & int_ep4rx)
136 3 Isr_Ep04rxDone();
137 3 if(int_high & int_ep4tx)
138 3 Isr_Ep04txDone();
139 3 }
140 2
141 2 }
142 1 bZBoardFlags.bits.At_IRQL1 = 0;
143 1
144 1 }
145 ///////////////////////////////////////////////////////////////////////////
146 void Isr_SuspendChange(void)
147 {
148 1 ISP1581_IntClearl(int_susp);
149 1 ISP1581_GoSuspend();
150 1 }
151
152 void Isr_Resume(void)
153 {
154 1 ISP1581_UnlockDevice();
155 1 ISP1581_SendResume();
156 1 ISP1581_IntClearl(int_resume);
157 1 }
158
159 void Isr_DmaEot(void)
160 {
161 1 unsigned short dmaeot_reason;// dma_width16, isp1581_dma_counter_remains;
162 1 unsigned int c;
163 1 dmaeot_reason = ISP1581_GetDMAInt();
164 1 ISP1581_SetDMAInt(dmaeot_reason);//clear DMA interrupt ;
165 1 ISP1581_IntClearl(int_dma);
166 1
167 1 //CPLD_ctl(dmactl_stop);
168 1 //ISP1581_SetDMACMD(dmacmd_reset);
169 1 //ISP1581_SetDMAIntMask(0);
170 1 //c = ISP1581_GetIntEnableLow();
171 1 //ISP1581_SetIntEnableLow(c|bulkinendpointinterrupt|bulkoutendpointinterrupt);
172 1
173 1 //清除中断标志
174 1
175 1 bZBoardFlags.bits.dma_state = DMA_IDLE;
176 1 }
*** WARNING C280 IN LINE 162 OF ..\FIRMWARE\FIRMWARE\ISR.C: 'c': unreferenced local variable
177
C51 COMPILER V8.02 ISR 08/03/2006 10:10:36 PAGE 4
178 //true iso
179 void Isr_SOF(void)
180 {
181 1 ISP1581_IntClearl(int_sof|int_psof);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -