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

📄 factory.c

📁 LCDTV的source code,含周邊ic的driver code ,scaler ,
💻 C
📖 第 1 页 / 共 2 页
字号:
/*******************************************************************************
  FACTORY.C
  Copyright (c) SmartASIC, Inc. All rights reserved.
*******************************************************************************/
#include <MTV230.H>
#include <DEFINE.H>
#define WINDOW_COLOR   BLUE
#define HEADER_COLOR   WHITE
#define TEXT_COLOR     GREEN
#define BAR_COLOR      RED
#define TEXT_HI_COLOR  BLACK
/*==============================================================================
  Factory Page=1
==============================================================================*/
void Factory_Page1(void) {

  Clear_Screen();
  OSD_Position(OSD_VPosition, OSD_HPosition);
  Window_Control(3, 0, 7, 0, 26, WINDOW_COLOR);

  Print_String(0, 10, "OPTION", HEADER_COLOR);
  Print_String(1, 0, "INITIAL EEPROM         DONE", TEXT_COLOR);
  Print_String(2, 0, "BUILT-IN DVD", TEXT_COLOR);
  if(EE_MCU_Byte_Read(EE_BUILT_IN_DVD)==0x01)
    Print_String(2, 20, " ENABLE", TEXT_COLOR);
  else
    Print_String(2, 20, "DISABLE", TEXT_COLOR);
  Print_String(3, 0, "CONTRAST-7114", TEXT_COLOR);
    Print_Char(3, 24, EE_MCU_Byte_Read(ParaAddress+EE_7114_CONTRAST), TEXT_COLOR);
  Print_String(4, 0, "LUMINANCE-7114", TEXT_COLOR);
    Print_Char(4, 24, EE_MCU_Byte_Read(ParaAddress+EE_7114_LUMINANCE), TEXT_COLOR);
  Print_String(5, 0, "BACK LIGHT", TEXT_COLOR);
    Print_Char(5, 24, EE_MCU_Byte_Read(ParaAddress+EE_BACK_LIGHT), TEXT_COLOR);
  Print_String(6, 0, "OSD H-POSITION", TEXT_COLOR);
    Print_Char(6, 24, OSD_HPosition, TEXT_COLOR);
  Print_String(7, 0, "OSD V-POSITION", TEXT_COLOR);
    Print_Char(7, 24, OSD_VPosition, TEXT_COLOR);

  Print_Icon( 0, 0, 'X', YELLOW);
  Print_Icon( 0, 28, 'X', YELLOW);
  Print_Icon( 13, 0, 'X', YELLOW);
  Print_Icon( 13, 28, 'X', YELLOW);

  }


/*==============================================================================
  Factory Page=1
==============================================================================*/
void Select_Factory_Page1(void) {

  Window_Control(2, Item+1, Item+1, 0, 26, BAR_COLOR);

  }


/*==============================================================================
  Factory Page=2
==============================================================================*/
void Factory_Page2(void) {
  
  Clear_Screen();
  OSD_Position(OSD_VPosition, OSD_HPosition);
  Window_Control(3, 0, 7, 0, 26, WINDOW_COLOR);

  Print_String(0, 0, "WHITE BALANCE", HEADER_COLOR);
  Print_String(1, 0, "COLOR TEMP.  STD WARM COLD", TEXT_COLOR);
  Line_Attribute(1, 12+Color_Temp*5, 15+Color_Temp*5, TEXT_HI_COLOR);
  Print_String(2, 0, "R-GAIN", TEXT_COLOR);
  Print_Char(2, 24, EE_MCU_Byte_Read(ColorAddress+0), TEXT_COLOR);
  Print_String(3, 0, "G-GAIN", TEXT_COLOR);
  Print_Char(3, 24, EE_MCU_Byte_Read(ColorAddress+1), TEXT_COLOR);
  Print_String(4, 0, "B-GAIN", TEXT_COLOR);
  Print_Char(4, 24, EE_MCU_Byte_Read(ColorAddress+2), TEXT_COLOR);  
  Print_String(5, 0, "R-OFFSET", TEXT_COLOR);
  Print_Char(5, 24, EE_MCU_Byte_Read(ColorAddress+3), TEXT_COLOR);
  Print_String(6, 0, "G-OFFSET", TEXT_COLOR);
  Print_Char(6, 24, EE_MCU_Byte_Read(ColorAddress+4), TEXT_COLOR);
  Print_String(7, 0, "B-OFFSET", TEXT_COLOR);
  Print_Char(7, 24, EE_MCU_Byte_Read(ColorAddress+5), TEXT_COLOR);

  }


/*==============================================================================
  Factory Page=1
==============================================================================*/
void Select_Factory_Page2(void) {

  Window_Control(2, Item+1, Item+1, 0, 26, BAR_COLOR);

  }


