📄 debug.lst
字号:
342 6 printk(" %bx",flash_rbuf[i]);
343 6 }
344 5 }
345 4 else if(!strcmp(dbcmd[0],"initeeprom")){
346 5 printk("\n Init eeprom");
347 5 init_eeprom();
348 5 }
349 4 else if(!strcmp(dbcmd[0],"weight")){
350 5 if(argc==2){
351 6 intnum=atoi(dbcmd[1]);
352 6 if(intnum>10000){
353 7 printk("\n Too weight,error");
354 7 }
355 6 else{
356 7 printk("\n Weight=%d",intnum);
357 7 i=(unsigned char)(intnum/1000);
358 7 show_notice.weight[0]=i%10;
359 7 intnum %=1000;
360 7 i=(unsigned char)(intnum/100);
361 7 show_notice.weight[1]=i%10;
362 7 intnum %=100;
363 7 i=(unsigned char)(intnum/10);
364 7 show_notice.weight[2]=i%10;
365 7 intnum %=10;
C51 COMPILER V7.06 DEBUG 10/10/2006 14:03:22 PAGE 7
366 7 show_notice.weight[3]=(unsigned char)(intnum);
367 7 intnum=EEPROM_LOAD_ADD;
368 7 AT24C64_wbytes((unsigned char *)&intnum,EEPROM_LOAD_LEN,show_notice.weight);//write load.
369 7 }
370 6 }
371 5 else{
372 6 printk("\n Command error");
373 6 }
374 5 }
375 4 else if(!strcmp(dbcmd[0],"person")){
376 5 if(argc==2){
377 6 intnum=atoi(dbcmd[1]);
378 6 ch=(unsigned char )intnum;
379 6 if(ch>100){
380 7 printk("\n Person too many");
381 7 }
382 6 else{
383 7 printk("\n Person=%c",ch);
384 7 show_notice.person[0]=ch/10;
385 7 show_notice.person[1]=ch%10;
386 7 intnum=EEPROM_PERSON_ADD;
387 7 AT24C64_wbytes((unsigned char *)&intnum,EEPROM_PERSON_LEN,show_notice.person);//write person
388 7 }
389 6 }
390 5 else{
391 6 printk("\n Command error");
392 6 }
393 5 }
394 4 else if(!strcmp(dbcmd[0],"otis")){
395 5 show_notice.otis=1;
396 5 intnum=EEPROM_OTIS_ADD;
397 5 AT24C64_wbytes((unsigned char *)&intnum,EEPROM_OTIS_LEN,&show_notice.otis);//write otis.
398 5 printk("\n Show OTIS");
399 5 }
400 4 else if(!strcmp(dbcmd[0],"xzotis")){
401 5 show_notice.otis=0;
402 5 intnum=EEPROM_OTIS_ADD;
403 5 AT24C64_wbytes((unsigned char *)&intnum,EEPROM_OTIS_LEN,&show_notice.otis);//write xzotis.
404 5 printk("\n Show XZOTIS");
405 5 }
406 4 else if(!strcmp(dbcmd[0],"timer")){
407 5 for(i=0;i<TIMER_NUM;i++){
408 6 printk(" TT[%c].en=%bx.",TT[i].enable);
409 6 }
410 5 }
411 4 else if(!strcmp(dbcmd[0],"refresh")){
412 5 printk("\n refresh=%bx.",refresh);
413 5 }
414 4 else if(!strcmp(dbcmd[0],"refresh")){
415 5 printk("\n Timer tempera cnt=%d en=%bx",TT[TMPERA_TIMER].count,TT[TMPERA_TIMER].enable);
416 5 }
417 4 else if(!strcmp(dbcmd[0],"reserve")){
418 5 if(!strcmp(dbcmd[1],"time")){
419 6 }
420 5 }
421 4 else if(!strcmp(dbcmd[0],"fadd")){//
422 5 ch=xatouc(dbcmd[1]);
423 5 FLASHADD=ch;
424 5 printk("\n Fadd=%bx.",ch);
425 5 }
426 4 else if(!strcmp(dbcmd[0],"dr24")){//
427 5 if(argc==2){
C51 COMPILER V7.06 DEBUG 10/10/2006 14:03:22 PAGE 8
428 6 intnum=atoi(dbcmd[1]);
429 6 ch=(unsigned char )intnum;
430 6 draw_asc16x24(37,10,ch);
431 6 }
432 5 }
433 4 else if(!strcmp(dbcmd[0],"dr8")){//
434 5 if(argc==2){
435 6 intnum=atoi(dbcmd[1]);
436 6 ch=(unsigned char )intnum;
437 6 draw_wordw8(37,10,16,num8x16+ch*16);
438 6 }
439 5 }
440 4 else if(!strcmp(dbcmd[0],"ttimer")){
441 5 test_timer_len=atoi(dbcmd[1]);
442 5 printk("\n Test timer len=%d",test_timer_len);
443 5 }
444 4 else{
445 5 printk("\n Bad command.");
446 5 }
447 4 }
448 3 else{//reset error flag and search command again.
449 4 error_flag=0;
450 4 }
451 3 printk(PROMPT);
452 3 dbcmd_len=0;
453 3 space_flag=1;
454 3 argc=0;
455 3 }
456 2 else{
457 3 if(dbcmd_len<DBCMD_LEN-1){
458 4 if(dsr_buf[dsr_tail]==' '){
459 5 if(space_flag==0){//this is the end of argmet paramter.
460 6 dbcmd[argc][dbcmd_len]='\0';//dsr_buf[dsr_tail];
461 6 if(argc<MAX_DB_ARGC){
462 7 argc++;
463 7 }
464 6 else{
465 7 printk("\n Too many paramter in this command.retry again. :).");
466 7 printk(PROMPT);
467 7 error_flag=1;
468 7 }
469 6 }
470 5 space_flag=1;
471 5 dbcmd_len=0;//ready to receive next paramter.
472 5 //dsr_tail++;
473 5 //dsr_tail %=DSR_LEN;
474 5 }
475 4 else{
476 5 space_flag=0;
477 5 dbcmd[argc][dbcmd_len]=dsr_buf[dsr_tail];
478 5 dbcmd_len++;
479 5 dbcmd_len %=DBCMD_LEN;
480 5 //dsr_tail++;
481 5 //dsr_tail %=DSR_LEN;
482 5 }
483 4 }
484 3 else{
485 4 printk("\n Input too long.Don't make joke with me :).");
486 4 dbcmd_len=0;
487 4 printk(PROMPT);
488 4 error_flag=1;
489 4 }
C51 COMPILER V7.06 DEBUG 10/10/2006 14:03:22 PAGE 9
490 3 print_char(dsr_buf[dsr_tail]);//echo
491 3 }
492 2 dsr_tail++;
493 2 dsr_tail %=DSR_LEN;
494 2 return 1;
495 2 }
496 1 else{//debug receive buf is empty.
497 2 return 0;
498 2 }
499 1 }
500
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 4487 ----
CONSTANT SIZE = 1402 ----
XDATA SIZE = 169 1
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = 1 ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -