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

📄 lcd_msg.lst

📁 液晶显示器程序代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 246   2                      {
 247   3                              do
 248   3                              {
 249   4                                      ucP3_Curr   = GetKeyState();
 250   4                              }while(ucP3_Curr != 0x00);
 251   3      
 252   3                              ucKey_Issued    = 0;
 253   3                              ucNotify        = NOTIFY_FACTORY_KEY;
 254   3                      }
 255   2                      break;
 256   2      
 257   2      ///////////////////////////////////////////////////////////////////////////////////
 258   2      ///////////////////////////////////////////////////////////////////////////////////
 259   2      
 260   2          case AUTO_KEY_MASK :
 261   2              if ((ucP3_Prev ^ ucP3_Curr) & AUTO_KEY_MASK)
 262   2              {
 263   3                  ucKey_Issued    = 0;
 264   3                  ucNotify        = NOTIFY_AUTO_KEY;
 265   3              }
 266   2              break;
 267   2      /*
 268   2          case MENU_KEY_MASK :
 269   2              if ((ucP3_Prev ^ ucP3_Curr) & MENU_KEY_MASK)
 270   2              {
 271   2                 if (ucOSD_Page_Index)
 272   2                 {
 273   2                    ucKey_Issued    = 0;
 274   2      //            ucNotify        = NOTIFY_MENU_KEY;  //default , now mask for exit function
 275   2                    ucNotify        = NOTIFY_EXIT_KEY;
 276   2                 }
 277   2                 else
 278   2                 {
 279   2                    bStable  = 0;
 280   2                    return NOTIFY_POWERUP;
 281   2                 }
 282   2              }
 283   2              break;
 284   2      */    
 285   2          case ENTER_KEY_MASK :
 286   2              if ((ucP3_Prev ^ ucP3_Curr) & ENTER_KEY_MASK)
 287   2              {
 288   3                  ucKey_Issued    = 0;
 289   3      
 290   3                  //usOSD_Timer     = (unsigned int)stGUD1.OSD_TIMEOUT << 9;    // Reset OSD timeout timer
 291   3                  usOSD_Timer         = (unsigned int)stGUD1.OSD_TIMEOUT * 51; 
 292   3                  ucNotify        = NOTIFY_ENTER_KEY;                         // Post enter-key pressed message
 293   3                  ucKey_Repeat    = KEY_REPEAT_COUNT * 8;
 294   3              }
 295   2              else
 296   2              {
 297   3                  if (ucKey_Repeat)
 298   3                      ucKey_Repeat    -= 1;
 299   3                  else
C51 COMPILER V7.06   LCD_MSG                                                               11/21/2005 13:47:29 PAGE 6   

 300   3                  {
 301   4                      if (ucOSD_Page_Index)
 302   4                      {
 303   5                          usOSD_Timer = 0;
 304   5                          ucNotify    = NOTIFY_CLEAR_OSD;
 305   5                      }
 306   4                  }
 307   3              }
 308   2              break;
 309   2          
 310   2          case RIGHT_KEY_MASK :
 311   2          case LEFT_KEY_MASK:
 312   2              //usOSD_Timer     = (unsigned int)stGUD1.OSD_TIMEOUT << 9;        // Reset OSD timeout timer
 313   2      //----------------------------------echo add begin
 314   2              if (ucOSD_Page_Index)
 315   2              {
 316   3                 usOSD_Timer         = (unsigned int)stGUD1.OSD_TIMEOUT * 51;
 317   3              }
 318   2              else
 319   2              {
 320   3                 if (b_rgb_VOLUME_STATUS)
 321   3                    usOSD_Timer         = (unsigned int)stGUD1.OSD_TIMEOUT * 4;
 322   3              }
 323   2      //----------------------------------echo add end;           
 324   2              
 325   2              if ((ucP3_Prev ^ ucP3_Curr) & ucP3_Curr)
 326   2              {
 327   3                  ucKey_Issued    = 0;
 328   3      
 329   3                  ucNotify        = (ucP3_Curr == RIGHT_KEY_MASK) ? NOTIFY_RIGHT_KEY : NOTIFY_LEFT_KEY;  // Post
             - right-key pressed message
 330   3                  ucKey_Repeat    = KEY_REPEAT_COUNT;
 331   3              }
 332   2              else
 333   2              {
 334   3                  if (ucKey_Repeat)
 335   3                      ucKey_Repeat    -= 1;
 336   3                  else
 337   3                  {
 338   4                      if (KEY_TURBO_ENABLE > ucKey_Issued)
 339   4                      {
 340   5                          ucKey_Issued    += 1;
 341   5                          ucKey_Repeat    = KEY_REPEAT_PERIOD;
 342   5                      }
 343   4                      else
 344   4                          ucKey_Repeat    = 0;
 345   4      
 346   4                      ucNotify        = (ucP3_Curr == RIGHT_KEY_MASK) ? NOTIFY_RIGHT_KEY : NOTIFY_LEFT_KEY;  // 
             -Post right-key repeat message
 347   4                  }
 348   3              }
 349   2              break;
 350   2      /*    
 351   2          case LEFT_KEY_MASK :
 352   2              //usOSD_Timer     = (unsigned int)stGUD1.OSD_TIMEOUT << 9;        // Reset OSD timeout timer
 353   2              usOSD_Timer         = (unsigned int)stGUD1.OSD_TIMEOUT * 51; 
 354   2      
 355   2              if ((ucP3_Prev ^ ucP3_Curr) & LEFT_KEY_MASK)
 356   2              {
 357   2                  ucKey_Issued    = 0;
 358   2      
 359   2                  ucNotify        = NOTIFY_LEFT_KEY;                          // Post left-key pressed message
C51 COMPILER V7.06   LCD_MSG                                                               11/21/2005 13:47:29 PAGE 7   

 360   2                  ucKey_Repeat    = KEY_REPEAT_COUNT;
 361   2              }
 362   2              else
 363   2              {
 364   2                  if (ucKey_Repeat)
 365   2                      ucKey_Repeat    -= 1;
 366   2                  else
 367   2                  {
 368   2                      if (KEY_TURBO_ENABLE > ucKey_Issued)
 369   2                      {
 370   2                          ucKey_Issued    += 1;
 371   2                          ucKey_Repeat    = KEY_REPEAT_PERIOD;
 372   2                      }
 373   2                      else
 374   2                          ucKey_Repeat    = 0;
 375   2      
 376   2                      ucNotify        = NOTIFY_LEFT_KEY;                      // Post left-key repeat message
 377   2                  }
 378   2              }
 379   2              break;
 380   2      */
 381   2      /*    case IR_KEY_MASK :
 382   2              ucKey_Issued    = 0;
 383   2              if ((ucP3_Prev ^ ucP3_Curr) & IR_KEY_MASK)
 384   2              {
 385   2                  if (SOURCE_TV == (stGUD1.INPUT_SOURCE & 0x07))
 386   2                  {
 387   2                      //usOSD_Timer     = (unsigned int)stGUD1.OSD_TIMEOUT << 9;    // Reset OSD timeout timer
 388   2                      usOSD_Timer         = (unsigned int)stGUD1.OSD_TIMEOUT * 51; 
 389   2                  }
 390   2      
 391   2                  ucNotify        = Data[0];                                      // Post IR-key pressed message
 392   2                  ucKey_Repeat    = KEY_REPEAT_COUNT;
 393   2              }
 394   2              else if (NOTIFY_IR_VOLINC == Data[0] || NOTIFY_IR_VOLDEC == Data[0])
 395   2              {
 396   2                  if (ucKey_Repeat)
 397   2                      ucKey_Repeat    -= 1;
 398   2                  else
 399   2                  {
 400   2                      ucNotify        = Data[0];
 401   2                      ucKey_Repeat    = KEY_REPEAT_PERIOD;
 402   2                  }
 403   2              }
 404   2              break;
 405   2       */   
 406   2          default :
 407   2              // No key or more than 1 key pressed. Post no message and reset key-repeat.
 408   2              ucKey_Repeat    = KEY_REPEAT_COUNT;
 409   2              ucKey_Issued    = 0;
 410   2      
 411   2      #if (HIDDEN_PAGE)        
                      // For triggering the hidden page
                      if (0 == ucOSD_Page_Index && (RIGHT_KEY_MASK | LEFT_KEY_MASK) == ucP3_Curr)     ucNotify    = NOTI
             -FY_LR_KEY;
              #endif
 415   2              break;
 416   2          }
 417   1      
 418   1          return ucNotify;
 419   1      }
 420          
