📄 osdpub902.h
字号:
#if(_OSD_TYPE == _OSD902)
#define _BACKLIGHT_MAX 255
#define _BACKLIGHT_MIN 0
#define BIT2_MSB_16COLOR_LUT(x) ((x & 0x01) << 4)
#define BIT2_BLINK(x) ((x & 0x01) << 6)
//---------------------- MENU DEFINE [Begin] ----------------------//
#define _MENU_NONE 0
//MAIN MENU
#define _MENU_BRIGHTNESS_CONTRAST 1
#define _MENU_ADJUST 2
#define _MENU_PHASE_CLOCK 3
#define _MENU_HV_POSITION 4
#define _MENU_MISC 5
#define _MENU_RESET 6
//_MENU_BRIGHTNESS_CONTRAST
#define _MENU_BRIGHTNESS 11
#define _MENU_CONTRAST 12
//_MENU_ADJUST
#define _MENU_AUTO_ADJUST 21
#define _MENU_AUTO_BALANCE 22
#define _MENU_ADJUSTING 23
//_MENU_PHASE_CLOCK
#define _MENU_PHASE 31
#define _MENU_CLOCK 32
//_MENU_HV_POSITION
#define _MENU_H_POSITION 41
#define _MENU_V_POSITION 42
//_MENU_MISC
#define _MENU_INFORMATION 51
#define _MENU_TIMER 52
#define _MENU_COLOR 53
#define _MENU_LANGUAGE 54
#define _MENU_DISPLAY_MODE 55
#define _MENU_TITLE_INFORMATION 56
#define _MENU_OSD_TIMER 57
//_MENU_COLOR
#define _MENU_5500K 60
#define _MENU_6500K 61
#define _MENU_9300K 62
#define _MENU_USER 63
#define _MENU_RED 64
#define _MENU_GREEN 65
#define _MENU_BLUE 66
//_MENU_LANGUAGE
#define _MENU_ENGLISH 71
#define _MENU_JAPANESE 72
#define _MENU_CHINESE_S 73
#define _MENU_GERMAN 74
#define _MENU_FRANCAIS 75
#define _MENU_ESPANOL 76
#define _MENU_ITALIANO 77
#define _MENU_RESET_ALL 80
#define _MENU_VOLUME_SP 100
#define _MENU_BRIGHT_SP 101
//---------------------- MENU DEFINE [End] ----------------------//
//---------------------- OSD MSG DEFINE [Begin] ----------------------//
// 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 //频道 -
//---------------------- OSD MSG DEFINE [End] ----------------------//
#define SLIDER(value) OSDSlider(4, 0, COL_WIDTH-2, value, 100,0x31)
#define SLIDER1(value,color) OSDSlider(4, 0, COL_WIDTH-2, value, 100,0x31)
//#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 MAX_TIMEOUT 27
#define MIN_TIMEOUT 3
#define SPSLIDERTIMER(value) OSDSliderTime(4, 0, COL_WIDTH-2, value, MAX_TIMEOUT,0x31)
#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 TIMEOUT_GUAGE (unsigned int)(stOsdUserData.OsdTimeout - MIN_TIMEOUT) * MAX_TIMEOUT / (MAX_TIMEOUT-MIN_TIMEOUT)
//#define TIMEOUT_GUAGE (unsigned int)(stOsdUserData.OsdTimeout)
#define MENUITEM_SELECT(row) OSDLine(row,0,COL_WIDTH,COLOR_SELECTBODY,BYTE_COLOR)
#define MENUITEM_CLR(row) OSDLine(row,0,COL_WIDTH,COLOR_BODY,BYTE_COLOR)
//---------------------- LANGUAGE TYPE DEFINE [Begin] ----------------------//
#define _LNG_ENGLISH 0
#define _LNG_JAPANESE 1
#define _LNG_CHINESE_S 2
#define _LNG_GERMAN 3
#define _LNG_FRANCAIS 4
#define _LNG_ESPANOL 5
#define _LNG_ITALIANO 6
#define _LNG_CHINESE_T 7
//---- language mask---------------------
#define _LNG_ENGLISH_EN 1
#define _LNG_JAPANESE_EN 1
#define _LNG_CHINESE_S_EN 1
#define _LNG_GERMAN_EN 1
#define _LNG_FRANCAIS_EN 1
#define _LNG_ESPANOL_EN 1
#define _LNG_ITALIANO_EN 1
#define _LNG_CHINESE_T_EN 1
//---------------------- LANGUAGE TYPE DEFINE [End] ----------------------//
#ifdef __OSD902_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_ENGLISH_EN << _LNG_ENGLISH ) |
( _LNG_JAPANESE_EN << _LNG_JAPANESE ) |
( _LNG_CHINESE_S_EN << _LNG_CHINESE_S) |
( _LNG_GERMAN_EN << _LNG_GERMAN ) |
( _LNG_FRANCAIS_EN << _LNG_FRANCAIS ) |
( _LNG_ESPANOL_EN << _LNG_ESPANOL ) |
( _LNG_ITALIANO_EN << _LNG_ITALIANO );
#else
extern void BurnIn();//hsl
extern bit fOsdDouble;
extern unsigned char ucTimeTmp;
extern unsigned int code usLANGUAGE_MASK;
#endif //#ifdef __OSD902_LCD_OSD__
void COsdHandler();
void COsdEventMsgProc(void);
void KeyMsgToOsdMsg(void);
void EnterKeyProc(void);
void NotUseFunc();
void ShowHint();
void ShowNote();
void DrawMainPage();
void COsdProc();
void COsdDispFirstTimeLoadFont(void);
void COsdDispOsdTimerEvent(void);
void LoadLanguageFont();
void DispIcon(unsigned char x,unsigned char y,unsigned char ucIconBaseAddr);
void InitOsd();
void InitOSDFrame();
void OSDSlider(unsigned char row, unsigned char col, unsigned char length, unsigned char value, unsigned char range, unsigned char color);
void OSDSlider_Base(unsigned char row, unsigned char col, unsigned char length, unsigned char value, unsigned char range,unsigned char color);
void OSDSliderTime(unsigned char row, unsigned char col, unsigned char length, unsigned char value, unsigned char range,unsigned char color);
void Set2BitColor(unsigned char x,unsigned char y,unsigned char Width,unsigned char Height,unsigned char code *Style);
void DrawMainPage();
void LoadPalette();
void CenterLineTextout(unsigned char code *Text,unsigned char row,unsigned char length);
void RightAlignLineTextOut(unsigned char code *Text,unsigned char row,unsigned char length);
void ShowMode();
void CFirstInitOsd(void);
#endif //#if(_OSD_TYPE == _OSD902)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -