📄 global.lst
字号:
C51 COMPILER V7.50 GLOBAL 07/03/2006 14:17:09 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE GLOBAL
OBJECT MODULE PLACED IN ..\..\OUTPUT\NTSC_SOUTH\Global.obj
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE ..\..\KERNEL\Global.c OPTIMIZE(9,SIZE) BROWSE ORDER INCDIR(..\..\INC\;..\..
-\UI\NTSC_SOUTH\) DEFINE(PABLO,MCU_MTV412M,OLGA) DEBUG OBJECTEXTEND PRINT(..\..\OUTPUT\NTSC_SOUTH\Global.lst) OBJECT(..\.
-.\OUTPUT\NTSC_SOUTH\Global.obj)
line level source
1 /******************************************************************************
2 Copyright (c) 2003 MStar Semiconductor, Inc.
3 All rights reserved.
4
5 [Module Name]: Global.c
6 [Date]: 27-Nov-2003
7 [Comment]:
8 Global subroutines.
9 [Reversion History]:
10 *******************************************************************************/
11
12 #define _GLOBAL_C_
13
14 // System
15
16 // Common
17 #include "define.h"
18 #include "mcu.h"
19 #include "common.h"
20
21 // External
22 #include "debug.h"
23 #include "uart.h"
24 #include "userpref.h"
25 #include "irfunc.h"
26 #include "board.h"
27 #include "ram.h"
28 #include "ir.h"
29
30 // internal
31 #include "global.h"
32
33 #if 1 //(!VERSION_DEBUG)
34 code BYTE tDummydata_Global[] =
35 {
36 0x00,
37 };
38 #endif
39
40
41 ////////////////////////////////
42 // Initialize uart
43 ////////////////////////////////
44 void uartInitialize(void)
45 {
46 1 SCON = 0x50; // mode 1, 8-bit UART, enable receive
47 1
48 1 if (_SMOD)
49 1 PCON |= 0x80;
50 1
51 1 TMOD = (TMOD & 0x0f) | 0x20; // timer1, mode 2, 8-bit reload
52 1 TH1 = TIMER1_MODE2_TH1; // set timer1(buad rate)
53 1 TR1 = 1; // timer1 run
C51 COMPILER V7.50 GLOBAL 07/03/2006 14:17:09 PAGE 2
54 1
55 1 TI = 0; // clear transfer flag
56 1 PS = 0; // set uart priority low
57 1 //ES = 1; // enable uart interrupt
58 1 ES = 1; // enable uart interrupt
59 1
60 1 // reset Uart variables
61 1 g_UartCommand.Index = 0;
62 1
63 1 g_bDebugASCIICommandFlag = _DISABLE;
64 1 g_bDebugProgStopFlag = FALSE;
65 1 }
66
67 ///////////////////////////////////////////////////////////////////////////////
68 // <Function>: isrInitializeInterrupt
69 //
70 // <Description>: Initialize MCU interrupt
71 ////////////////////////////////////////////////////////////////////////////////
72 void isrInitializeInterrupt(void)
73 {
74 1 // INT0 setting
75 1 IT0 = 1; // set INT0 type(falling edge)
76 1 PX0 = 0; // set INT0 priority high
77 1 EX0 = 1; // enable INT0 interrupt
78 1
79 1 // INT1 setting
80 1 #ifndef MCU_MTV_412M
81 1 #ifdef ISR_INTERRUPT1
82 1 IT1 = 1; // set INT1 type(falling edge)
83 1 PX1 = 1; // set INT1 priority high
84 1 EX1 = 1; // enable INT1 interrupt
85 1 #endif
86 1 #else
IT1 = 0; // set INT1 type(falling edge)
PX1 = 0; // set INT1 priority high
EX1 = 0; // enable INT1 interrupt
#endif
91 1
92 1 // TIMER0 setting
93 1 TMOD = (TMOD & 0xf0) | 0x01; // set TIMER0 mode 1
94 1 PT0 = 1; // set TIMER0 priority low
95 1 TR0 = 1; // TIMER0 enable
96 1 ET0 = 1; // enable TIMER0 interrupt
97 1 }
98
99 ///////////////////////////////////////////////////////////////////////////////
100 // <Function>: InitVariable
101 //
102 // <Description>: Initialize global variable.
103 ///////////////////////////////////////////////////////////////////////////////
104 void InitVariable(void)
105 {
106 1 g_wMilliSecond = SECOND_TICK;
107 1
108 1 // Ir control menu
109 1 g_ucIrNumKeyTimer = 0;
110 1 ucUartCheckTick = 0;
111 1
112 1 g_bEEpromInit = 0; //EEprom need init 0-No need ,1-need
113 1 g_ucEEpromAddress_x100 = 0;
114 1 g_ucEEpromAddress_x10 = 0;
115 1 g_ucEEpromAddress_x1 = 0;
C51 COMPILER V7.50 GLOBAL 07/03/2006 14:17:09 PAGE 3
116 1 g_ucEEpromData = rmReadByte(G_WEEPROMADDRESS);
117 1 g_bEEpromSave = 0;
118 1 g_bEEpromSaveDone = 0;
119 1
120 1 g_ucIrOkCounter = 0;
121 1
122 1 // 20060513
123 1 s_I2CSel = MCU_RAM;
124 1 g_uwEEStartADDR = 1;
125 1 g_uwEEDataTotal = 1;
126 1
127 1 g_ucMcuEEPType = RM_TYPE_24C16;
128 1 g_ucTvEEPType = RM_TYPE_24C16;
129 1
130 1
131 1 }
132
133
134 ///////////////////////////////////////
135 void SecondTick(void)
136 {
137 1 if (g_bSecondTickFlag)
138 1 {
139 2 g_bSecondTickFlag = 0;
140 2 if (ucUartCheckTick)
141 2 if ((--ucUartCheckTick) == 0)
142 2 g_UartCommand.Index = 0;
143 2 }
144 1 }
145
146
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 176 ----
CONSTANT SIZE = 1 ----
XDATA SIZE = 26 ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = 4 ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -