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

📄 osd1_define.h

📁 TFT 屏驱动IC源码头TFT 屏驱动IC源码
💻 H
字号:
#ifndef __OSD1DEFINE_H__
#define __OSD1DEFINE_H__

#define OSD1_CTRL         	0x00
#define CHAR_DLY_0       	0x01
#define CHAR_DLY_1       	0x02
#define CHAR_DLY_2       	0x03
#define CHAR_FONT_SIZE   	0x04
#define CHAR_RAM_BASE_A  	0x05
#define CHAR_BS_CTRL     	0x06
#define CHAR_BS_COLOR    	0x07
#define CHAR_HEIGHT_CTRL 	0x08
#define BLINK_CTRL       	0x09
#define BW_WH_UPPER      	0x0a
#define BW_W             	0x0b
#define BW_H             	0x0c
#define BD_ENLARGE       	0x0d
#define OSD_LUT_RAM_DATA 	0x0e
#define CHAR_RAM_CTRL		0x0F
#define WIN1_Y_START     	0x11
#define WIN1_Y_END       	0x12
#define WIN1_X_START     	0x12
#define WIN1_X_END       	0x13
#define WIN1_SHADOW_SIZE 	0x14
#define WIN1_SE_CCNUM		0x15
#define FONTROM_IND_BASE	0x17
#define FONTROM_HEIGHT_CTR	0x18
#define ALPHA_BLD_CTRL   	0x1c
#define CHAR_RAM_END_A   	0x1e		 

#define IndexNumOffset				0//0x2a//0x1c//0x2F
#define IndexCharacterOffset		0//0x31//0x23//0x36		   

//#define LINE_LENGTH			27
//#define GAUGE_LENGTH   		20				  
#define	FONT_SIZE10W16H		0x40
#define FONT_SIZE12W12H		0x31
#define	FONT_SIZE12W16H		0x41
#define	FONT_SIZE14W16H		0x42
#define	FONT_SIZE16W16H		0x43
#define	FONT_SIZE10W18H		0x48
#define	FONT_SIZE12W18H		0x49
#define	FONT_SIZE14W18H		0x4a
#define	FONT_SIZE16W18H		0x4b


#define WIDTH6					6   // add by Sherman 05'11'04
#define WIDTH8					8   // add by Sherman 05'11'04
#define WIDTH10				    10
#define WIDTH12					12
#define WIDTH14					14
#define WIDTH16					16

#define HEIGHT12				12
#define HEIGHT16				16
#define HEIGHT18				18
#define HEIGHT20				20
#define HEIGHT24				24	  

#define CENTER					1
#define LEFT_BOTTOM				2
#define TOP						3
#define RIGHT_TOP				4

#define	FONT_SIZE				FONT_SIZE12W12H
#define FONT_WIDTH				WIDTH12
#define FONT_HEIGHT				HEIGHT12														   

#define TOTAL_FONT_NUM				    255//250//128//max 405
#define OSD_LENGTH						62//30 
#define OSD_LINE_NUM					20

#define FONT_DATA_START_ADDRESS			0x0000
#define MENU_RAM_START_ADDRESS			((TOTAL_FONT_NUM*FONT_HEIGHT)/64+1)*64

#define FONT_ROM_INDEX_BASE				0xFF//TOTAL_FONT_NUM

#define CHAR_MAIN_MENU_START			((MENU_RAM_START_ADDRESS>>5)&0xFF) 		   
#define CHAR_RAM_END               		CHAR_MAIN_MENU_START+OSD_LINE_NUM*(OSD_LENGTH+1)
#define Clean_RAM_END					0x1800 //6k			  

#define TXT_STAT				8
#define NUM_STAT				30
#define ITEM_STAT				23
#define Menu_StartX				84
#define Menu_StartY				40

//OSD number draw attabite
#define DRAW_BLANK				0x10
#define DRAW_ZERO				0x20   
#define Gauge_Full				0x0b
#define Gauge_Empty 			0x08

//Color definition
#define FGND_COLOR_TRANSPERANT    0x00
#define FGND_COLOR_PINK           0x01
#define FGND_COLOR_BLACK          0x02
#define FGND_COLOR_PURPLE         0x03
#define FGND_COLOR_BLUE           0x04
#define FGND_COLOR_BROWN          0x05
#define FGND_COLOR_RED            0x06
#define FGND_COLOR_SAFFRON        0x07
#define FGND_COLOR_GREEN          0x08
#define FGND_COLOR_CYAN           0x09
#define FGND_COLOR_WHITE          0x0A
#define FGND_COLOR_CAMBRIDGE_BLUE 0x0B
#define FGND_COLOR_YELLOW         0x0C
#define FGND_COLOR_LILAC          0x0D
#define FGND_COLOR_GRAYEST        0x0E
#define FGND_COLOR_GRAYISH        0x0F

#define BGND_COLOR_TRANSPERANT    0x00
#define BGND_COLOR_BLACK          0x20
#define BGND_COLOR_BLUE           0x40
#define BGND_COLOR_RED            0x60
#define BGND_COLOR_GREEN          0x80
#define BGND_COLOR_WHITE          0xA0
#define BGND_COLOR_YELLOW         0xC0
#define BGND_COLOR_GRAYEST        0xE0

//OSD_Position
#define OSD1_H_START_POS   0x00//0x02
#define OSD1_V_START_POS   0x00

//OSD Row Attribute
#define RGAP_BG  0x80
#define RGAP_0   0x00
#define RGAP_4   0x04
#define RGAP_8   0x08
#define RGAP_12  0x0C
#define Char_Height_Double 0x02
#define Char_Height_Single 0x00
#define Char_Width_Double 0x01
#define Char_Width_Single 0x00
extern void OSD1Init(void);
#endif //  __OSD1DEFINE_H__

⌨️ 快捷键说明

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