📄 main.lst
字号:
C166 COMPILER V6.02, MAIN 08/28/2006 10:05:43 PAGE 1
C166 COMPILER V6.02, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN MAIN.OBJ
COMPILER INVOKED BY: C:\Keil\C166\BIN\C166.EXE MAIN.C MODV2 BROWSE MODV2 DEBUG
stmt lvl source
1 //****************************************************************************
2 // @Module Project Settings
3 // @Filename MAIN.C
4 // @Project TWINCAN.dav
5 //----------------------------------------------------------------------------
6 // @Controller Infineon XC164CS-16F
7 //
8 // @Compiler Keil
9 //
10 // @Codegenerator 2.7
11 //
12 // @Description This file contains the project initialization function.
13 //
14 //----------------------------------------------------------------------------
15 // @Date 12/17/2004 7:07:08 PM
16 //
17 //****************************************************************************
18
19 // USER CODE BEGIN (MAIN_General,1)
20
21 // USER CODE END
22
23
24
25 //****************************************************************************
26 // @Project Includes
27 //****************************************************************************
28
29 #include "MAIN.H"
30
31 // USER CODE BEGIN (MAIN_General,2)
32
33 // USER CODE END
34
35
36 //****************************************************************************
37 // @Macros
38 //****************************************************************************
39
40 // USER CODE BEGIN (MAIN_General,3)
41
42 // USER CODE END
43
44
45 //****************************************************************************
46 // @Defines
47 //****************************************************************************
48
49 // USER CODE BEGIN (MAIN_General,4)
50 extern struct stCanObj
51 {
52 ubyte ubData[8]; // Message Data 0..7
53 ulong ulCANAR; // Arbitration Register
54 ulong ulCANAMR; // Acceptance Mask Register
55 uword uwMSGCTR; // Message Control Register
C166 COMPILER V6.02, MAIN 08/28/2006 10:05:43 PAGE 2
56 uword uwCounter; // Frame Counter
57 uword uwMSGCFG; // Message Configuration Register
58 uword uwINP; // Interrupt Node Pointer
59 uword uwCANFCR; // FIFO / Gateway Control Register
60 uword uwCANPTR; // FIFO Pointer
61 ulong ulReserved; // Reserved
62 };
63 // USER CODE END
64
65
66 //****************************************************************************
67 // @Typedefs
68 //****************************************************************************
69
70 // USER CODE BEGIN (MAIN_General,5)
71
72 // USER CODE END
73
74
75 //****************************************************************************
76 // @Imported Global Variables
77 //****************************************************************************
78
79 // USER CODE BEGIN (MAIN_General,6)
80
81 // USER CODE END
82
83
84 //****************************************************************************
85 // @Global Variables
86 //****************************************************************************
87
88 // USER CODE BEGIN (MAIN_General,7)
89 unsigned char KeyBuf[12] = {'r', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
90 unsigned char WriteIndex = 1;
91 unsigned char ReadIndex = 0;
92 unsigned int CursorPosX;
93 unsigned int CursorPosY;
94 unsigned int MO_Status[32]= {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
95 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
96 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
97 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01};
98 TCAN_SWObj SW_MOs[32];
99 unsigned int MenuID=0;
100 // USER CODE END
101
102
103 //****************************************************************************
104 // @External Prototypes
105 //****************************************************************************
106
107 // USER CODE BEGIN (MAIN_General,8)
108
109 // USER CODE END
110
111
112 //****************************************************************************
113 // @Prototypes Of Local Functions
114 //****************************************************************************
115
116 // USER CODE BEGIN (MAIN_General,9)
117
C166 COMPILER V6.02, MAIN 08/28/2006 10:05:43 PAGE 3
118 // USER CODE END
119
120
121 //****************************************************************************
122 // @Function void MAIN_vInit(void)
123 //
124 //----------------------------------------------------------------------------
125 // @Description This function initializes the microcontroller.
126 //
127 //----------------------------------------------------------------------------
128 // @Returnvalue None
129 //
130 //----------------------------------------------------------------------------
131 // @Parameters None
132 //
133 //----------------------------------------------------------------------------
134 // @Date 12/17/2004
135 //
136 //****************************************************************************
137
138 // USER CODE BEGIN (Init,1)
139
140 // USER CODE END
141
142 void MAIN_vInit(void)
143 {
144 1 // USER CODE BEGIN (Init,2)
145 1
146 1 // USER CODE END
147 1
148 1 /// -----------------------------------------------------------------------
149 1 /// Configuration of the System Clock:
150 1 /// -----------------------------------------------------------------------
151 1 /// - VCO clock used, input clock is connected
152 1 /// - input frequency is 8 MHz
153 1 /// - VCO output frequency 150 .. 200 MHz
154 1 /// - system clock is 40 MHz
155 1
156 1 MAIN_vUnlockProtecReg(); // unlock write security
157 1 PLLCON = 0x7343; // load PLL control register
158 1
159 1
160 1 //// -----------------------------------------------------------------------
161 1 //// Begin of Important Settings for the Start-Up File
162 1 //// -----------------------------------------------------------------------
163 1 /// All following settings must be set in the start-up file. You can use
164 1 /// DAvE's project file (*.dpt) to include this register values into your
165 1 /// compiler EDE.
166 1
167 1 /// ---------------------------------------------------------------------
168 1 /// Initialization of the CPUCON1 Register:
169 1 /// ---------------------------------------------------------------------
170 1 /// - space between two vectors is 2 words
171 1 /// - DISWDT executable until End of Init
172 1 /// - segmentation is enabled
173 1 /// - switch context is interruptible
174 1 /// - branch prediction is enabled
175 1 /// - zero cycle jump function is enabled
176 1
177 1 //// this register must be set in the start-up file
178 1 //// CPUCON1 = 0x0007
179 1
C166 COMPILER V6.02, MAIN 08/28/2006 10:05:43 PAGE 4
180 1 /// ---------------------------------------------------------------------
181 1 /// Initialization of the VECSEG Register:
182 1 /// ---------------------------------------------------------------------
183 1 /// - start from external memory
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -