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

📄 keypad.lst

📁 T116 源码
💻 LST
📖 第 1 页 / 共 2 页
字号:
 248   1              if(I2CReadByte(SlaveAddr, 0x3A+RegAddrShift)&0x06){
 249   2                      SetOPTiming();  // Add by Sherman 05'11'18
 250   2                      OSDShowRatio();
 251   2              }
 252   1              return 1;
 253   1      }
 254          
 255          bit kyMENUEvent(void)
 256          {
 257   1              if(m_bKyBlocked)
 258   1                      return 0;
 259   1      
 260   1                      switch(m_cOSDMenu)
 261   1                      {
 262   2                              case    idNULLMENU:
 263   2                                          m_cOSDMenu=idVIDEOMENU;m_cOSDFunc=idBRIGHTMENU;m_cOSDEvent=OPENMENU;m_cItem=1;break;
 264   2         
 265   2      #ifdef TV
                                      case    idVIDEOMENU:
                                              if((m_cSource&0x0F)==(isrcTV))
                                                      {
                                                      m_cOSDMenu=idTVMENU;m_cOSDFunc=idBRIGHTMENU;m_cOSDEvent=OPENMENU;m_cItem=1;break;} 
                                                      else
                                                          {m_cOSDMenu=idNULLMENU;m_cOSDFunc=0;m_cOSDEvent=CLOSEMENU;m_cItem=0;break;} 
              
              #endif
 274   2      
 275   2                              default:
 276   2                                          m_cOSDMenu=idNULLMENU;m_cOSDFunc=0;m_cOSDEvent=CLOSEMENU;m_cItem=0;break;
 277   2               
 278   2                  }
 279   1                      return 1;
 280   1      
 281   1      }
 282          
 283          /*bit kyMENUEvent(void)
 284          {
 285                  if(m_bKyBlocked)
 286                          return 0;
 287          
 288                          switch(m_cOSDFunc)
 289                          {
 290                                  case    0:
 291                                                  m_cOSDFunc=idBRIGHTMENU;m_cOSDEvent=FUNCENTER;m_cItem=1;break;
 292                                  case    idBRIGHTMENU:
 293                                                  m_cOSDFunc=idCONTRASTMENU;m_cOSDEvent=FUNCENTER;m_cItem=2;break;
 294                                  case    idCONTRASTMENU:
 295                                                  m_cOSDFunc=idSHARP_VIDEO;m_cOSDEvent=FUNCENTER;m_cItem=3;break;
 296                                  case    idSHARP_VIDEO:
 297                                                  {
 298                                                          m_cOSDFunc=idSATMENU_VIDEO;
 299                                                          m_cOSDEvent=FUNCENTER;
 300                                                          m_cItem=4;
 301                                                  }
 302                                                  break;
C51 COMPILER V7.50   KEYPAD                                                                06/16/2006 15:29:44 PAGE 6   

 303                                  case    idSATMENU_VIDEO:
 304                                                  m_cOSDFunc=idHUEMENU_VIDEO;m_cOSDEvent=FUNCENTER;m_cItem=5;break;
 305                                  case    idHUEMENU_VIDEO:
 306                                                  m_cOSDEvent=CLOSEMENU;m_cItem=1;break;
 307                          }
 308                          return 1;
 309          
 310          }*/
 311          
 312          bit kyINCREASEEvent(void)
 313          {
 314   1              if(m_bKyBlocked) return 0;
 315   1              if(!m_cOSDFunc&&m_bFactryMode) return 0;
 316   1      
 317   1              if(m_cOSDFunc==0)
 318   1                      {
 319   2      #ifdef TV
                                      if((m_cSource&0x0F)==(isrcTV))
                                      {
                                              return IRUpKeyCtrl();//0;
                                      }
              #endif
 325   2                      }
 326   1                      else
 327   1                              m_cOSDEvent=FUNCADJ_IN;
 328   1              return 1;
 329   1      }
 330          
 331          bit kyDECREASEEvent(void)
 332          {
 333   1              if(m_bKyBlocked) return 0;
 334   1              if(!m_cOSDFunc&&m_bFactryMode) return 0;
 335   1      
 336   1              if(m_cOSDFunc==0)
 337   1                      {
 338   2      #ifdef TV
                                      if((m_cSource&0x0F)==(isrcTV))
                                      {
                                              return IRDownKeyCtrl();//0;
                                      }
              #endif
 344   2                      }
 345   1                      else
 346   1                              m_cOSDEvent=FUNCADJ_DN;
 347   1              return 1;
 348   1      }
 349          #if 0 
              bit kyEXITEvent(void)
              {
                      if(m_bKyBlocked) return 0;
              
                      if(m_cOSDEvent && (m_cOSDEvent!=FUNCOUNT))
                              m_cOSDEvent=FUNCEXIT;
                      else
                      {
                              if(m_bFactryReady)
                              {
                                      m_bFactryReady=0;
                                      m_cFactryCnt=0;
                              }
                              else
                              {
C51 COMPILER V7.50   KEYPAD                                                                06/16/2006 15:29:44 PAGE 7   

                                      m_cFactryCnt++;
                      if(m_cFactryCnt==3)
                                      {
                              m_bFactryReady=1;
                                      }
                              }
                              m_cOSDEvent=FUNCOUNT;
                      }
                      return 1;
              }
              #endif
 376          bit kyPOWEREvent(void)
 377          {
 378   1      
 379   1                      m_bFactryMode = 0;
 380   1                      if(m_bKyBlocked) m_bKyBlocked=0;
 381   1              m_cOSDEvent=POWERMANAGE;
 382   1      
 383   1              return 1;
 384   1      }
 385          
 386          bit kyIncPollCount(void)
 387          {
 388   1              if (m_wAccelPollCnt==0)
 389   1              {
 390   2              if((m_cOSDEvent==OPENMENU)||(m_cOSDEvent==FUNCENTER)||(m_cOSDEvent==CLOSEMENU)||(m_cOSDEvent==FUNCEXI
             -T))
 391   2                              m_wAccelPollCnt=KEY_MENU_POLL_COUNT;
 392   2                      else if(m_cOSDEvent==POWERMANAGE)
 393   2                              m_wAccelPollCnt=KEY_POWER_SEL;
 394   2                      else
 395   2                      {
 396   3                              if(m_cOSDEvent==FUNCSELCT_IN || m_cOSDEvent==FUNCSELCT_DN )
 397   3                                      m_wAccelPollCnt=KEY_SEL_POLL_COUNT;
 398   3                              else if((m_cOSDEvent==FUNCADJ_IN)||(m_cOSDEvent==FUNCADJ_DN))
 399   3                              m_wAccelPollCnt=KEY_VAL_POLL_COUNT;
 400   3                      }
 401   2                      return 0;
 402   2              }
 403   1              else
 404   1                      m_wAccelPollCnt--;
 405   1              return 1;
 406   1      }
 407          
 408          #ifdef ROTATE
 409          
 410          extern uCHAR Dis_Mode;
 411          bit kyDismodeEvent()
 412          {
 413   1      /*
 414   1      sbit    LEFT_RIGHT      = P0^0; 1: LEFTtoRIGHt, 0: RIGHTtoLEFT
 415   1      sbit    UP_DOWN                 = P0^1; 1: Down, 0: UP 
 416   1      */
 417   1              #ifdef _480_234  //KVGA
 418   1              if((++Dis_Mode)>=VALID_DIR)
 419   1                      Dis_Mode=TOP_LEFT;
 420   1              SET_Dismod();
 421   1              #endif
 422   1      
 423   1              #ifdef _800_480  //WVGA
                      if((++Dis_Mode)>=VALID_DIR)
                              Dis_Mode=TOP_LEFT;
C51 COMPILER V7.50   KEYPAD                                                                06/16/2006 15:29:44 PAGE 8   

                      SET_Dismod();
                      #endif
 428   1              
 429   1              return 1;
 430   1      }
 431          
 432          #endif
 433          
 434          /////////////////
 435          
 436          
 437          /*
 438          #ifdef TV
 439          
 440          bit IRSetupKeyCtrl(void)
 441          {
 442                  if(m_bKyBlocked) return 0;
 443                          if((m_cSource&0x0F)==(isrcTV))
 444                          {
 445                                  if((m_cOSDFunc&0xF0)==idTVMENU_VIDEO)
 446                                  {
 447                                          m_cOSDEvent=FUNCEXIT;
 448                                  }
 449                                  else if((m_cOSDFunc==0))//&0xF0)==idMAINMENU)
 450                                  {
 451                                          m_cOSDFunc=idTVMENU_VIDEO;
 452                                          m_cOSDEvent=FUNCENTER;
 453                                  }
 454                      else return 0;
 455                          }
 456                          else 
 457                                  return 0;
 458                  return 1;
 459          }
 460          
 461          #endif
 462          */
 463          /*
 464          bit IRUpKeyCtrl(void)
 465          {
 466          
 467                  if(m_bKyBlocked) return 0;
 468          
 469          #ifdef TV
 470          
 471              if((m_cOSDFunc&0xF0)==idTVMENU_VIDEO)
 472              {
 473                      m_cOSDEvent=FUNCSELCT_DN;
 474                  return 1;
 475              }
 476          
 477          #endif
 478          
 479              switch(m_cOSDFunc)
 480                  {
 481          
 482          #ifdef TV
 483          
 484                  case    0:
 485                                  {
 486                              OSDExit();
 487                                      AdjTVChannel(1,0);
C51 COMPILER V7.50   KEYPAD                                                                06/16/2006 15:29:44 PAGE 9   

 488                                      return 0;
 489                                          }
 490          
 491          #endif
 492          #ifdef LOAD_TIME
 493                      case        idBRIGHTMENU:
 494                                                  m_cOSDFunc=idTIMEMENU;m_cOSDEvent=FUNCENTER;m_cItem=6;break;
 495          #else
 496                      case        idBRIGHTMENU:
 497                                                  m_cOSDFunc=idHUEMENU;m_cOSDEvent=FUNCENTER;m_cItem=5;break;
 498          #endif
 499                      case        idCONTRASTMENU:
 500                              {
 501                                                          m_cOSDFunc=idBRIGHTMENU;
 502                                                          m_cOSDEvent=FUNCENTER;
 503                                                          m_cItem=1;//

⌨️ 快捷键说明

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