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

📄 osdpub900.h

📁 LCD Monitor 部分源码
💻 H
字号:
#if(_OSD_TYPE == _OSD900)


#define _BACKLIGHT_MAX                  255
#define _BACKLIGHT_MIN                  0

// andy : The define at testing state
#define BIT2_MSB_16COLOR_LUT(x)        ((x & 0x01) << 4)
#define BIT2_BLINK(x)                  ((x & 0x01) << 6)

//---- menu define ----------------------
#define _MENU_NONE                      0
#define _MENU_COLOR                     1
#define _MENU_IMAGE_SETTING             2
#define _MENU_POSITION                  3
#define _MENU_OSD_MENU                  4
#define _MENU_LANGUAGE                  5
#define _MENU_MISC                      6
#define _MENU_EXIT                      7
#define _MENU_TV                        8

#define _MENU_CONTRAST                  10
#define _MENU_BRIGHTNESS                11
#define _MENU_COLOR_ADJUST              12
#define _MENU_COLOR_TEMP                13
#define _MENU_COLOR_BACK                14

#define _MENU_HUE                       15
#define _MENU_SATURATION                16

#define _MENU_RED                       17
#define _MENU_GREEN                     18
#define _MENU_BLUE                      19

#define _MENU_9300                      20
#define _MENU_6500                      21
#define _MENU_USER                      22

#define _MENU_CLOCK                     25
#define _MENU_PHASE                     26
#define _MENU_GAMMA                     27
#define _MENU_SHARPNESS                 28
#define _MENU_IMAGE_BACK                29

#define _MENU_HPOS                      30
#define _MENU_VPOS                      31
#define _MENU_POSITION_BACK             32

#define _MENU_OSD_HPOS                  35
#define _MENU_OSD_VPOS                  36
#define _MENU_OSD_TIMER                 37
#define _MENU_OSD_COLOR                 38
#define _MENU_OSD_BACK                  39

#define _MENU_RESET                     40
#define _MENU_VOLUME                    41
#define _MENU_MUTE                      42
#define _MENU_MISC_BACK                 43

#define _MENU_LANGUAGE_ADJ              50
#define _MENU_CONTRAST_ADJ              51
#define _MENU_BRIGHTNESS_ADJ            52

#define _MENU_RED_ADJ                   54
#define _MENU_GREEN_ADJ                 55
#define _MENU_BLUE_ADJ                  56
#define _MENU_CLOCK_ADJ                 57
#define _MENU_PHASE_ADJ                 58
#define _MENU_GAMMA_ADJ                 59
#define _MENU_SHARPNESS_ADJ             60
#define _MENU_HPOS_ADJ                  61
#define _MENU_VPOS_ADJ                  62
#define _MENU_OSD_HPOS_ADJ              63
#define _MENU_OSD_VPOS_ADJ              64
#define _MENU_OSD_TIMER_ADJ             65
#define _MENU_OSD_COLOR_ADJ             66
#define _MENU_VOLUME_ADJ                67
#define _MENU_HUE_ADJ                   68
#define _MENU_SATURATION_ADJ            69

#define _MENU_CHANNEL                   70
#define _MENU_SYSTEM                    71
#define _MENU_TUNING                    72
#define _MENU_SWAP                      73
#define _MENU_AUTO_SEARCH               74
#define _MENU_MANUAL_SEARCH             75
#define _MENU_TV_BACK                   76

#define _MENU_CHANNEL_ADJ               80
#define _MENU_SYSTEM_ADJ                81
#define _MENU_TUNING_ADJ                82
#define _MENU_SWAP_ADJ                  83
#define _MENU_MANUAL_SEARCH_ADJ         84


#define _MENU_VOLUME_SP                 100
#define _MENU_BRIGHT_SP                 101

//---- OSD Msg define ----------------------
// KEY MSG
// 单一功能消息
#define VK_NONE                         0               //没有按钮信息
#define VK_MENU_OUT                     1               //回到上一级菜单的信息
#define VK_MENU_IN                      2               //进入下一级菜单的信息
#define VK_PREV_MENU                    3               //上一项菜单
#define VK_NEXT_MENU                    4               //下一项菜单
#define VK_ADJ_DEC                      5               //调节-
#define VK_ADJ_INC                      6               //调节+
#define VK_DO                           7               //菜单执行  ( 例如 Auto / Reset / Auto Scan )

// 复合功能消息
#define VK_ENTER                        8               //进入 / 执行菜单
#define VK_LEFT                         9               //上一项菜单 / 调节-
#define VK_RIGHT                        10              //下一项菜单 / 调节+

// OSD EVENT
// 任何时候都可以发出以下的消息
#define OE_ENTER_MENU                   0x80            //进入下一级菜单                (VK_MENU_IN)

// 只有在有菜单时 (ucOsdState != _MENU_NONE) 时才会发出以下消息
#define OE_MENU_OUT                     0x81            //回到上一级菜单                (VK_MENU_OUT)
#define OE_MENU_ENTER_NEXT_MENU         0x82            //进入上级菜单的下一级菜单      (VK_MENU_OUT + VK_PREV_MENU + VK_MENU_IN)
#define OE_MENU_ENTER_PREV_MENU         0x83            //进入上级菜单的上一级菜单      (VK_MENU_OUT + VK_NEXT_MENU + VK_MENU_IN)

// 任何时候都可以发出以下的消息
#define OE_DO_AUTO                      0x84            //Auto
#define OE_DO_CHANGE_SOURCE             0x85            //改变模式
#define OE_GOTO_VGA                     0x86            //切项到VGA
#define OE_SWITCH_TV_AV                 0x87            //AV/TV/SV 切换

// 只有在没有菜单时 (ucOsdState = _MENU_NONE) 时才会发出以下消息
#define OE_GO_VOLUME_ADJUST             0x88            //进入音量调节
#define OE_GO_BRIGHT_ADJUST             0x89            //进入亮度调节
#define OE_CH_INC                       0x8a            //频道 +
#define OE_CH_DEC                       0x8b            //频道 -


#define ITEM_SHORTCUT_INPUTCH_NUM       210

#define VK_IR_INPUTCH                   _IR_INPUTCH_KEY_MESSAGE
#define VK_IR_RETURN                    _IR_RETURN_KEY_MESSAGE

#define VK_IR_NUM0                      _IR_NUM0_KEY_MESSAGE
#define VK_IR_NUM1                      _IR_NUM1_KEY_MESSAGE
#define VK_IR_NUM2                      _IR_NUM2_KEY_MESSAGE
#define VK_IR_NUM3                      _IR_NUM3_KEY_MESSAGE
#define VK_IR_NUM4                      _IR_NUM4_KEY_MESSAGE
#define VK_IR_NUM5                      _IR_NUM5_KEY_MESSAGE
#define VK_IR_NUM6                      _IR_NUM6_KEY_MESSAGE
#define VK_IR_NUM7                      _IR_NUM7_KEY_MESSAGE
#define VK_IR_NUM8                      _IR_NUM8_KEY_MESSAGE
#define VK_IR_NUM9                      _IR_NUM9_KEY_MESSAGE

#define _SUPPORT_POWER_SAVING           1




//---- language type define--------------
#define LNG_ENG                         0
#define LNG_FRA                         1
#define LNG_DEU                         2
#define LNG_ESP                         3
#define LNG_CHI_S                       4
#define LNG_CHI_T                       5
#define LNG_JAP                         6
#define LNG_RUS                         7
#define LNG_KOR                         8

//---- language mask---------------------
#define LNG_ENG_EN                      1
#define LNG_FRA_EN                      1
#define LNG_DEU_EN                      0
#define LNG_ESP_EN                      1
#define LNG_CHI_S_EN                    0
#define LNG_CHI_T_EN                    1
#define LNG_JAP_EN                      0
#define LNG_RUS_EN                      1
#define LNG_KOR_EN                      1

#define CLEAR_OSD_CLIENT()              OSDClear(3,22,0,26,0x00,BYTE_DISPLAY)

#define CLEAR_OSD_ADJUST()              OSDClear(19,5,3,20,0x00,BYTE_DISPLAY);\
                                        OSDClear(19,5,3,20,0x10,BYTE_COLOR);\
                                        OSDClear(19,5,3,20,0x8c,BYTE_ATTRIB)

#define SLIDER(value)                   OSDSlider(23, 3, 11, value, 100,0x10)
#define SLIDER1(value,color)            OSDSlider(21, 3, 11, value, 100,color)
#define SPSLIDER(value)                 OSDSlider( 5, 6, 14, value, 100,0x10)
#define SPSLIDER2(value)                OSDSlider( 5, 4, 14, value, 100,0x10)

