hal_blt.h

来自「一款SmartPhone的驱动代码」· C头文件 代码 · 共 111 行

H
111
字号
/************************************************************************
;  	HAL_BLT.h
;
;	The routines in this file comprise the blt 2D Acceleration
;
;	The Function is basic operation of LCDC
;
; 	Copyright (c) 2002 Epson Research and Development, Inc.
;
;  	All Rights Reserved.
;	2003.04.17	David Cheng
;************************************************************************/
#ifndef __HAL_BLT_H__
#define __HAL_BLT_H__

// 如果是8bit的颜色就屏蔽此宏
#define		BITBLT_BPP16		

// 几种显示模式
#define		ATTR_TRANSPARENT		0x80



// rop的几种模式
#define		ROP_AND		
#define		ROP_OR		
#define		ROP_NOT
#define		ROP_XOR				

// 
#define		BPP_8BIT			0
#define		BPP_16BIT			1

// 
#define		BITBLT_STATUSBUSY	1	// BITBLT operarion is in progress
#define		BITBLT_STATUSCOMP	0	// BITBLT operarion is complete


//---------------------------------------------------------------------------
//	CONTROL_INFO - This structure contains system configuration information.
//---------------------------------------------------------------------------
typedef struct
{
	long	TotalVmem;			// Total video memory on the card.
	short	Width;				// Width (in pixels) of the mode.
	short	Height;				// Height (in pixels) of the mode.
	short	Bpp;				// Bits per pixel.
	short	Stride;				// Number of bytes from one line to the next.
	short	Swivel;				// Current SwivelView (0,90,180,270)
	int		OffscreenOffset;	// Address off screen where 128 byte pattern written
	int		Reg8000MSW;			// Select bits in BLT control register high
	unsigned int BytesPerPixel;	// 1,2 for 8BPP,16BPP
	/*
	int		ExcludeBugs;		// Perform the tests excluding known bugs
	int		TestOnlyMain;		// Test only the memory used by the main display.
	int		OpToDemo;
	*/
}BLTCTRL_INFO,*LPBLTCTRL_INFO;


// BLT_INFO -  The structure sent as an argument to 
// all Blt routines.
typedef struct
{
	unsigned short	Operation;		// 
	int		ROP;					// 显示模式
	short	SrcTop;					// 源数据的位置
	short	SrcLeft;				// 
	short	SrcWidth;				// 
	short	SrcHeight;				// 
	short	DstTop;					// 目的数据的位置
	short	DstLeft;				// 	
	short	DstWidth;				// 
	short	DstHeight;				// 
	short	PatternX,PatternY;		// 
	unsigned short	Pattern[8*8];	// 

	short	Attribute;				// 
	int		ColorBg;				// 背景色
	int		ColorFg;				// 前景色
} BLT_INFO,*LPBLT_INFO;

/////////////////////////////////////////////////////////////
#define BLT_WRITE				0x00	// Write BitBLT with ROP
#define BLT_READ				0x01	// Read  BitBLT
#define BLT_MOVE_POS			0x02	// Move  BitBLT positive with ROP
#define BLT_MOVE_NEG			0x03	// Move  BitBLT negative with ROP
#define BLT_WRITE_TRN			0x04	// Write BitBLT with transparency
#define BLT_MOVE_POS_TRN		0x05	// Move  BitBLT positive with transparency
#define BLT_PAT_FILL			0x06	// Pattern Fill BitBLT with ROP
#define BLT_PAT_FILL_TRN		0x07	// Pattern Fill with tranparency
#define BLT_CLR_EXPAND			0x08	// Color Expand BitBLT
#define BLT_CLR_EXPAND_TRN		0x09	// Color Expand BitBLT with tranparency
#define BLT_MOVE_CLR_EXPAND		0x0A	// Move BitBLT with color expand
#define BLT_MOVE_CLR_EXPAND_TRN	0x0B	// Move BitBLT with color expand and tranparency
#define BLT_SOLID_FILL			0x0C	// Solid Fill BitBLT


/************  interface function declaration ***********/
void LCDCDrawRect( short, short, short,short, unsigned int );
void ClearMainWindowMemory( LPBLTCTRL_INFO );
void InitModeInfo( LPBLTCTRL_INFO );
void SolidFillBlt( LPBLT_INFO, LPBLTCTRL_INFO );
void ReadBlt(LPBLT_INFO,LPBLTCTRL_INFO,unsigned long );
void WriteBlt(LPBLT_INFO,LPBLTCTRL_INFO,unsigned long );
void PatternFillBlt( LPBLT_INFO,LPBLTCTRL_INFO );
void MoveBlt( LPBLT_INFO, LPBLTCTRL_INFO );



#endif	// __HAL_BLT_H__

⌨️ 快捷键说明

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