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

📄 lcd_osd.lst

📁 液晶显示器程序代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 914   1              {
 915   2              if (stGUD3.VOLUME < 0x1f) stGUD3.VOLUME++;
 916   2              SetVolume();
 917   2              Save_GUD3();
 918   2                      rgb_OSD_Slider(0, 7, 24, 0x1f - stGUD3.VOLUME, 0x1f, 4, 14);
 919   2          }
 920   1      
 921   1      
 922   1      }
 923          
 924          void Page0_Enter_Key(void)
 925          {
 926   1              if((stGUD3.TV_SETTING & 0x08) == 0x08 )//Factory Mode           //anson
 927   1              {
 928   2                      //Into Factory mode
 929   2                      ucOSD_Page_Index    = PAGE_Factory;
 930   2                      ucOSD_Item_Index0   = PAGEFact_ITEM_Recall;
 931   2                      ucOSD_Item_Index1   = 0;
 932   2                      ucOSD_Item_Index2   = 0;
 933   2              }
 934   1              else
 935   1              {
 936   2                      // Change to OSD Main Page 1 and Main Program will show it
 937   2                      ucOSD_Page_Index    = 1;
 938   2                      ucOSD_Item_Index0   = 0;
 939   2                      ucOSD_Item_Index1   = 0;
 940   2                      ucOSD_Item_Index2   = 0;
 941   2                      b_rgb_VOLUME_STATUS = 0;
 942   2              }
 943   1      }
 944          
 945          void Page0_LR_Key(void)
 946          {
 947   1              // Go to Hidden Function Page
 948   1              if (SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07))
 949   1              {
 950   2                      ucOSD_Page_Index    = 8;
 951   2                      ucOSD_Item_Index0   = 1;
 952   2                      ucOSD_Item_Index1   = 0;
 953   2                      ucOSD_Item_Index2   = 0;
 954   2              }
 955   1      }
 956          
 957          void Page1_Enter_Key(void)
 958          {
 959   1              if (0 == ucOSD_Item_Index0)
 960   1              {
 961   2                      if (MODE_NOSIGNAL != ucMode_Curr && MODE_NOSUPPORT != ucMode_Curr)
 962   2                      {
 963   3                              // Select and highlight the first item
 964   3                              ucOSD_Item_Index0   = PAGE1_ITEM_CONTRAST;
 965   3                              ucOSD_Item_Index1   = 0;
C51 COMPILER V7.06   LCD_OSD                                                               11/21/2005 13:47:29 PAGE 17  

 966   3      
 967   3                              //Enable window 6 and draw it
 968   3                              //OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
 969   3      // win_no, row_start, row_end,col_start,col_end, width, height, color, color_sb, gradient, gray_level, att
             -r
 970   3                  OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
 971   3                      }
 972   2              }
 973   1              else
 974   1              {
 975   2                      if (ucOSD_Item_Index1)
 976   2                      {
 977   3                              // Leave the item and reset text color
 978   3                              switch (ucOSD_Item_Index0)
 979   3                              {
 980   4                                      case PAGE1_ITEM_AUTOBAL :
 981   4                          if (ucOSD_Item_Index1 == 1 ) //1 : Yes  ,   2 : No
 982   4                          {
 983   5                                                      if (ERROR_INPUT == Auto_Balance())
 984   5                                                      {
 985   6                                                              ucMode_Curr = MODE_OSDFORCE;
 986   6                                                              return ;
 987   6                                                      }
 988   5                          }
 989   4                                              OSD_Line( 13, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x40, 2);
 990   4                                              break;
 991   4      
 992   4                                      case PAGE1_ITEM_CONTRAST :
 993   4                                              // Redraw slider and make the number become black.
 994   4                                              OSD_Slider(5, 31, 17, stGUD0.CONTRAST, 100, 4, 14);
 995   4                                              break;
 996   4      
 997   4                                      case PAGE1_ITEM_BRIGHT :
 998   4                                              // Redraw slider and make the number become black.
 999   4                                              OSD_Slider(7, 31, 17, stGUD0.BRIGHT, 100, 4, 14);
1000   4                                              break;
1001   4      
1002   4                                      case PAGE1_ITEM_COLORTEMP :
1003   4                                              //Set words color to black
1004   4                                              OSD_Line( 11, 36 + (ucOSD_Item_Index1-1)*(4+1), 4, 0x40, 2);
1005   4                                              break;
1006   4      
1007   4                                      case PAGE1_ITEM_GAMMA :
1008   4                                              //Set words color to black
1009   4                                              OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(2+1), 1, 0x40, 2);
1010   4                                              break;
1011   4                              }
1012   3      
1013   3                              ucOSD_Item_Index1   = 0;
1014   3      
1015   3                      }
1016   2                      else
1017   2                      {
1018   3                              if (PAGE1_ITEM_EXIT == ucOSD_Item_Index0)
1019   3                              {
1020   4                                      // Disable highlight window 6
1021   4                                      OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
1022   4                                              , 0, 0, 14, 251, 0, 1, 0);
1023   4                                      // De-select the page item and disable the hightlight window
1024   4                                      ucOSD_Item_Index0   = 0;
1025   4                                      ucOSD_Item_Index1   = 0;
1026   4                              }
C51 COMPILER V7.06   LCD_OSD                                                               11/21/2005 13:47:29 PAGE 18  

1027   3                              else if (MODE_NOSIGNAL != ucMode_Curr && MODE_NOSUPPORT != ucMode_Curr)
1028   3                              {
1029   4                                      switch (ucOSD_Item_Index0)
1030   4                                      {
1031   5                                              case PAGE1_ITEM_AUTOBAL :
1032   5                              ucOSD_Item_Index1  = 2;
1033   5                                                      OSD_Line( 13, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
1034   5                                                      break;
1035   5      
1036   5                                              case PAGE1_ITEM_CONTRAST :
1037   5                                                      ucOSD_Item_Index1   = 1;
1038   5      
1039   5                                                      // Redraw slider and make the number become Red.
1040   5                                                      OSD_Slider(5, 31, 17, stGUD0.CONTRAST, 100, 2, 14);
1041   5                                                      break;
1042   5      
1043   5                                              case PAGE1_ITEM_BRIGHT :
1044   5                                                      ucOSD_Item_Index1   = 1;
1045   5      
1046   5                                                      // Redraw slider and make the number become Red.
1047   5                                                      OSD_Slider(7, 31, 17, stGUD0.BRIGHT, 100, 2, 14);
1048   5                                                      break;
1049   5      
1050   5                                              case PAGE1_ITEM_COLORTEMP :
1051   5                                                      ucOSD_Item_Index1 = ((stGUD1.INPUT_SOURCE & 0x18) >> 3) + 1;
1052   5      
1053   5                                                      //Here we can only change the color in Byte 2 for necessary words
1054   5                                                      OSD_Line( 11, 36 + (ucOSD_Item_Index1-1)*(4+1), 4, 0x20, 2);
1055   5                                                      break;
1056   5      
1057   5                                              case PAGE1_ITEM_GAMMA :
1058   5                                                      ucOSD_Item_Index1   = ((stGUD1.FUNCTION >> 5) & 0x03) + 1;
1059   5      
1060   5                                                      //Here we can only change the color in Byte 2 for necessary words
1061   5                                                      OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(2+1), 1, 0x20, 2);
1062   5                                                      break;
1063   5      
1064   5                                              case PAGE1_ITEM_RGBADJ :
1065   5                                                      OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
1066   5                                                              , 0, 0, 14, 251, 0, 1, 0);
1067   5                                                      ucOSD_Item_Index1   = PAGE1B_ITEM_RED;
1068   5                                                      ucOSD_Item_Index2   = 0;
1069   5                                                      OSD_Proc_B(NOTIFY_SHOW);       // Show the sub-page
1070   5                                                      break;
1071   5                                      }
1072   4                              }
1073   3                      }
1074   2              }
1075   1      }
1076          
1077          void Page1_Left_Right_Key(unsigned char Key)
1078          {
1079   1              if (ucOSD_Item_Index1)
1080   1              {
1081   2                      switch (ucOSD_Item_Index0)
1082   2                      {
1083   3                      case PAGE1_ITEM_AUTOBAL :
1084   3      //                      ucOSD_Item_Index1   = (NOTIFY_LEFT_KEY == Key) ? 1 : 2;
1085   3                              ucOSD_Item_Index1   = (NOTIFY_RIGHT_KEY == Key) ? 1 : 2;
1086   3                                      OSD_Line( 13, 36, 14, 0x40, 2); //Set color to black
1087   3                                      OSD_Line( 13, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
1088   3                                      break;
C51 COMPILER V7.06   LCD_OSD                                                               11/21/2005 13:47:29 PAGE 19  

1089   3      
1090   3                              case PAGE1_ITEM_CONTRAST :
1091   3                                      Bright_Contrast_Adjust(&stGUD0.CONTRAST,Key);
1092   3      
1093   3                                      OSD_Slider(5, 31, 17, stGUD0.CONTRAST, 100, 2, 14);
1094   3      
1095   3      #if(ANALOG_CONTRAST)
1096   3                                      if((stGUD1.INPUT_SOURCE & 0x07) == SOURCE_VGA)
1097   3                                              SetADC_Gain();
1098   3                                      else
1099   3                                              Set_Bright_Contrast();
1100   3      #else
                                              Set_Bright_Contrast();
              #endif
1103   3      
1104   3                                      Save_GUD0();
1105   3                                      break;
1106   3      
1107   3                              case PAGE1_ITEM_BRIGHT :
1108   3                                      Bright_Contrast_Adjust(&stGUD0.BRIGHT,Key);
1109   3                      
1110   3                                      OSD_Slider(7, 31, 17, stGUD0.BRIGHT, 100, 2, 14);
1111   3                                      Set_Bright_Contrast();
1112   3                                      Save_GUD0();
1113   3                                      break;
1114   3      
1115   3                              case PAGE1_ITEM_COLORTEMP:
1116   3      //                              if(NOTIFY_RIGHT_KEY == Key)
1117   3                                      if(NOTIFY_LEFT_KEY == Key)
1118   3                                              ucOSD_Item_Index1 = (ucOSD_Item_Index1 == 4) ? 4 : ucOSD_Item_Index1 + 1;
1119   3                                      else
1120   3                                              ucOSD_Item_Index1 = (ucOSD_Item_Index1 == 1) ? 1 : ucOSD_Item_Index1 - 1;
1121   3      
1122   3                                      stGUD1.INPUT_SOURCE = (stGUD1.INPUT_SOURCE & 0xe7 ) | ((ucOSD_Item_Index1 - 1) << 3);
1123   3      
1124   3                                      //Here we can only change the color in Byte 2 for necessary words
1125   3                                      OSD_Line( 11, 36, 20, 0x40, 2); //Set color to black
1126   3                                      OSD_Line( 11, 36 + (ucOSD_Item_Index1-1)*(4+1), 4, 0x20, 2);
1127   3      
1128   3                                      Set_Bright_Contrast();
1129   3                                      Save_GUD1();
1130   3                                      break;
1131   3                                      
1132   3                              case PAGE1_ITEM_GAMMA :
1133   3      //                              if (NOTIFY_RIGHT_KEY == Key)
1134   3                                      if (NOTIFY_LEFT_KEY == Key)
1135   3                                      {
1136   4                                              if (4 <= ucOSD_Item_Index1)
1137   4                                                      break;
1138   4      
1139   4                                              ucOSD_Item_Index1   = ucOSD_Item_Index1 + 1;
1140   4                                      }
1141   3                                      else
1142   3                                      {
1143   4                                              if (1 >= ucOSD_Item_Index1)
1144   4                                                      break;
1145   4      
1146   4                                              u

⌨️ 快捷键说明

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