/*==============================================================================
  
==============================================================================*/
void Factory_OSD(void) {

  unsigned char value;
  
  switch(bkey_code_now) {
    //&&&&&&&&&&&&&&&&&&&&&&&&&&&& MENU &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
    case(KEY_MENU):
      switch(Page) {
        case(0):
        case(100):
          OSD_Show(0,0,0,0,0);
          Page=1;
          Item=0;
          Factory_Page1();
          Select_Factory_Page1();
          OSD_Show(1,0,0,0,0);
        break;
        case(1):
          OSD_Show(0,0,0,0,0);
          Page=2;
          Item=0;
          Factory_Page2();
          Select_Factory_Page2();
          OSD_Show(1,0,0,0,0);
        break;
        case(2):
          OSD_Show(0,0,0,0,0);
          Page=0;
          Item=0;
        break;
        }
    break;
    //&&&&&&&&&&&&&&&&&&&&&&&&&&&& CH+ &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
    case(KEY_CH_PLUS):
      switch(Page) {
        case(1):
          Item=(Item+6)%7;
          Select_Factory_Page1();
        break;
        case(2):
          Item=(Item+6)%7;
          Select_Factory_Page2();
        break;
        }
    break;
    //&&&&&&&&&&&&&&&&&&&&&&&&&&&& CH- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
    case(KEY_CH_MINUS):
      switch(Page) {
        case(1):
          Item=(Item+1)%7;
          Select_Factory_Page1();
        break;
        case(2):
          Item=(Item+1)%7;
          Select_Factory_Page2();
        break;
        }
    break;
    //&&&&&&&&&&&&&&&&&&&&&&&&&&& VOL+ &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
    case(KEY_VOL_PLUS):
      switch(Page) {
        case(1):
          switch(Item) {
            case(0)://Recall EEPROM
              Print_String(1, 16, "CH+ CONFIRM", TEXT_COLOR|BLINK);
              do{
                Get_Key();
                }while(bkey_code_now!=KEY_NULL);
              if(bkey_code_now==KEY_CH_PLUS) {
                Print_String(1, 16, "    PROCESS", TEXT_COLOR|BLINK);
                Burning_EEPROM();
                }
              Print_String(1, 16, "       DONE", TEXT_COLOR);
              LED_AMBER=OFF;
              LED_GREEN=ON;
            break;
            case(1)://Built In DVD
              if(EE_MCU_Byte_Read(EE_BUILT_IN_DVD)==0x01) {
                EE_MCU_Byte_Write(EE_BUILT_IN_DVD, 0x00);
                Print_String(2, 20, "DISABLE", TEXT_COLOR);
                }
              else {
                EE_MCU_Byte_Write(EE_BUILT_IN_DVD, 0x01);
                Print_String(2, 20, " ENABLE", TEXT_COLOR);
                }
            break;
            case(2)://7114 Contrast
              value=EE_MCU_Byte_Read(ParaAddress+EE_7114_CONTRAST);
              if(value<0xff) {
                value++;
                Set_7114_Contrast(value);
                EE_MCU_Byte_Write(ParaAddress+EE_7114_CONTRAST, value);
                Print_Char(3, 24, value, TEXT_COLOR);
                }
            break;
            case(3)://7114 Luminance
              value=EE_MCU_Byte_Read(ParaAddress+EE_7114_LUMINANCE);
              if(value<0xff) {
                value++;
                Set_7114_Luminance(value);
                EE_MCU_Byte_Write(ParaAddress+EE_7114_LUMINANCE, value);
                Print_Char(4, 24, value, TEXT_COLOR);
                }
            break;
            case(4)://BackLight
              value=EE_MCU_Byte_Read(ParaAddress+EE_BACK_LIGHT);
              if(value<0xff) {
                value++;
                BL_VOLT=value;
                EE_MCU_Byte_Write(ParaAddress+EE_BACK_LIGHT, value);
                Print_Char(5, 24, value, TEXT_COLOR);
                }
            break;
            case(5)://OSD H Position
              if(OSD_HPosition<86) {
                OSD_HPosition++;
                OSD_Position(OSD_VPosition, OSD_HPosition);
                EE_MCU_Byte_Write(EE_OSD_HPOS, OSD_HPosition);
                Print_Char(6, 24, OSD_HPosition, TEXT_COLOR);
                }
            break;
            case(6)://OSD V Position
              if(OSD_VPosition<85) {
                OSD_VPosition++;
                OSD_Position(OSD_VPosition, OSD_HPosition);
                EE_MCU_Byte_Write(EE_OSD_VPOS, OSD_VPosition);
                Print_Char(7, 24, OSD_VPosition, TEXT_COLOR);
                }
            break;
            }
        break;
        case(2):
          switch(Item) {
            case(0)://Color Temp

⌨️ 快捷键说明

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