📄 int.lst
字号:
C51 COMPILER V7.07 INT 09/26/2006 08:56:41 PAGE 1
C51 COMPILER V7.07, COMPILATION OF MODULE INT
OBJECT MODULE PLACED IN INT.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE INT.C BROWSE DEBUG OBJECTEXTEND
stmt level source
1 /*******************************************************************************
2 INT.C
3 Copyright (c) Himax, Inc. All rights reserved.
4 *******************************************************************************/
5 #include "intrins.h"
6 #include "MCU_IO.h"
7 #include "COMMON.H"
8 #include "Key.H"
9 #include "MAIN.H"
10 #include "i2c_control.h"
11 #include "HX8824.h"
12 #include "OSD.h"
13 #include "rs232.h"
14 #include "MATH.h"
15
16 /*==============================================================================
17 User Define
18 ==============================================================================*/
19 /*
20 typedef struct IRCODE
21 {
22 unsigned char ready;
23 unsigned char index;
24 unsigned int h_period;
25 unsigned int l_period;
26 unsigned char command;
27 };
28 */
29 struct IRCODE Remote_Code;
30 /*==============================================================================
31 Function: Timer0 interrupt operation
32 ==============================================================================*/
33 void Int0 (void) interrupt 0
34 {
35 1
36 1 static unsigned long RCode;
37 1 unsigned long command_a, command_b;
38 1
39 1 if(Remote_Code.index == 0)
40 1 {
41 2 Remote_Code.index = 1;
42 2 TR1 = ET1 = 1; // start timer1, enable timer1 interrupt
43 2 }
44 1 else
45 1 {
46 2 if(Remote_Code.index == 1)
47 2 {
48 3 if((abs(Remote_Code.l_period - 90) < 3) && (abs(Remote_Code.h_period - 45) < 3)) //check single cl
-ick header 9msL 4.5msH
49 3 Remote_Code.index = 2;
50 3 else
51 3 {
52 4 if((abs(Remote_Code.l_period - 90) < 3) && (abs(Remote_Code.h_period - 22) < 3)) //check repeat he
-ader 9msL 2.2msH
53 4 {
C51 COMPILER V7.07 INT 09/26/2006 08:56:41 PAGE 2
54 5 Remote_Code.ready = 1;
55 5 }
56 4 Remote_Code.index = 0;
57 4 }
58 3 }
59 2 else//capture data (1==>0.56msL+1.69msH) (0==>0.56msL+0.56msH)
60 2 {
61 3 RCode >>= 1;
62 3 if((abs(Remote_Code.l_period - 6) < 3) && (abs(Remote_Code.h_period - 17) < 3))
63 3 RCode |= 0x80000000;
64 3 if(++Remote_Code.index == 34)
65 3 {
66 4 TR1 = ET1 = 0;
67 4 if(((RCode % 0x00010000) == REMOTE_SYS1) || ((RCode % 0x00010000) == REMOTE_SYS2))
68 4 {
69 5 command_a = RCode / 0x00010000;
70 5 command_b = command_a / 0x100;
71 5 command_a = command_a % 0x100;
72 5 if((command_a + command_b) == 0xff)
73 5 {
74 6 Remote_Code.command = command_a;
75 6 Remote_Code.ready = 1;
76 6 if(Remote_Code.command == 0)//Fake Code 00
77 6 Remote_Code.command = 0xff;
78 6 }
79 5 }
80 4 Remote_Code.index = 0;
81 4 }
82 3 }
83 2 }
84 1 Remote_Code.h_period=Remote_Code.l_period = 0;
85 1 }
86 /* ================================================================
87 Name : Timer0
88 Purpose : Timer0 interrupt operation
89 Passed : None
90 Notes : None
91 ================================================================ */
92
93 void Timer0(void) interrupt 1
94 {
95 1
96 1 //---For OSD Timer and Power Saving Timer---//
97 1 if(Osd_Status==1)
98 1 {
99 2 Counter++;
100 2 //Puts_UART("counter = ");HexTobyStr(Counter);Puts_UART(byStr);Puts_UART("\r\n");
101 2 }
102 1
103 1 if(Counter==10)
104 1 {
105 2 Second++;
106 2 Counter=0;
107 2 if(Second==OSD_Time)
108 2 {
109 3 bosdtimeout=1; // time out, OSD disappear
110 3 Second=0;
111 3 }
112 2 }
113 1
114 1 // 2002 01 09 phase test
115 1 //---For Keyboard---//
C51 COMPILER V7.07 INT 09/26/2006 08:56:41 PAGE 3
116 1 KeyTimerCounter++;
117 1 if(bkey_fast)
118 1 {
119 2 if(KeyTimerCounter > 10) //200
120 2 bkeypress = KeyTimerCounter = 0;
121 2 }
122 1 else
123 1 {
124 2 if(KeyTimerCounter > 160) //1600
125 2 bkeypress = KeyTimerCounter = 0;
126 2 }
127 1 }
128
129 /* ================================================================
130 Name : INT1
131 Purpose :
132 Passed : None
133 Notes : None
134 ================================================================ */
135 /*
136 void INT1(void) interrupt 2
137 {
138 // remove to EXCEP.C
139 }
140 */
141
142 /* ================================================================
143 Name : Serial
144 Purpose :
145 Passed : None
146 Notes : None
147 ================================================================ */
148 /*
149 void Serial(void) interrupt 4
150 {
151 }
152 */
153 /* ================================================================
154 Name : T0_int
155 Purpose :
156 Passed : None
157 Notes : None
158 ================================================================ */
159 /*
160 void T0_int() interrupt 1
161 {
162 TH0 = (8192 - 5000)/32;
163 TL0 = (8192 - 5000)%32;
164 if(--timer_cnt == 0)
165 {
166 timer_cnt = 100;
167 LEDR = ~LEDR;
168 }
169 }
170 */
171 /*==============================================================================
172 Function: Timer1 interrupt operation
173 ==============================================================================*/
174 void Timer1(void) interrupt 3
175 {
176 1
177 1 static unsigned char FreeKeyCounter;
C51 COMPILER V7.07 INT 09/26/2006 08:56:41 PAGE 4
178 1
179 1 if(RX_ON)
180 1 Remote_Code.h_period++;
181 1 else
182 1 Remote_Code.l_period++;
183 1
184 1 if(Remote_Code.h_period > 1080)
185 1 {//no key pressed
186 2 Remote_Code.index = 0;
187 2 Remote_Code.command = REMOTE_NULL;
188 2 Remote_Code.ready = 1;
189 2 if(++FreeKeyCounter == 2)//no key pressed for 3 cycle
190 2 TR1 = ET1 = 0;
191 2 }
192 1 else
193 1 {
194 2 FreeKeyCounter = 0;
195 2 }
196 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 579 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 12 8
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 + -