📄 al320_osd.h
字号:
/*--------------------------------------------------------------------------
AL320_OSD.H
Header file for AL320_OSD
History:
07/20/2006 : First Version V0.1 ---HsinChu Office
09/15/2006 : Version 0.2 ---HsinChu Office
1. Modify the definition of OSD_HORIZONTAL_ZOOMX1~X4
Copyright (c) 1998-2006 AverLogic Inc
All rights reserved.
--------------------------------------------------------------------------*/
#ifndef __AL320_OSD_H__
#define __AL320_OSD_H__
//Slave Address of AL320
#define SLAVE_ADDRESS_AL320 0x32
// OSD Definition of Register Address
#define OSD_CONTROL1 0x30
#define OSD_ZOOM 0x31
#define OSD_HSTART 0x32
#define OSD_VSTART 0x33
#define RAMADDR1ST 0x34
#define RAMSTRIDELOW 0x36
#define RAMSTRIDEHIGH 0x37
#define BMAPHSIZELOW 0x38
#define BMAPHSIZEHIGH 0x39
#define BMAPHTOTALLOW 0x3a
#define BMAPHTOTALHIGH 0x3b
#define BMAPVSIZELOW 0x3c
#define BMAPVSIZEHIGH 0x3d
#define BMAPVTOTALLOW 0x3e
#define BMAPVTOTALHIGH 0x3f
#define ICON_HTOTAL 0x40
#define ICON_VTOTAL 0x41
#define FONTADDR1STLOW 0x42
#define FONTADDR1STHIGH 0x43
#define FONT_ADDR_UNIT 0x44
#define FONT_LINE_SIZE 0x45
#define FONT_MODE 0x46
#define ALPHA 0x49
#define OSD_CONTROL2 0x4a
//OSD Write&Index
#define OSD_RAM_WEN 0x74
#define FONT_RAM_ADDR_LOW 0x78
#define FONT_RAM_ADDR_HIGH 0x79
#define FONT_RAM_DATA 0x7a
#define BMAP_RAM_ADDR_LOW 0x75
#define BMAP_RAM_ADDR_HIGH 0x76
#define BMAP_RAM_DATA 0x77
// OSD Color
#define OSD_COLOR0_RED 0xa0
#define OSD_COLOR0_GREEN 0xa1
#define OSD_COLOR0_BLUE 0xa2
#define OSD_COLOR1_RED 0xa3
#define OSD_COLOR1_GREEN 0xa4
#define OSD_COLOR1_BLUE 0xa5
#define OSD_COLOR2_RED 0xa6
#define OSD_COLOR2_GREEN 0xa7
#define OSD_COLOR2_BLUE 0xa8
#define OSD_COLOR3_RED 0xa9
#define OSD_COLOR3_GREEN 0xaa
#define OSD_COLOR3_BLUE 0xab
#define OSD_COLOR4_RED 0xac
#define OSD_COLOR4_GREEN 0xad
#define OSD_COLOR4_BLUE 0xae
#define OSD_COLOR5_RED 0xaf
#define OSD_COLOR5_GREEN 0xb0
#define OSD_COLOR5_BLUE 0xb1
#define OSD_COLOR6_RED 0xb2
#define OSD_COLOR6_GREEN 0xb3
#define OSD_COLOR6_BLUE 0xb4
#define OSD_COLOR7_RED 0xb5
#define OSD_COLOR7_GREEN 0xb6
#define OSD_COLOR7_BLUE 0xb7
//AL320_EnableOSD Mode
#define OSD_SET_ON_OFF 0x00
#define OSD_OFF (OSD_SET_ON_OFF | 0)
#define OSD_ON (OSD_SET_ON_OFF | 1)
//AL320_SetOSDFontPixelDepth value
#define OSD_FONT_DEPTH_1 0x00 //1-bit/Pixel
#define OSD_FONT_DEPTH_2 0x08 //2-bit/Pixel
//AL320_SetFontContext value
//#define FONT_CONTEXT_1_BYTE 0x00 //1-byte Mode
//#define FONT_CONTEXT_2_BYTE 0x02 //2-byte Mode
//AL320_SetBlinking ON/OFF
#define BLINK_OFF 0x00 //Disable
#define BLINK_ON 0x04 //Enable
//AL320_SetOSDZoom value
#define OSD_HORIZONTAL_NO_ZOOM 0x00 //Horizontal Zoom x 1
#define OSD_HORIZONTAL_ZOOM_X1 OSD_HORIZONTAL_NO_ZOOM //Horizontal Zoom x 1
#define OSD_HORIZONTAL_ZOOM_X2 (0x01) //Horizontal Zoom x 2
#define OSD_HORIZONTAL_ZOOM_X4 (0x02) //Horizontal Zoom x 4
#define OSD_HORIZONTAL_ZOOM_X8 (0x03) //Horizontal Zoom x 8
#define OSD_VERTICAL_NO_ZOOM 0x00 //Vertical Zoom x 1
#define OSD_VERTICAL_ZOOM_X1 OSD_VERTICAL_NO_ZOOM //Vertical Zoom x 1
#define OSD_VERTICAL_ZOOM_X2 (0x01<<4) //Vertical Zoom x 2
#define OSD_VERTICAL_ZOOM_X4 (0x02<<4) //Vertical Zoom x 4
#define OSD_VERTICAL_ZOOM_X8 (0x03<<4) //Vertical Zoom x 8
//AL320_SetOSDTranspetentMode
#define OSD_TRANSPARENT_SET_ON_OFF 0x00
#define OSD_TRANSPARENT_ON (OSD_TRANSPARENT_SET_ON_OFF | (1<<4)) //OSD Transpetent ON
#define OSD_TRANSPARENT_OFF (OSD_TRANSPARENT_SET_ON_OFF | (0<<4)) //OSD Transpetent OFF
#define OSD_TRANSPARENT_SET_COLOR 0x00
#define OSD_TRANSPAREN_COLOR_0 (OSD_TRANSPARENT_SET_COLOR | (0<<5)) //OSD Color Write/ Index 0
#define OSD_TRANSPAREN_COLOR_1 (OSD_TRANSPARENT_SET_COLOR | (1<<5)) //OSD Color Write/ Index 1
#define OSD_TRANSPAREN_COLOR_2 (OSD_TRANSPARENT_SET_COLOR | (2<<5)) //OSD Color Write/ Index 2
#define OSD_TRANSPAREN_COLOR_3 (OSD_TRANSPARENT_SET_COLOR | (3<<5)) //OSD Color Write/ Index 3
#define OSD_TRANSPAREN_COLOR_4 (OSD_TRANSPARENT_SET_COLOR | (4<<5)) //OSD Color Write/ Index 4
#define OSD_TRANSPAREN_COLOR_5 (OSD_TRANSPARENT_SET_COLOR | (5<<5)) //OSD Color Write/ Index 5
#define OSD_TRANSPAREN_COLOR_6 (OSD_TRANSPARENT_SET_COLOR | (6<<5)) //OSD Color Write/ Index 6
#define OSD_TRANSPAREN_COLOR_7 (OSD_TRANSPARENT_SET_COLOR | (7<<5)) //OSD Color Write/ Index 7
/*
//AL320_SetOSDLOP
#define OSD_BMP_VIDEO_LOP_NONE 0
#define OSD_BMP_VIDEO_LOP_OR 1
#define OSD_BMP_VIDEO_LOP_AND 2
#define OSD_BMP_VIDEO_LOP_XOR 3
#define OSD_LOP_COLOR_0 0x01 //OSD Color Write/ Index 0
#define OSD_LOP_COLOR_1 0x02 //OSD Color Write/ Index 1
#define OSD_LOP_COLOR_2 0x04 //OSD Color Write/ Index 2
#define OSD_LOP_COLOR_3 0x08 //OSD Color Write/ Index 3
#define OSD_LOP_COLOR_4 0x10 //OSD Color Write/ Index 4
#define OSD_LOP_COLOR_5 0x20 //OSD Color Write/ Index 5
#define OSD_LOP_COLOR_6 0x40 //OSD Color Write/ Index 6
#define OSD_LOP_COLOR_7 0x80 //OSD Color Write/ Index 7
*/
//AL320_SetOSDBlinking
#define OSD_BLINKING_SET_ON_OFF 0x80
#define OSD_BLINKING_ON (OSD_BLINKING_SET_ON_OFF | (1<<7)) //Enable OSD Blinking
#define OSD_BLINKING_OFF (OSD_BLINKING_SET_ON_OFF | (0<<7)) //Disable OSD Blinking
#define OSD_BLINKING_SET_COLOR 0x20
#define OSD_COLOR_REVERSE (OSD_BLINKING_SET_COLOR | (0<<3)) //Inverse
#define OSD_COLOR_ALWAYS_REVERSE (OSD_BLINKING_SET_COLOR | (1<<3)) //Always Inverse
#define OSD_COLOR_BYPASS (OSD_BLINKING_SET_COLOR | (2<<3)) //Bypass
#define OSD_COLOR_ALWAYS_BYPASS (OSD_BLINKING_SET_COLOR | (3<<3)) //Always Bypass
#define OSD_BLINKING_SET_FREQ 0x00
#define OSD_BLINKING_FREQ_VERY_HIGH (OSD_BLINKING_SET_FREQ | 0) //VSync Freq./8(Hz)
#define OSD_BLINKING_FREQ_HIGH (OSD_BLINKING_SET_FREQ | 1) //VSync Freq./16(Hz)
#define OSD_BLINKING_FREQ_NORMAL (OSD_BLINKING_SET_FREQ | 2) //VSync Freq./32(Hz)
#define OSD_BLINKING_FREQ_LOW (OSD_BLINKING_SET_FREQ | 3) //VSync Freq./64(Hz)
#define OSD_BLINKING_SET_TYPE 0x00
#define OSD_BLINKING_TYPE_ON_OFF_BLINKING (OSD_BLINKING_SET_FREQ | 0<<2) //VSync Freq./8(Hz)
#define OSD_BLINKING_TYPE_ALWAYS_TRANSPARENT (OSD_BLINKING_SET_FREQ | 1<<2) //VSync Freq./16(Hz)
#define OSD_BLINKING_TYPE_COMPLEMENT_BLINKING (OSD_BLINKING_SET_FREQ | 2<<2) //VSync Freq./32(Hz)
#define OSD_BLINKING_TYPE_ALWAYS_COMPLEMENT (OSD_BLINKING_SET_FREQ | 3<<2) //VSync Freq./64(Hz)
//OSD font addressing unit
#define OSD_FONT_ADDRESSING_1 0 //OSD Font Address Unit==>1 Byte
#define OSD_FONT_ADDRESSING_2 1 //OSD Font Address Unit==>2 Byte
#define OSD_FONT_ADDRESSING_4 2 //OSD Font Address Unit==>4 Byte
#define OSD_FONT_ADDRESSING_8 3 //OSD Font Address Unit==>8 Byte
#define OSD_FONT_ADDRESSING_16 4 //OSD Font Address Unit==>16 Byte
#define OSD_FONT_ADDRESSING_32 5 //OSD Font Address Unit==>32 Byte
#define OSD_FONT_ADDRESSING_64 6 //OSD Font Address Unit==>64 Byte
#define OSD_FONT_ADDRESSING_128 7 //OSD Font Address Unit==>128 Byte
//OSD color index
#define OSD_COLOR_0 0 //OSD Color Write/ Index 0
#define OSD_COLOR_1 1 //OSD Color Write/ Index 1
#define OSD_COLOR_2 2 //OSD Color Write/ Index 2
#define OSD_COLOR_3 3 //OSD Color Write/ Index 3
#define OSD_COLOR_4 4 //OSD Color Write/ Index 4
#define OSD_COLOR_5 5 //OSD Color Write/ Index 5
#define OSD_COLOR_6 6 //OSD Color Write/ Index 6
#define OSD_COLOR_7 7 //OSD Color Write/ Index 7
//OSD Ram Write Enable
#define OSD_RAM_WRITE_DISABLE 0
#define OSD_RAM_WRITE_ENABLE 2 // 1 jason 070411
//OSD Font Mode Enable
#define OSD_BITMAP_MODE 0
#define OSD_FONT_MODE 1
//Function
void AL320_EnableOSD(Byte ucEnableFlag);
void AL320_EnableOSDBlinking(Byte ucEnableFlag);
void AL320_SetOSDFontContext(Byte ucContext);
void AL320_SetOSDFontPixelDepth(Byte ucDepth);
void AL320_SetOSDDisplayStart(void);
void AL320_SetOSDRamStride(Word uiRamStrideX);
void AL320_SetOSDFontSize(Word uiFontWidth, Word uiFontHeight, Byte ucFontLineStride);
void AL320_SetOSDSize(Byte ucWidth, Byte ucHeight);
void AL320_SetOSDFontAddress(Word uiFontAddress);
void AL320_SetOSDColor(Byte ucIndex, Byte ucR, Byte ucG, Byte ucB);
void AL320_SetOSDIcon(Byte ucIndex);
void AL320_SetOSDTransparent(Byte ucTransparent);
void AL320_SetOSDBlinking(Byte ucBlinking);
void AL320_SetOSDZoom(Byte ucZoom);
//void AL320_SetOSDAlphaBlending(Byte ucAlpha);
//void AL320_SetOSDFontAddressUnit(Byte ucFontAddressUnit);
//void AL320_EnableOSDFontMode(Byte ucOSDMode);
//void AL320_EnableOSDRAMWrite(Byte ucEnableFlag);
//void AL320_SetOSDRamAddress(Byte ucRamAddressX);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -