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

📄 lcd_osd.lst

📁 液晶显示器程序代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 681          
 682          void Show_Mode(void)
 683          {
 684   1              unsigned int idata usStart_Addr;
 685   1              unsigned char idata ucTemp;
 686   1      
 687   1              OSD_Line(3, 12, 15, 0, 1);                       // Attribute
 688   1              usStart_Addr = FONT_SELECT_ADDRESS;
 689   1      
 690   1              //The address of the first character Cn1 in Row n = FONT_SELECT_ADDRESS + Row0_length + Row1_length +...+
             -Row(n-1)_length
 691   1              for(ucTemp = 1; ucTemp < 3+1; ucTemp ++)
 692   1                      usStart_Addr += Row_Info[0][ucTemp];
 693   1      
 694   1              Data[0] = 5;
 695   1              Data[1] = Y_INC;
 696   1              Data[2] = OSD_ADDR_MSB_90;
 697   1              Data[3] = (unsigned char)( (((usStart_Addr + 12)  & 0x0fff) >> 8 ) | 0x50);
 698   1              Data[4] = (unsigned char)( (usStart_Addr + 12) & 0x00ff);
 699   1              Data[5] = 0;
 700   1              RTDWrite(Data);
 701   1              
 702   1              
 703   1      
 704   1              switch (ucMode_Curr)
 705   1              {   
 706   2              /*
 707   2                      case MODE_NOSIGNAL:     // NO SIGNAL
 708   2                              OSD_Line(11, 2, 24, CHINESE_T <= (stGUD1.FUNCTION & 0x07) ? 0x80 | COLOR_BLUE : COLOR_BLUE, 0);
 709   2      
 710   2                              if ((SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07)) && (VGA_ONLINE != bVGA_CONNECT))
 711   2                                      RTDOSDW(OSD_REMK_TABLE[0][stGUD1.FUNCTION & 0x07]);
 712   2                              else
 713   2                                      RTDOSDW(OSD_REMK_TABLE[1][stGUD1.FUNCTION & 0x07]);
 714   2                              break;
 715   2      
 716   2                      case MODE_UNDEFINED0:
 717   2                      case MODE_UNDEFINED1:
 718   2                      case MODE_NOSUPPORT:
C51 COMPILER V7.06   LCD_OSD                                                               11/21/2005 13:47:29 PAGE 13  

 719   2                              OSD_Line(11, 2, 24, CHINESE_T <= (stGUD1.FUNCTION & 0x07) ? 0x80 | COLOR_BLUE : COLOR_BLUE, 0);
 720   2                              RTDOSDW(OSD_REMK_TABLE[2][stGUD1.FUNCTION & 0x07]);
 721   2                              break;
 722   2      
 723   2                      case MODE_VIDEO60HZ:    // NTSC 60HZ
 724   2                              OSD_Line(11, 2, 24, COLOR_BLUE, 0);     // Set characters to blue
 725   2                              RTDCodeW(Remark_Mode);
 726   2      
 727   2                              switch(ucAV_Mode)
 728   2                              {
 729   2                                      case 0x01:  RTDCodeW(Remark_V60_0); break;
 730   2                                      case 0x11:  RTDCodeW(Remark_V60_1); break;
 731   2                                      case 0x21:  RTDCodeW(Remark_V60_2); break;
 732   2                                      case 0x31:  RTDCodeW(Remark_V60_3); break;
 733   2                                      case 0x41:  RTDCodeW(Remark_V60_4); break;
 734   2                                      case 0x03:  RTDCodeW(Remark_V60_5); break;
 735   2                              }
 736   2                              break;
 737   2                              
 738   2                      case MODE_VIDEO50HZ:    // PAL 50HZ
 739   2                              OSD_Line(11, 2, 24, COLOR_BLUE, 0);     // Set characters to blue
 740   2                              RTDCodeW(Remark_Mode);
 741   2      
 742   2                              switch(ucAV_Mode)
 743   2                              {   
 744   2                                      case 0x02:  RTDCodeW(Remark_V50_0); break;
 745   2                                      case 0x12:  RTDCodeW(Remark_V50_1); break;
 746   2                                      case 0x22:  RTDCodeW(Remark_V50_2); break;
 747   2                                      case 0x32:  RTDCodeW(Remark_V50_3); break;
 748   2                                      case 0x03:  RTDCodeW(Remark_V50_5); break;
 749   2                              }
 750   2                              break;
 751   2      
 752   2                      case MODE_YUV60HZ:
 753   2                      case MODE_YUV50HZ:
 754   2                      break;
 755   2      */
 756   2                      default :
 757   2                              //OSD_Line(11, 2, 24, COLOR_BLUE, 0);     // Set characters to blue
 758   2      
 759   2                              {
 760   3                              unsigned int    usHwid;
 761   3                              unsigned char   ucTemp;
 762   3      
 763   3                              usHwid  = usIPH_ACT_WID;
 764   3      
 765   3                              if (SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07))
 766   3                              {
 767   4                                      if (MODE_1600x1200x60HZ == ucMode_Curr)
 768   4                                      {
 769   5                                              usHwid  = 1600;
 770   5                                      }
 771   4                                      else 
 772   4                                      {
 773   5                                              if (MODE_1600x1200x60HZ > ucMode_Curr)
 774   5                                              {
 775   6                                                      if (MODE_1280x0960x60HZ <= ucMode_Curr)
 776   6                                                              usHwid  = 1280;
 777   6                                                      else if (MODE_1152x0864x75HZ <= ucMode_Curr)
 778   6                                                      usHwid  = 1152;
 779   6                                              }
 780   5                                              else
C51 COMPILER V7.06   LCD_OSD                                                               11/21/2005 13:47:29 PAGE 14  

 781   5                                              {
 782   6                                                      if (MODE_USER1600x1200 == ucMode_Curr)
 783   6                                                              usHwid  = 1600;
 784   6                                                      else if (MODE_USER1280x960 <= ucMode_Curr)
 785   6                                                              usHwid  = 1280;
 786   6                                                      else if (MODE_USER1152x864 <= ucMode_Curr)
 787   6                                                              usHwid  = 1152;
 788   6                                              }
 789   5                                      }
 790   4                                              //anson 050512
 791   4                                      if      ((MODE_0640x0400x70HZ == ucMode_Curr)||(MODE_0720x0400x70HZ == ucMode_Curr))
 792   4                                      {
 793   5                                              if(stGUD1.FUNCTION & 0x10)
 794   5                                                      usHwid  = 640;
 795   5                                              else
 796   5                                                      usHwid  = 720;
 797   5                                      }
 798   4                              }
 799   3      
 800   3                              //RTDCodeW(Remark_Mode);
 801   3      
 802   3                              Data[0] = 12;
 803   3                              Data[1] = N_INC;
 804   3                              Data[2] = OSD_DATA_92;
 805   3      
 806   3                              ucTemp  = usHwid / 100;
 807   3      
 808   3                              if (10 <= ucTemp)
 809   3                              {
 810   4                                      Data[3] = _1_;
 811   4                                      Data[4] = ucTemp - 10 + _0_;
 812   4                              }
 813   3                              else
 814   3                              {
 815   4                                      Data[3] = 0;
 816   4                                      Data[4] = ucTemp + _0_;
 817   4                              }
 818   3      
 819   3                              ucTemp  = usHwid - ((unsigned int)100 * ucTemp);
 820   3              
 821   3                              Data[5] = ucTemp / 10;
 822   3                              
 823   3                              Data[6] = ucTemp - (10 * Data[5]) + _0_;
 824   3                              Data[5] = Data[5] + _0_;
 825   3                              Data[7] = 0x0e;
 826   3      
 827   3                              ucTemp      = usIPV_ACT_LEN / 100;
 828   3                              Data[12]    = usIPV_ACT_LEN - ((unsigned int)100 * ucTemp);
 829   3      
 830   3                              if (10 <= ucTemp)
 831   3                              {
 832   4                                      Data[0]     = 13;
 833   4                                      Data[8]     = _1_;
 834   4                                      Data[9]     = ucTemp - 10 + _0_;
 835   4                                      Data[10]    = Data[12] / 10;
 836   4                                      Data[11]    = Data[12] - (10 * Data[10]) + _0_;
 837   4                                      Data[10]    = Data[10] + _0_;
 838   4                                      Data[12]    = 0x00;
 839   4                                      Data[13]    = 0;
 840   4                              }
 841   3                              else
 842   3                              {
C51 COMPILER V7.06   LCD_OSD                                                               11/21/2005 13:47:29 PAGE 15  

 843   4                                      Data[8]     = ucTemp + _0_;
 844   4                                      Data[9]     = Data[12] / 10;
 845   4                                      Data[10]    = Data[12] - (10 * Data[9]) + _0_;
 846   4                                      Data[9]     = Data[9] + _0_;
 847   4                                      Data[11]    = 0x00;
 848   4                                      Data[12]    = 0;
 849   4                              }
 850   3      
 851   3                              Data[12]    = 0;
 852   3                              RTDWrite(Data);
 853   3      
 854   3                              // Show Refresh Rate
 855   3                              //RTDCodeW(Remark_Rate);
 856   3      
 857   3                              Data[0] = 7;
 858   3                              Data[1] = N_INC;
 859   3                              Data[2] = OSD_DATA_92;
 860   3                              Data[3] = ucRefresh / 10;
 861   3                              Data[4] = ucRefresh - (Data[3] * 10) + _0_;
 862   3                              Data[3] = Data[3] + _0_;
 863   3                              Data[5] = 0x27;
 864   3                              Data[6] = 0x59;
 865   3                              Data[7] = 0;
 866   3                              RTDWrite(Data);
 867   3                              if (10 <= ucTemp)
 868   3                                      OSD_Line( 3, 21, 1, 0x8c, 0);
 869   3                              else
 870   3                                      OSD_Line( 3, 20, 1, 0x8c, 0);
 871   3                              }
 872   2      
 873   2                              break;
 874   2                              
 875   2              }
 876   1      }   
 877          
 878          ///////////////////////////////////////////////////////////////////////////////////////////
 879          //anson
 880          ///////////////////////////////////////////////////////////////////////////////////////////
 881          void FACTORY_Key_Key(void)
 882          {
 883   1              ucOSD_Page_Index = PAGE_Factory;
 884   1              ucOSD_Item_Index0 = PAGEFact_ITEM_Recall;
 885   1      }
 886          ///////////////////////////////////////////////////////////////////////////////////////////
 887          ///////////////////////////////////////////////////////////////////////////////////////////
 888          
 889          void Page0_Left_Right_Key(unsigned char Key)
 890          {
 891   1      //    RTDSetByte(HOSTCTRL_02, 0x40);  // Wake RTD up
 892   1      // Although you can add ending animation here, I don't think it is necessary.
 893   1      //    RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
 894   1      //    RTDOSDW(OSD_Reset);            // Clear OSD
 895   1              //usOSD_Timer         = 5;     // 20 sec
 896   1          if (!b_rgb_VOLUME_STATUS)
 897   1          {
 898   2            OSD_Position(OSD_ENABLE);
 899   2            RTDOSDW(rgb_OSD_VOLUME);
 900   2              RTDOSDW(strTabVOLUME_Atb[stGUD1.FUNCTION & 0x07]);              //anson
*** WARNING C214 IN LINE 900 OF CODE\LCD_OSD.C: 'Argument': conversion: non-pointer to pointer
 901   2            RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
 902   2            b_rgb_VOLUME_STATUS = 1;
 903   2          }
C51 COMPILER V7.06   LCD_OSD                                                               11/21/2005 13:47:29 PAGE 16  

 904   1              //OSD_Window( 5, 10, 136, 54, 84, 1, 1, 14, 251, 0, 1, 25);
 905   1              if(NOTIFY_LEFT_KEY == Key)
 906   1              {
 907   2              if (stGUD3.VOLUME > 0x00) stGUD3.VOLUME--;
 908   2              SetVolume();
 909   2              Save_GUD3();
 910   2                      rgb_OSD_Slider(0, 7, 24, 0x1f - stGUD3.VOLUME, 0x1f, 4, 14);
 911   2              }
 912   1      
 913   1              else if(NOTIFY_RIGHT_KEY == Key)

⌨️ 快捷键说明

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