#define MAX_BRIGHT                      255
#define MIN_BRIGHT                      0
#define MAX_CONTRAST                    250   //if change this ,must change eepromdefault.h
#define MIN_CONTRAST                    0


#define BRIGHTNESS_GUAGE                (unsigned int)(stConBriData.Brightness - MIN_BRIGHT) * 100 / (MAX_BRIGHT - MIN_BRIGHT)
#define CONTRAST_GUAGE                  (unsigned int)(stConBriData.Contrast - MIN_CONTRAST) * 100 / (MAX_CONTRAST - MIN_CONTRAST)
#define USER_R_GUAGE                    (unsigned int)stColorTempData.ColorTemp[_RED] * 100 / 255
#define USER_G_GUAGE                    (unsigned int)stColorTempData.ColorTemp[_GREEN] * 100 / 255
#define USER_B_GUAGE                    (unsigned int)stColorTempData.ColorTemp[_BLUE] * 100 / 255

#define HUE_GUAGE                       stVDCColor.Hue
#define SATURATION_GUAGE                stVDCColor.Saturation

#ifdef __OSD900_LCD_OSD__
bit fOsdDouble = 0;
unsigned char ucTimeTmp = 0;
#if (_BURNIN_EN)
unsigned char code BurnInColor[3][8] =
{
   {32, 64, 96, 128, 160, 196, 228, 255},
   {255, 228, 196, 160, 128, 96, 64, 32},
   {196, 64, 128, 32, 96, 255, 228, 160},
};
#endif

unsigned int code usLANGUAGE_MASK  =  ( LNG_ENG_EN   << LNG_ENG )   |
                                      ( LNG_FRA_EN   << LNG_FRA )   |
                                      ( LNG_DEU_EN   << LNG_DEU )   |
                                      ( LNG_ESP_EN   << LNG_ESP )   |
                                      ( LNG_CHI_S_EN << LNG_CHI_S ) |
                                      ( LNG_CHI_T_EN << LNG_CHI_T ) |
                                      ( LNG_JAP_EN   << LNG_JAP )   |
                                      ( LNG_RUS_EN   << LNG_RUS )   |
                                      ( LNG_KOR_EN   << LNG_KOR );


#else
extern bit fOsdDouble;
extern unsigned char ucTimeTmp;
extern unsigned int code usLANGUAGE_MASK;
#endif  //#ifdef __OSD900_LCD_OSD__

void COsdHandler();
void COsdProc();
void NotUseFunc();
void ShowHint();
void ShowNote();
void COsdDispFirstTimeLoadFont(void);
void COsdDispOsdTimerEvent(void);
void COsdEventMsgProc(void);
void OSDSlider(unsigned char row, unsigned char col, unsigned char length, unsigned char value, unsigned char range,
                      unsigned char color);
void ShowMode(void);
void Set2BitColor(unsigned char x,unsigned char y,
                  unsigned char Width,unsigned char Height,
                  unsigned char code *Style);
void SetIconCntAtb(unsigned char ucCount);
void DrawPen(unsigned char ucState,unsigned char y);
void DrawMainPage();
void DrawColorPage();
void DrawImagePage();
void DrawPositionPage();

void DrawOSDPage();
void DrawLanguagePage();
void DrawALanguage(unsigned char ucLnguage,unsigned char ucItem);
void DrawMiscPage();
void InitOSDFrame();
void InitDialog();
void LoadLanguageFont();
void LoadLanguageFont1();
void DispIcon(unsigned char x,unsigned char y,unsigned char ucIconBaseAddr);
unsigned char GetBright(unsigned char ucValue);
void OutputRecommendedMode();
void CFirstInitOsd(void);

#if(_IR_ENABLE)        
void CShowFiveNumber(const WORD ucNumber, BYTE ucUserDefLong);
void STVInputCHEnter(void);
void SInputCHNumber(void);
void SInceptNumber(const BYTE ucNumber);
void SShowCurrentInputState(BYTE ucInputState);

void STVInputCHNumber(void);
void STVReturnCH(void);
#endif


void LoadPalette();

#endif  //#if(OSD_TYPE == OSD900)

⌨️ 快捷键说明

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