timer2.lst
来自「mifarea卡程序mifarea卡程序mifarea卡程序」· LST 代码 · 共 284 行 · 第 1/2 页
LST
284 行
102 1
103 1 TR2 = 0;//FALSE;
*** ERROR C202 IN LINE 103 OF SOURCE\TIMER2.C: 'TR2': undefined identifier
104 1
105 1 }
106
107
108 /****************************************************************************
109 * *
110 * Function: delay_1ms *
111 * *
112 * Input: _1ms *
113 * Output: - *
114 * *
115 * Description: *
116 * *
117 * Time delay with a resolution of 1 ms. *
118 * *
119 ****************************************************************************/
120
121 void delay_1ms (unsigned char _1ms)
122 {
123 1
124 1 RCAP2LH = RCAP2_1ms;
*** ERROR C202 IN LINE 124 OF SOURCE\TIMER2.C: 'RCAP2LH': undefined identifier
125 1 T2LH = RCAP2_1ms;
*** ERROR C202 IN LINE 125 OF SOURCE\TIMER2.C: 'T2LH': undefined identifier
126 1 ET2 = 0; // Disable timer2 interrupt
*** ERROR C202 IN LINE 126 OF SOURCE\TIMER2.C: 'ET2': undefined identifier
127 1 T2CON = 0x04; // 16-bit auto-reload, clear TF2, start timer
*** ERROR C202 IN LINE 127 OF SOURCE\TIMER2.C: 'T2CON': undefined identifier
128 1
129 1 while (_1ms--)
130 1 {
131 2 while (!TF2);
132 2 TF2 = 0;//FALSE;
133 2 }
134 1 TR2 = 0;//FALSE;
*** ERROR C202 IN LINE 134 OF SOURCE\TIMER2.C: 'TR2': undefined identifier
135 1
136 1 }
137
138
139 /****************************************************************************
140 * *
141 * Function: delay_10ms *
142 * *
143 * Input: _10ms *
144 * Output: - *
145 * *
C51 COMPILER V7.02a TIMER2 07/23/2003 18:03:53 PAGE 4
146 * Description: *
147 * *
148 * Time delay with a resolution of 10 ms. *
149 * *
150 ****************************************************************************/
151
152 void delay_10ms (unsigned int _10ms)
153 {
154 1
155 1 RCAP2LH = RCAP2_10ms;
*** ERROR C202 IN LINE 155 OF SOURCE\TIMER2.C: 'RCAP2LH': undefined identifier
156 1 T2LH = RCAP2_10ms;
*** ERROR C202 IN LINE 156 OF SOURCE\TIMER2.C: 'T2LH': undefined identifier
157 1 ET2 = 0; // Disable timer2 interrupt
*** ERROR C202 IN LINE 157 OF SOURCE\TIMER2.C: 'ET2': undefined identifier
158 1 T2CON = 0x04; // 16-bit auto-reload, clear TF2, start timer
*** ERROR C202 IN LINE 158 OF SOURCE\TIMER2.C: 'T2CON': undefined identifier
159 1
160 1 while (_10ms--)
161 1 {
162 2 while (!TF2)
163 2 {
164 3 if(0)//if (CmdValid || CmdReceived)
165 3 {
166 4 TR2 = 0;//FALSE;
*** ERROR C202 IN LINE 166 OF SOURCE\TIMER2.C: 'TR2': undefined identifier
167 4 TF2 = 0;//FALSE;
168 4 return;
169 4 }
170 3 }
171 2 TF2 = 0;//FALSE;
172 2 }
173 1 TR2 = 0;//FALSE;
*** ERROR C202 IN LINE 173 OF SOURCE\TIMER2.C: 'TR2': undefined identifier
174 1
175 1 }
176
177
178 #ifdef NOP_DELAY
/****************************************************************************
* *
* Function: delay_50us_NOP *
* *
* Input: - *
* Output: - *
* *
* Description: *
* *
* Zeitverz攇erung von 50 鎠. *
* *
****************************************************************************/
void delay_50us_NOP (void)
{
unsigned char i;
for(i=0; i<81; i++) _nop_();
}
C51 COMPILER V7.02a TIMER2 07/23/2003 18:03:53 PAGE 5
/****************************************************************************
* *
* Function: delay_8us_NOP *
* *
* Input: - *
* Output: - *
* *
* Description: *
* *
* *
****************************************************************************/
void delay_8us_NOP (void)
{
unsigned char i;
for(i=0; i<14; i++) _nop_();
}
#endif
223
224 //#pragma aregs
C51 COMPILATION COMPLETE. 1 WARNING(S), 38 ERROR(S)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?