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

📄 keypad.lst

📁 宏芯T102芯片驱动(51单片机作主控)
💻 LST
📖 第 1 页 / 共 2 页
字号:
 264   1                      switch(m_cOSDFunc)
 265   1                      {
 266   2                              case    0:
 267   2                                          m_cOSDFunc=idBRIGHTMENU;m_cOSDEvent=FUNCENTER;m_cItem=1;break;
 268   2                  
 269   2      
 270   2      #ifdef TV
 271   2      
 272   2                              case    idBRIGHTMENU:
 273   2                              case    idCONTRASTMENU:
 274   2                              case    idSHARP_VIDEO:
 275   2                              case    idSATMENU_VIDEO:
 276   2                              case    idHUEMENU_VIDEO:
 277   2      /*
 278   2                                      if((m_cSource&0x0F)==(isrcTV))
 279   2                                              {
 280   2                              m_cOSDFunc=idTVMENU_VIDEO;m_cOSDEvent=FUNCENTER;m_cItem=1;break;//Kuo
 281   2                                              }
 282   2                                              else return 0;
 283   2      */
 284   2                          if((m_cSource&0x0F)==(isrcTV))
 285   2                                              {
 286   3                              m_cOSDFunc=idTVMENU_VIDEO;
 287   3                                                      m_cOSDEvent=FUNCENTER;
 288   3                                                      m_cItem=1;
 289   3                                                      break;//Kuo
 290   3                                              }
 291   2                                              else
 292   2                          {
 293   3                              m_cOSDEvent=CLOSEMENU;
 294   3                              m_cItem=1;
 295   3                              break;
 296   3                          }
 297   2      #endif
 298   2      
 299   2                              default:
 300   2                              m_cOSDEvent=CLOSEMENU;
 301   2                              m_cItem=1;
 302   2                              break;
C51 COMPILER V7.06   KEYPAD                                                                12/28/2004 10:14:05 PAGE 6   

 303   2               
 304   2                  }
 305   1                      return 1;
 306   1      
 307   1      }
 308          
 309          /*bit kyMENUEvent(void)
 310          {
 311                  if(m_bKyBlocked)
 312                          return 0;
 313          
 314                          switch(m_cOSDFunc)
 315                          {
 316                                  case    0:
 317                                                  m_cOSDFunc=idBRIGHTMENU;m_cOSDEvent=FUNCENTER;m_cItem=1;break;
 318                                  case    idBRIGHTMENU:
 319                                                  m_cOSDFunc=idCONTRASTMENU;m_cOSDEvent=FUNCENTER;m_cItem=2;break;
 320                                  case    idCONTRASTMENU:
 321                                                  m_cOSDFunc=idSHARP_VIDEO;m_cOSDEvent=FUNCENTER;m_cItem=3;break;
 322                                  case    idSHARP_VIDEO:
 323                                                  {
 324                                                          m_cOSDFunc=idSATMENU_VIDEO;
 325                                                          m_cOSDEvent=FUNCENTER;
 326                                                          m_cItem=4;
 327                                                  }
 328                                                  break;
 329                                  case    idSATMENU_VIDEO:
 330                                                  m_cOSDFunc=idHUEMENU_VIDEO;m_cOSDEvent=FUNCENTER;m_cItem=5;break;
 331                                  case    idHUEMENU_VIDEO:
 332                                                  m_cOSDEvent=CLOSEMENU;m_cItem=1;break;
 333                          }
 334                          return 1;
 335          
 336          }*/
 337          
 338          bit kyINCREASEEvent(void)
 339          {
 340   1              if(m_bKyBlocked) return 0;
 341   1              if(!m_cOSDFunc&&m_bFactryMode) return 0;
 342   1      
 343   1              if(m_cOSDFunc==0)
 344   1                      {
 345   2      #ifdef TV
 346   2                              if((m_cSource&0x0F)==(isrcTV))
 347   2                              {
 348   3                                      return IRUpKeyCtrl();//0;
 349   3                              }
 350   2      #endif
 351   2                      }
 352   1                      else
 353   1                              m_cOSDEvent=FUNCADJ_IN;
 354   1              return 1;
 355   1      }
 356          
 357          bit kyDECREASEEvent(void)
 358          {
 359   1              if(m_bKyBlocked) return 0;
 360   1              if(!m_cOSDFunc&&m_bFactryMode) return 0;
 361   1      
 362   1              if(m_cOSDFunc==0)
 363   1                      {
 364   2      #ifdef TV
C51 COMPILER V7.06   KEYPAD                                                                12/28/2004 10:14:05 PAGE 7   

 365   2                              if((m_cSource&0x0F)==(isrcTV))
 366   2                              {
 367   3                                      return IRDownKeyCtrl();//0;
 368   3                              }
 369   2      #endif
 370   2                      }
 371   1                      else
 372   1                              m_cOSDEvent=FUNCADJ_DN;
 373   1              return 1;
 374   1      }
 375          #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
                              {
                                      m_cFactryCnt++;
                      if(m_cFactryCnt==3)
                                      {
                              m_bFactryReady=1;
                                      }
                              }
                              m_cOSDEvent=FUNCOUNT;
                      }
                      return 1;
              }
              #endif
 402          bit kyPOWEREvent(void)
 403          {
 404   1              if(m_bFactryReady)
 405   1              {
 406   2              m_cOSDEvent=OPENMENU;
 407   2                      m_cOSDFunc=idFCTRYMENU;
 408   2                      m_cFactryCnt=0;
 409   2                      m_bFactryMode = 1;
 410   2                      m_bFactryReady=0;
 411   2              }
 412   1              else
 413   1              {
 414   2                      m_bFactryMode = 0;
 415   2                      if(m_bKyBlocked) m_bKyBlocked=0;
 416   2              m_cOSDEvent=POWERMANAGE;
 417   2              }
 418   1              return 1;
 419   1      }
 420          
 421          bit kyIncPollCount(void)
 422          {
 423   1              if (m_wAccelPollCnt==0)
 424   1              {
 425   2              if((m_cOSDEvent==OPENMENU)||(m_cOSDEvent==FUNCENTER)||(m_cOSDEvent==CLOSEMENU)||(m_cOSDEvent==FUNCEXI
             -T))
C51 COMPILER V7.06   KEYPAD                                                                12/28/2004 10:14:05 PAGE 8   

 426   2                              m_wAccelPollCnt=KEY_MENU_POLL_COUNT;
 427   2                      else if(m_cOSDEvent==POWERMANAGE)
 428   2                              m_wAccelPollCnt=KEY_POWER_SEL;
 429   2                      else
 430   2                      {
 431   3                              if(m_cOSDEvent==FUNCSELCT_IN || m_cOSDEvent==FUNCSELCT_DN )
 432   3                                      m_wAccelPollCnt=KEY_SEL_POLL_COUNT;
 433   3                              else if((m_cOSDEvent==FUNCADJ_IN)||(m_cOSDEvent==FUNCADJ_DN))
 434   3                              m_wAccelPollCnt=KEY_VAL_POLL_COUNT;
 435   3                      }
 436   2                      return 0;
 437   2              }
 438   1              else
 439   1                      m_wAccelPollCnt--;
 440   1              return 1;
 441   1      }
 442          
 443          #ifdef ROTATE
 444          
 445          extern uCHAR Dis_Mode;
 446          bit kyDismodeEvent()
 447          {
 448   1      /*
 449   1      sbit    LEFT_RIGHT      = P0^0; 1: LEFTtoRIGHt, 0: RIGHTtoLEFT
 450   1      sbit    UP_DOWN                 = P0^1; 1: Down, 0: UP 
 451   1      */
 452   1      #ifdef KVGA
                if((Dis_Mode++)>=VALID_DIR)
                   Dis_Mode=TOP_LEFT;
              
                      SET_Dismod();
              #endif
 458   1      
 459   1      #ifdef WVGA
 460   1        if((Dis_Mode++)>=VALID_DIR)
 461   1           Dis_Mode=TOP_LEFT;
 462   1      
 463   1              SET_Dismod();
 464   1      #endif
 465   1      
 466   1          return 1;
 467   1      }
 468          
 469          #endif
 470          
 471          /////////////////
 472          
 473          
 474          /*
 475          #ifdef TV
 476          
 477          bit IRSetupKeyCtrl(void)
 478          {
 479                  if(m_bKyBlocked) return 0;
 480                          if((m_cSource&0x0F)==(isrcTV))
 481                          {
 482                                  if((m_cOSDFunc&0xF0)==idTVMENU_VIDEO)
 483                                  {
 484                                          m_cOSDEvent=FUNCEXIT;
 485                                  }
 486                                  else if((m_cOSDFunc==0))//&0xF0)==idMAINMENU)
 487                                  {
C51 COMPILER V7.06   KEYPAD                                                                12/28/2004 10:14:05 PAGE 9   

 488                                          m_cOSDFunc=idTVMENU_VIDEO;
 489                                          m_cOSDEvent=FUNCENTER;
 490                                  }
 491                      else return 0;
 492                          }
 493                          else 
 494                                  return 0;
 495                  return 1;
 496          }
 497          
 498          #endif
 499          */
 500          
 501          bit IRUpKeyCtrl(void)
 502          {
 503   1      
 504   1              if(m_bKyBlocked) return 0;
 505   1      
 506   1      #ifdef TV
 507   1      
 508   1          if((m_cOSDFunc&0xF0)==idTVMENU_VIDEO)
 509   1          {
 510   2                  m_cOSDEvent=FUNCSELCT_DN;
 511   2              return 1;
 512   2          }
 513   1      
 514   1      #endif
 515   1      
 516   1          switch(m_cOSDFunc)
 517   1              {
 518   2      
 519   2      #ifdef TV
 520   2      
 521   2              case    0:
 522   2                              {
 523   3                          OSDExit();
 524   3                                  AdjTVChannel(1,0);
 525   3                                  return 0;
 526   3                                      }
 527   2      
 528   2      #endif
 529   2                  case        idBRIGHTMENU:
 530   2                                              m_cOSDFunc=idTIMEMENU_VIDEO;m_cOSDEvent=FUNCENTER;m_cItem=6;break;
 531   2                  case        idCONTRASTMENU:
 532   2                          {
 533   3                                                      m_cOSDFunc=idBRIGHTMENU;
 534   3                                                      m_cOSDEvent=FUNCENTER;
 535   3                                                      m_cItem=1;//

⌨️ 快捷键说明

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