keyremo.lst

来自「显示屏驱动源代码」· LST 代码 · 共 800 行 · 第 1/3 页

LST
800
字号
C51 COMPILER V7.06   KEYREMO                                                               02/21/2008 14:00:26 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE KEYREMO
OBJECT MODULE PLACED IN .\Output\keyremo.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE keyremo.c COMPACT OPTIMIZE(9,SIZE) BROWSE INCDIR(.\Include\) DEBUG OBJECTEX
                    -TEND PRINT(.\Source\keyremo.lst) OBJECT(.\Output\keyremo.obj)

stmt level    source

   1          //
   2          // KeyRemo.h
   3          // Default function for Key Input and Remocon Input
   4          //
   5          //=============================================================================
   6          //                                  Operation Key Mapping
   7          //=============================================================================
   8          #include "config.h"
   9          #include "typedefs.h"
  10          #include "keyremo.h"
  11          #include "measure.h"
  12          #include "audio.h"
  13          #include "dispinfo.h"
  14          #include "main.h"
  15          #include "i2c.h"
  16          #include "osdmenu.h"
  17          #include "cpu.h"
  18          #include "printf.h"
  19          #include "regmap.h"
  20          #include "reg.h"
  21          #ifdef SUPPORT_TV
              #include "Tuner.h"
              #endif
  24          
  25          
  26          extern  bit             OnChangingValue;
  27          extern  bit             RepeatKey;
  28          #ifdef SUPPORT_DEBUG
              extern  bit Debug_On;
              #endif
  31          extern  IDATA   BYTE  PcMode;
  32          extern                  WORD  OSDLastKeyInTime;         // in ms
  33          extern                  bit   DisplayInputHold;
  34          extern  DATA  WORD  tic_pc;
  35          extern                  bit KeyReady;
  36          extern  DATA BYTE Key;
  37          
  38          extern  IDATA BYTE      RemoDataReady,RemoSystemCode, RemoDataCode;
  39          extern  bit             ChannelEdit_Flag;
  40          extern  bit                     ChannelEdit_on;
  41          
  42          
  43          #if (defined SUPPORT_TV)
              BYTE ToNumber( BYTE chncode )
              {
                      switch( chncode ) {
                      case REMO_NUM0:         return 0;
                      case REMO_NUM1:         return 1;
                      case REMO_NUM2:         return 2;
                      case REMO_NUM3:         return 3;
                      case REMO_NUM4:         return 4;
                      case REMO_NUM5:         return 5;
                      case REMO_NUM6:         return 6;
                      case REMO_NUM7:         return 7;
C51 COMPILER V7.06   KEYREMO                                                               02/21/2008 14:00:26 PAGE 2   

                      case REMO_NUM8:         return 8;
                      case REMO_NUM9:         return 9;
                      default: return 0xff; 
                      }
              }
              #endif
  61          
  62          void RemoMenu_MenuKey(void)
  63          {
  64   1              if(  GetDisplayedOSD() & MENU  )                OSDHighMenu();
  65   1              else                                                                    OpenOSDMenu();
  66   1      }
  67          
  68          void RemoChnUp_UpKey(void)
  69          {
  70   1      
  71   1              #ifdef SUPPORT_DEBUG
                      if( Debug_On ) {
                              DebugWindowData(UP);
                              return;
                      }
                      else 
                      #endif  
  78   1              if( GetDisplayedOSD() & MENU  ) 
  79   1                      #ifdef PAL_TV
                              if( ChannelEdit_Flag) {
                                      if( ChannelEdit_on )                                    ChannelEdit_Char(UP);
                                      else {          
                                              UpDownTVChannel(DN);
                                              ChannelEdit_display();
                                      }
                              }
                              else
                              #endif  
  89   1                      OSDCursorMove(UP);      
  90   1              #ifdef SUPPORT_PC
  91   1              else if( GetInputSelection()==PC )              AutoAdjust();
  92   1              #endif
  93   1      
  94   1              #ifdef SUPPORT_TV
                      else if( GetInputSelection() == TV )    
                              UpDownTVChannel(UP);
                      #endif
  98   1      
  99   1              else    
 100   1                      return;
 101   1      
 102   1      }
 103          
 104          void RemoChnDn_DnKey(void)
 105          {
 106   1      
 107   1              #ifdef SUPPORT_DEBUG
                      if( Debug_On ) {
                              DebugWindowData(DN);
                              return;
                      }
                      else 
                      #endif  
 114   1              if( GetDisplayedOSD() & MENU  ) {
 115   2                      #ifdef PAL_TV
                              if( ChannelEdit_Flag){
C51 COMPILER V7.06   KEYREMO                                                               02/21/2008 14:00:26 PAGE 3   

                                      if( ChannelEdit_on )                                    ChannelEdit_Char(DN);
                                      else {          
                                              UpDownTVChannel(UP);
                                              ChannelEdit_display();
                                      }
                              }
                              else
                              #endif
 125   2                      OSDCursorMove(DN);      
 126   2              }
 127   1              #ifdef SUPPORT_TV
                      else if( GetInputSelection() == TV )    UpDownTVChannel(DN);
                      #endif
 130   1              else
 131   1                      #ifdef SUPPORT_LINE_OSDDEMO
                              DisplayLineOSD();
                              #endif
 134   1                      return;
 135   1      
 136   1      }
 137          
 138          void RemoVolUp_RightKey(void)
 139          {
 140   1              #ifdef SUPPORT_DEBUG
                      if( Debug_On ) {
                              DebugWindowCursor(UP);
                              return;
                      }
                      else 
                      #endif  
 147   1              if(  GetDisplayedOSD() & MENU  ) {
 148   2                      if( OnChangingValue )                                           OSDValueUpDn(UP );
 149   2                      #ifdef PAL_TV
                              else if( ChannelEdit_Flag )                                     ChannelEdit_Cursor (UP);
                              #endif
 152   2                      else                                                                            OSDSelect();                    
 153   2              }
 154   1              else 
 155   1              {
 156   2                      ChangeVol(1);
 157   2                      DisplayVol();
 158   2              }
 159   1      }
 160          
 161          void RemoVolDn_LeftKey(void)
 162          {
 163   1              #ifdef SUPPORT_DEBUG
                      if( Debug_On ) {
                              DebugWindowCursor(DN);
                              return;
                      }
                      else 
                      #endif
 170   1              if(  GetDisplayedOSD() & MENU  ) {
 171   2                      if( OnChangingValue )                                           OSDValueUpDn(DN );
 172   2                      #ifdef PAL_TV
                              else if( ChannelEdit_Flag )                                     ChannelEdit_Cursor (DN);
                              #endif
 175   2                      else OSDHighMenu();     
 176   2              }
 177   1              else 
 178   1              {
C51 COMPILER V7.06   KEYREMO                                                               02/21/2008 14:00:26 PAGE 4   

 179   2                      ChangeVol(-1);
 180   2                      DisplayVol();
 181   2              }
 182   1      }
 183          
 184          
 185          //=============================================================================
 186          //
 187          //=============================================================================
 188          BYTE ActionRemo(BYTE _RemoDataCode, BYTE AutoKey)
 189          {
 190   1      
 191   1              SetOSDLastKeyInTime();
 192   1      /*      
 193   1              #if (defined SUPPORT_PC) || (defined SUPPORT_DTV)       
 194   1      
 195   1              if( (PcMode==EE_PC_NO_SIGNAL) && (GetInputSelection()==PC || GetInputSelection()==DTV) ) {
 196   1                      if( PcMode==EE_PC_NO_SIGNAL ) {
 197   1                              switch (_RemoDataCode) {
 198   1                              case REMO_INPUT:
 199   1                              //case REMO_STANDBY:    
 200   1                                      break;
 201   1                                      
 202   1                              default:
 203   1                                      tic_pc = 0;
 204   1                                      return 1;
 205   1                              }
 206   1                      }
 207   1              }
 208   1              #endif // SUPPORT_PC
 209   1      */
 210   1              switch(_RemoDataCode) {
 211   2      
 212   2              case REMO_STANDBY:                              // power
 213   2                      #ifdef DEBUG_KEYREMO
                              dPrintf("\r\nSTANDBY Mode, Autokey:%02x", AutoKey);
                              #endif
 216   2                      OSDLastKeyInTime = 0xffff;
 217   2                      if( AutoKey ) return 1;
 218   2                      return 0;                                       // power off
 219   2      
 220   2              case REMO_MUTE:
 221   2                      #ifdef DEBUG_KEYREMO
                              dPrintf("\r\nMUTE Mode, Autokey:%02x", AutoKey);
                              #endif
 224   2                      if( AutoKey ) return 1;
 225   2                      ToggleAudioMute();
 226   2                      if( IsAudioMuteOn() )           DisplayMuteInfo();
 227   2                      else{                                           
 228   3                              ClearMuteInfo();
 229   3                              if( DisplayInputHold ) DisplayInput();
 230   3                      }
 231   2                      break;
 232   2      
 233   2              case REMO_INPUT:
 234   2                      #ifdef DEBUG_KEYREMO
                              dPrintf("\r\nChange INPUT, Autokey:%02x", AutoKey);
                              #endif
 237   2                      ChangeInput(GetNextInputSelection());
 238   2                      return 1;
 239   2      
 240   2              case REMO_INFO:
C51 COMPILER V7.06   KEYREMO                                                               02/21/2008 14:00:26 PAGE 5   

 241   2                      #ifdef DEBUG_KEYREMO
                              dPrintf("\r\nINFO display, Autokey:%02x", AutoKey);
                              #endif
 244   2                      if( GetDisplayedOSD() & INPUTINFO )     ClearInput();
 245   2                      else            DisplayInput();
 246   2                      return 1;
 247   2      
 248   2              case REMO_NUM0:
 249   2              case REMO_NUM1:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?