⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 keypad.lst

📁 mcu for gm5621带遥控,键盘输入的单片机代码.供学习参考使用.谢谢.
💻 LST
📖 第 1 页 / 共 3 页
字号:
 415   3                      //}
 416   3              }  
 417   2              else if (keypadStatus == KEY_IR_TELETEXT_CC)
 418   2              {
 419   3                      //if (KeypadButton==BTN_IR_Teletext_CC|| KeypadButton==BTN_Repeat)
 420   3                      //      KeypadButton=BTN_Repeat;
 421   3                      //else
 422   3                      //{
 423   3                      //      KeypadButton=BTN_IR_Teletext_CC;
 424   3                              gm_sendByte(Key_Teletext_CC|CMD_HEAD_IR);
 425   3                      //}
 426   3              }  
C51 COMPILER V7.50   KEYPAD                                                                07/06/2006 10:40:57 PAGE 8   

 427   2              else if (keypadStatus == KEY_IR_INFO)
 428   2              {
 429   3                      //if (KeypadButton==BTN_IR_Info|| KeypadButton==BTN_Repeat)
 430   3                      //      KeypadButton=BTN_Repeat;
 431   3                      //else
 432   3                      //{
 433   3                      //      KeypadButton=BTN_IR_Info;
 434   3                              gm_sendByte(Key_Info|CMD_HEAD_IR);
 435   3                      //}
 436   3              }  
 437   2              else if (keypadStatus == KEY_IR_F1)
 438   2              {
 439   3                      //if (KeypadButton==BTN_IR_F1|| KeypadButton==BTN_Repeat)
 440   3                      //      KeypadButton=BTN_Repeat;
 441   3                      //else
 442   3                      //{
 443   3                      //      KeypadButton=BTN_IR_F1;
 444   3                              gm_sendByte(Key_F1|CMD_HEAD_IR);
 445   3                      //}
 446   3              }  
 447   2              else if (keypadStatus == KEY_IR_F2)
 448   2              {
 449   3                      //if (KeypadButton==BTN_IR_F2|| KeypadButton==BTN_Repeat)
 450   3                      //      KeypadButton=BTN_Repeat;
 451   3                      //else
 452   3                      //{
 453   3                      //      KeypadButton=BTN_IR_F2;
 454   3                              gm_sendByte(Key_F2|CMD_HEAD_IR);
 455   3                      //}
 456   3              }  
 457   2              else if (keypadStatus == KEY_IR_F3)
 458   2              {
 459   3                      //if (KeypadButton==BTN_IR_F3|| KeypadButton==BTN_Repeat)
 460   3                      //      KeypadButton=BTN_Repeat;
 461   3                      //else
 462   3                      //{
 463   3                      //      KeypadButton=BTN_IR_F3;
 464   3                              gm_sendByte(Key_F3|CMD_HEAD_IR);
 465   3                      //}
 466   3              }  
 467   2              else if (keypadStatus == KEY_IR_F4)
 468   2              {
 469   3                      //if (KeypadButton==BTN_IR_F4|| KeypadButton==BTN_Repeat)
 470   3                      //      KeypadButton=BTN_Repeat;
 471   3                      //else
 472   3                      //{
 473   3                      //      KeypadButton=BTN_IR_F4;
 474   3                              gm_sendByte(Key_F4|CMD_HEAD_IR);
 475   3                      //}
 476   3              }  
 477   2              else if (keypadStatus == KEY_IR_HOLD)
 478   2              {
 479   3                      //if (KeypadButton==BTN_IR_Hold|| KeypadButton==BTN_Repeat)
 480   3                      //      KeypadButton=BTN_Repeat;
 481   3                      //else
 482   3                      //{
 483   3                      //      KeypadButton=BTN_IR_Hold;
 484   3                              gm_sendByte(Key_Hold|CMD_HEAD_IR);
 485   3                      //}
 486   3              }  
 487   2              else if (keypadStatus == KEY_IR_REVEAL)
 488   2              {
C51 COMPILER V7.50   KEYPAD                                                                07/06/2006 10:40:57 PAGE 9   

 489   3                      //if (KeypadButton==BTN_IR_Reveal|| KeypadButton==BTN_Repeat)
 490   3                      //      KeypadButton=BTN_Repeat;
 491   3                      //else
 492   3                      //{
 493   3                      //      KeypadButton=BTN_IR_Reveal;
 494   3                              gm_sendByte(Key_Reveal|CMD_HEAD_IR);
 495   3                      //}
 496   3              }  
 497   2              else if (keypadStatus == KEY_IR_SIZE)
 498   2              {
 499   3                      //if (KeypadButton==BTN_IR_Size|| KeypadButton==BTN_Repeat)
 500   3                      //      KeypadButton=BTN_Repeat;
 501   3                      //else
 502   3                      //{
 503   3                      //      KeypadButton=BTN_IR_Size;
 504   3                              gm_sendByte(Key_Size|CMD_HEAD_IR);
 505   3                      //}
 506   3              }  
 507   2              else if (keypadStatus == KEY_IR_CANCEL)
 508   2              {
 509   3                      //if (KeypadButton==BTN_IR_Cancel|| KeypadButton==BTN_Repeat)
 510   3                      //      KeypadButton=BTN_Repeat;
 511   3                      //else
 512   3                      //{
 513   3                      //      KeypadButton=BTN_IR_Cancel;
 514   3                              gm_sendByte(Key_Cancel|CMD_HEAD_IR);
 515   3                      //}
 516   3              }  
 517   2              else if (keypadStatus == KEY_IR_MODE)
 518   2              {
 519   3                      //if (KeypadButton==BTN_IR_Mode|| KeypadButton==BTN_Repeat)
 520   3                      //      KeypadButton=BTN_Repeat;
 521   3                      //else
 522   3                      //{
 523   3                      //      KeypadButton=BTN_IR_Mode;
 524   3                              gm_sendByte(Key_Mode|CMD_HEAD_IR);
 525   3                      //}
 526   3              }  
 527   2              else if (keypadStatus == KEY_IR_INDEX)
 528   2              {
 529   3                      //if (KeypadButton==BTN_IR_Index|| KeypadButton==BTN_Repeat)
 530   3                      //      KeypadButton=BTN_Repeat;
 531   3                      //else
 532   3                      //{
 533   3                      //      KeypadButton=BTN_IR_Index;
 534   3                              gm_sendByte(Key_Index|CMD_HEAD_IR);
 535   3                      //}
 536   3              }  
 537   2              else if (keypadStatus == KEY_IR_SWAP)
 538   2              {
 539   3                      //if (KeypadButton==BTN_IR_Swap|| KeypadButton==BTN_Repeat)
 540   3                      //      KeypadButton=BTN_Repeat;
 541   3                      //else
 542   3                      //{
 543   3                      //      KeypadButton=BTN_IR_Swap;
 544   3                              gm_sendByte(Key_IR_SWAP|CMD_HEAD_IR);
 545   3                      //}
 546   3              }  
 547   2              else if (keypadStatus == KEY_IR_PIP_SIZE)
 548   2              {
 549   3                      //if (KeypadButton==BTN_IR_PIP_Size|| KeypadButton==BTN_Repeat)
 550   3                      //      KeypadButton=BTN_Repeat;
C51 COMPILER V7.50   KEYPAD                                                                07/06/2006 10:40:57 PAGE 10  

 551   3                      //else
 552   3                      //{
 553   3                      //      KeypadButton=BTN_IR_PIP_Size;
 554   3                              gm_sendByte(Key_PIP_Size|CMD_HEAD_IR);
 555   3                      //}
 556   3              }  
 557   2              else if (keypadStatus == KEY_IR_SUB)
 558   2              {
 559   3                      //if (KeypadButton==BTN_IR_Sub|| KeypadButton==BTN_Repeat)
 560   3                      //      KeypadButton=BTN_Repeat;
 561   3                      //else
 562   3                      //{
 563   3                      //      KeypadButton=BTN_IR_Sub;
 564   3                              gm_sendByte(Key_Sub|CMD_HEAD_IR);
 565   3                      //}
 566   3              }  
 567   2              else if (keypadStatus == KEY_IR_FREEZE)
 568   2              {
 569   3                      //if (KeypadButton==BTN_IR_Freeze|| KeypadButton==BTN_Repeat)
 570   3                      //      KeypadButton=BTN_Repeat;
 571   3                      //else
 572   3                      //{
 573   3                      //      KeypadButton=BTN_IR_Freeze;
 574   3                              gm_sendByte(Key_Freeze|CMD_HEAD_IR);
 575   3                      //}
 576   3              }
 577   2              else if (keypadStatus == KEY_IR_AUDIOMODE)
 578   2              {
 579   3                      //if (KeypadButton==BTN_IR_Freeze|| KeypadButton==BTN_Repeat)
 580   3                      //      KeypadButton=BTN_Repeat;
 581   3                      //else
 582   3                      //{
 583   3                      //      KeypadButton=BTN_IR_Freeze;
 584   3                              //gm_sendByte(Key_IR_AudioMode|CMD_HEAD_IR);
 585   3                      //}
 586   3              }
 587   2      
 588   2      
 589   2      
 590   2       
 591   2              //=====================================================
 592   2                      else
 593   2                      {
 594   3              
 595   3                              KeypadButton=BTN_Nothing;
 596   3                      
 597   3                      }
 598   2              }
 599   1              else
 600   1              {
 601   2                      if(!IR_ErrTimeCount)
 602   2                      {       
 603   3                              KeypadButton=BTN_Nothing;       
 604   3                      }
 605   2              }
 606   1      
 607   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    663    ----
   CONSTANT SIZE    =     12    ----
C51 COMPILER V7.50   KEYPAD                                                                07/06/2006 10:40:57 PAGE 11  

   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =      1       1
   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 + -