C51 COMPILER V7.06   LCD_MSG                                                               11/21/2005 13:47:29 PAGE 8   

 421          
 422          void OSD_Dispatcher(unsigned char message)
 423          {
 424   1          if (bReload)
 425   1          {
 426   2              // When bStable and bReload are both 1s, it is the first iteration after input signal becomes stab
             -le.
 427   2              // bReload will be cleared and user's font will be reloaded.
 428   2              bReload = 0;
 429   2      
 430   2              RTDSetByte(HOSTCTRL_02, 0x40);          // Wake RTD up
 431   2              RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);     // Disable overlay control
 432   2              RTDOSDW(OSD_Reset);                    // Clear OSD
 433   2            //  RTDSetBit(OVL_CTRL_6D, 0xff, 0x02);     // Turn back to the original osd display width
 434   2      
 435   2             // Load_Font(JAPANESS == (stGUD1.FUNCTION & 0x07) ? Font_East_J : Font_East_C, 0x00, 0x12);
 436   2                      //Load_Font(Font_Global, 0x00, 0x154);
 437   2      /*
 438   2                      Load_VLC_Font(Font_Global, 0x00, 0xa1);
 439   2                      if( (stGUD1.FUNCTION & 0x07) == JAPANESS )
 440   2                      {
 441   2                              Load_VLC_Font(Font_East_J, 0x573, 0x4B);
 442   2                      }
 443   2                      else
 444   2                      {
 445   2                              Load_VLC_Font(Font_East_C, 0x5a9, 0x45);
 446   2                      }
 447   2                      Load_VLC_Font(Font_Icons, 0x828, 0x70);
 448   2      */
 449   2              if (ucOSD_Page_Index)
 450   2              {
 451   3                  message = NOTIFY_SHOW;
 452   3              }
 453   2              else
 454   2              {
 455   3                  message = NOTIFY_NONE;
 456   3      
 457   3                      RTDSetBit(OVL_CTRL_6D, 0x3f, 0x00);     //Red
 458   3                      RTDSetBit(BGCOLOR_CONTROL_6C, 0x00, 0x00);
 459   3                      RTDSetBit(OVL_CTRL_6D, 0x3f, 0x40);     //Green
 460   3                      RTDSetBit(BGCOLOR_CONTROL_6C, 0x00, 0x00);
 461   3                      RTDSetBit(OVL_CTRL_6D, 0x3f, 0x80);     //Blue
 462   3                      RTDSetBit(BGCOLOR_CONTROL_6C, 0x00, 0x00);
 463   3              
 464   3                 if (BEGIN_MODECHANGE < usTaskCnt)    Show_Note();
 465   3              }
 466   2      
 467   2              // We always read REG[1F] to see if frame-sync is OK.
 468   2              // ucStatus is the OR result of REG[1F] when OSD is open, and clear to 0 when OSD is close.
 469   2              //ucStatus    = 0;
 470   2      
 471   2          }
 472   1      
 473   1          if ((0 == ucOSD_Page_Index) && (!b_rgb_VOLUME_STATUS))
 474   1          {
 475   2              if ((BEGIN_MODECHANGE == usTaskCnt))
 476   2              {
 477   3                  // Disable and clear input source note text
 478   3                  RTDSetByte(HOSTCTRL_02, 0x40);
 479   3                   RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);     
 480   3                  RTDOSDW(OSD_Reset);
 481   3              }
C51 COMPILER V7.06   LCD_MSG                                                               11/21/2005 13:47:29 PAGE 9   

 482   2              else if ((BEGIN_SHOWHINT == usTaskCnt))
 483   2              {
 484   3                 Show_Hint();
 485   3              }
 486   2                      
 487   2                      
 488   2                      //else if (1 == usTaskCnt)
 489   2                      //{
 490   2                      //    RTDOSDW(OSD_Reset);            // Clear OSD
 491   2                      //}
 492   2          }
 493   1          else if (NOTIFY_NONE == message)
 494   1          {
 495   2      //        if (0 == usOSD_Timer && 0 != stGUD1.OSD_TIMEOUT && SOURCE_TV != (stGUD1.INPUT_SOURCE & 0x07))
 496   2              if (0 == usOSD_Timer && 0 != stGUD1.OSD_TIMEOUT )
 497   2              {
 498   3                  message = NOTIFY_CLEAR_OSD;
 499   3              }

⌨️ 快捷键说明

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