📄 eos.lst
字号:
192 1 else if (value == 0x08)
193 1 {
194 2 return_value = 1;
195 2 }
196 1 else return_value = 2;
197 1
198 1 SetResRdyTbl(35);
199 1 return(return_value);
200 1 }
201
202 void report_search_location(unsigned char value){
203 1 //C94回应函数
204 1 tx_buf[0] = '$';
205 1 tx_buf[1] = '2';
206 1 tx_buf[2] = '1';
207 1 tx_buf[3] = 0x43;
208 1 tx_buf[4] = 0x39;
209 1 tx_buf[5] = 0x34;
210 1 tx_buf[6] = '0';
211 1 tx_buf[7] = '0';
212 1 tx_buf[8] = '0';
213 1 tx_buf[9] = '2';
214 1 if (value < 2)
215 1 tx_buf[10] = '0';
216 1 else tx_buf[10] = '2';
217 1 tx_buf[11] = value + 0x30;
218 1 tx_buf[12] = '*';
219 1 tx_buf_pointer = 0;
220 1 while(tx_buf[tx_buf_pointer] != '*'){
221 2 SBUF = tx_buf[tx_buf_pointer];
222 2 while(tx_done == 0);
223 2 tx_done = 0;
224 2 tx_buf_pointer++;
225 2 }
226 1 SBUF = tx_buf[tx_buf_pointer]; //发送最后一个字符'*'
227 1 while(tx_done == 0);
228 1 tx_done = 0;
229 1 }
230
231
232 unsigned char set_EOS_work_state(struct cmd_para_save *set_EOS_work){
233 1 //C95设置EOS盘工作方式
234 1 unsigned char xdata board;
235 1 unsigned char xdata type;
236 1 unsigned char xdata value;
237 1 unsigned char xdata return_value;
238 1
239 1 commandid = 0x00433935;
240 1 board = set_EOS_work -> set_work_state_board;
241 1 type = set_EOS_work -> set_work_state_value;
C51 COMPILER V7.50 EOS 03/10/2006 16:35:52 PAGE 5
242 1
243 1 if (type == 0)
244 1 {
245 2 value = se0121_reg_rd(E_cortrol,board);
246 2 value &= 0xFB;
247 2 se0121_reg_wr(E_cortrol,value,board);
248 2 return_value = 0;
249 2 }
250 1 else if (type == 1)
251 1 {
252 2 value = se0121_reg_rd(E_cortrol,board);
253 2 value |= 0x04;
254 2 se0121_reg_wr(E_cortrol,value,board);
255 2 return_value = 0;
256 2 }
257 1 else return_value = 2;
258 1
259 1 SetResRdyTbl(1);
260 1 return(return_value);
261 1 }
262
263 unsigned char get_EOS_work_state(struct cmd_para_save *get_EOS_work){
264 1 //C96读取EOS盘工作方式
265 1 unsigned char xdata board;
266 1 unsigned char xdata value;
267 1 unsigned char xdata return_value;
268 1
269 1 board = get_EOS_work -> get_work_state_board;
270 1
271 1 value = se0121_reg_rd(E_cortrol,board);
272 1 value &= 0x04;
273 1 if (value == 0)
274 1 {
275 2 return_value = 0;
276 2 }
277 1 else return_value = 1;
278 1
279 1 SetResRdyTbl(37);
280 1 return(return_value);
281 1 }
282
283 void report_EOS_work_state(unsigned char value){
284 1 //C96回应函数
285 1 tx_buf[0] = '$';
286 1 tx_buf[1] = '2';
287 1 tx_buf[2] = '1';
288 1 tx_buf[3] = 0x43;
289 1 tx_buf[4] = 0x39;
290 1 tx_buf[5] = 0x36;
291 1 tx_buf[6] = '0';
292 1 tx_buf[7] = '0';
293 1 tx_buf[8] = '0';
294 1 tx_buf[9] = '2';
295 1 tx_buf[10] = '0';
296 1 tx_buf[11] = value + 0x30;
297 1 tx_buf[12] = '*';
298 1 tx_buf_pointer = 0;
299 1 while(tx_buf[tx_buf_pointer] != '*'){
300 2 SBUF = tx_buf[tx_buf_pointer];
301 2 while(tx_done == 0);
302 2 tx_done = 0;
303 2 tx_buf_pointer++;
C51 COMPILER V7.50 EOS 03/10/2006 16:35:52 PAGE 6
304 2 }
305 1 SBUF = tx_buf[tx_buf_pointer]; //发送最后一个字符'*'
306 1 while(tx_done == 0);
307 1 tx_done = 0;
308 1 }
309
310 unsigned char set_timeslot_num(struct cmd_para_save *timeslot_num){
311 1 //C97设置EOS盘的时隙个数
312 1 unsigned char xdata board;
313 1 unsigned char xdata num;
314 1 unsigned char xdata value;
315 1 unsigned char xdata return_value;
316 1
317 1 commandid = 0x00433937;
318 1 board = timeslot_num -> set_EOS_num_board;
319 1 num = timeslot_num -> set_EOS_num_value;
320 1
321 1 if (num < 6)
322 1 {
323 2 value = se0121_reg_rd(Eos_clock,board); //取出EOS盘时隙个数寄存器值
324 2 value = (value & 0xC7) | (num << 3); //使配值时隙个数寄存器的bit位为零后再配置
325 2 se0121_reg_wr(Eos_clock,value,board);
326 2 return_value = 0;
327 2 }
328 1 else return_value = 2;
329 1
330 1 SetResRdyTbl(1);
331 1 return (return_value);
332 1 }
333
334 unsigned char get_timeslot_num(struct cmd_para_save *timeslot_num){
335 1 //C98读取EOS盘的时隙个数
336 1 unsigned char xdata board;
337 1 unsigned char xdata num;
338 1 unsigned char xdata value;
339 1
340 1 board = timeslot_num -> get_EOS_num_board;
341 1
342 1 value = se0121_reg_rd(Eos_clock,board); //取出EOS盘时隙个数寄存器值
343 1 num = (value & 0x38) >> 3;
344 1
345 1 SetResRdyTbl(39);
346 1 return (num);
347 1 }
348
349 void report_EOS_num(unsigned char time_num){
350 1 //C98回应函数
351 1 tx_buf[0] = '$';
352 1 tx_buf[1] = '2';
353 1 tx_buf[2] = '1';
354 1 tx_buf[3] = 0x43;
355 1 tx_buf[4] = 0x39;
356 1 tx_buf[5] = 0x38;
357 1 tx_buf[6] = '0';
358 1 tx_buf[7] = '0';
359 1 tx_buf[8] = '0';
360 1 tx_buf[9] = '2';
361 1 tx_buf[10] = '0';
362 1 tx_buf[11] = time_num + 0x30;
363 1 tx_buf[12] = '*';
364 1 tx_buf_pointer = 0;
365 1 while(tx_buf[tx_buf_pointer] != '*'){
C51 COMPILER V7.50 EOS 03/10/2006 16:35:52 PAGE 7
366 2 SBUF = tx_buf[tx_buf_pointer];
367 2 while(tx_done == 0);
368 2 tx_done = 0;
369 2 tx_buf_pointer++;
370 2 }
371 1 SBUF = tx_buf[tx_buf_pointer]; //发送最后一个字符'*'
372 1 while(tx_done == 0);
373 1 tx_done = 0;
374 1 }
375
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1059 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 1 24
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
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 + -