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

📄 pdpal.h

📁 Lido PXA270平台开发板的最新BSP,包括源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
/**************************************************************************
 Name         : PDPal.h
 Title        : PDPAbstraction Layer
 Author       : Paul Buxton
 Created      : 30 October 2002

 Copyright    : 2002 by Imaginationc Technologies Limited. All rights reserved.
              : No part of this software, either material or conceptual 
              : may be copied or distributed, transmitted, transcribed,
              : stored in a retrieval system or translated into any 
              : human or computer language in any form by any means,
              : electronic, mechanical, manual or other-wise, or 
              : disclosed to third parties without the express written
              : permission of Imagination Technologies Limited, Unit 8, HomePark
              : Industrial Estate, King's Langley, Hertfordshire,
              : WD4 8LZ, U.K.

 Description  : PDP Abstraction Layer Header file

 Platform     : WinCE
 Version	  : $Revision: 1.10 $
 Modifications	: 
 $Log: pdpal.h $

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 
 **************************************************************************/

#ifndef _PDPAL_
#define _PDPAL_

#ifdef __cplusplus
extern "C" 
{
#endif
	#include "img_defs.h"
	#include "services.h"
	#include "pvrdispconfig.h"
#ifdef __cplusplus
}
#endif

/* *************************** Type Definitions ***************************/
typedef		enum	_PDP_DEINTERLACE_
{
	PDP_WEAVE=0x0,
	PDP_BOB_ODD,
	PDP_BOB_EVEN,
	PDP_BOB_EVEN_NONINTERLEAVED
} PDP_DEINTERLACE,*PPDP_DEINTERLACE;


typedef		enum	_PDP_ERRORCODES_
{
	PDP_ERROR_OK=0x0,
	PDP_ERROR_UNSUPPORTED,
	PDP_ERROR_INVALID_PARAMS,
	PDP_ERROR_GENERIC,
	PDP_ERROR_INVALID_PIXFMT,
	PDP_ERROR_INVBLANK
}PDP_ERRORCODE;

typedef     enum   _PDP_OVLFORMAT_
{
	PDP_OVL_INVALID = 0x0,
	PDP_OVL_YUY2,
	PDP_OVL_YV12,
	PDP_OVL_IMC2,
	PDP_OVL_UYVY,
	PDP_OVL_YVYU,
	PDP_OVL_VYUY
}PDP_OVLFORMAT;

typedef     enum   _PDP_OVLUPDATEFIELDS_
{
	PDP_OVL_DSTPOS 	= 	0x001,
	PDP_OVL_SRCPOS	=	0x002,
	PDP_OVL_ADDRESS	=	0x004,
	PDP_OVL_FORMAT	=	0x008,
	PDP_OVL_CKEY	=	0x010,
	PDP_OVL_WHS		=	0x020,
	PDP_OVL_DEINTERLACE=0x040,
	PDP_OVL_VISIBLITY = 0x080
}PDP_OVLUPDATEFIELDS;

typedef     enum   _PDP_WAITVBLANK_
{
	PDPWAITVB_I_TESTVB = 0x0,
	PDPWAITVB_BLOCKBEGIN,
	PDPWAITVB_BLOCKEND,
}PDP_WAITVBLANK;


#define PDP_OVL_MAXHEIGHT	2048
#define PDP_OVL_MAXWIDTH	2048


#define GRAPHICS_STREAM	0
#define OVL_STREAM		1
#define CURSOR_STREAM	2

#define NUM_OVERLAY_CONFIG_BUFFERS 4


typedef struct _PDP_ENUMTABLEENTRY
{
	WORD	wXRes;		// The Width of the display in pixels
	WORD	wYRes;		// The Height of the display in lines
	BYTE	byBPP;		// The number of bits per pixel
	WORD	wStride;	// Stride of the display in pixels
	WORD	wRefresh;	// Refresh rate in Hz
}PDP_EnumTableEntry, *PPDP_EnumTableEntry;


// passed to the EnumberateModes function to be filled in
typedef struct _PDP_ENUMERATEMODESList
{
	WORD 				wCount;		// Number of entries in the table
	PPDP_EnumTableEntry	psModeList;
}PDP_EnumerateModesList, *PPDP_EnumerateModesList;



typedef struct _PDP_Tag_CSCCoeffs
{
	WORD	wRyCoeff;
	WORD	wRuCoeff;
	WORD	wRvCoeff;
	WORD	wGyCoeff;
	WORD	wGuCoeff;
	WORD	wGvCoeff;
	WORD	wByCoeff;
	WORD	wBuCoeff;
	WORD	wBvCoeff;

}PDP_CSCCoeffs, *PPDP_CSCCoeffs;



typedef struct _PDP_RELATIVETIMES_
{
		WORD	HBPS;
		WORD	HT;
		WORD	HAS;
		WORD	HLBS;
		WORD	HFPS;
		WORD	HRBS;
		WORD	VBPS;
		WORD	VT;
		WORD	VAS;
		WORD	VTBS;
		WORD	VFPS;
		WORD	VBBS;

}PDP_RELATIVETIMES,*PPDP_RELATIVETIMES;


typedef		enum	_PDP_DISPLAYUPDATE_
{
	PDP_FULL_REFRESH=0x0,				// Output data at the full display rate for the display
	PDP_REDUCED_REFRESH,				// Output Data at a reduced rate
	PDP_SINGLE_REFRESH					// Output data only when the display has changed...
}PDP_DISPLAY_UPDATE,*PPDP_DISPLAY_UPDATE;


typedef struct _PDP_CURSOR_PROPERTIES
{
	WORD		wCursor_Attribs;
	PVOID		pvCursorAddress;
	PVOID  		Surface;			/* SURFOBJ *  */
  	PVOID  		AndXorMask;			/* SURFOBJ *  */
  	PVOID  		Colors;				/* SURFOBJ *  */
  	PVOID 		ColorsXlate;		/* XLATEOBJ *  */

}PDP_CURSOR_PROPERTIES,*PPDP_CURSOR_PROPERTIES;

typedef struct _PDP_CURSOR_SHAPEINFO
{
	BOOL		Colors;
	WORD		wCursor_Attribs;
	ULONG		Width;
	ULONG		Height;
	LONG		StrideBytes;
	PVOID		pvScan0;
}PDP_CURSOR_SHAPEINFO, *PPDP_CURSOR_SHAPEINFO; 

typedef WORD	PDP_ERROR;

// Bit one for cursor enable
#define PDP_CURSOR_ENABLE 0x01

typedef struct _PDP_SETMODESTRUCT_
{
	WORD	wDisplayX;					// Size of physical display in pixels
	WORD	wDisplayY;					// Size of physical display in pixels
	WORD	wBitsPerPixel;				// Bitdepth
	WORD	wStride;					// stride of framebuffer
	PVRSRV_MEM_INFO *psMemInfo;			// address of framebuffer
}PDP_SETMODE ,*PPDP_SETMODE;

typedef struct _PDP_PALETTESTRUCT_
{
	BYTE	byRed;					    // Red Color Value
	BYTE	byGreen;					// Green
	BYTE	byBlue;						// Blue
	BYTE	byFlags;					// Flags
}PDP_PALETTE,*PPDP_PALETTE;

typedef DWORD  PDP_CONTRAST,*PPDP_CONTRAST;		
typedef DWORD  PDP_BRIGHTNESS,*PPDP_BRIGHTNESS;
typedef DWORD  PDP_GAMMA,*PPDP_GAMMA;


typedef struct _PPDP_CURSORPOS_
{
	int 	nXpos;						// XPosition of Cursor
	int 	nYpos;						// YPosition of Cursor
}PDP_CURSORPOS,*PPDP_CURSORPOS;

// Overlay related structures
typedef struct _PDP_OVERLAYSTRUCT_
{
	PVOID			pvOvlBase;			// Base address of overlay in RGB mode, and address of Y plane in planar modes
	PVOID			pvOvlUBase;
	PVOID			pvOvlVBase;

	WORD			wWidth;				// Width of overlay data in pixels
	WORD			wHeight;			// Height of overlay data in lines
	WORD			wStride;			// Stride of overlay in pixels
	PDP_DEINTERLACE DeInterlace;		// Can be either WEAVE, BOB_ODDD or BOB_EVEN

}PDP_OVERLAY,*PPDP_OVERLAY;

typedef struct _PDP_PREPARE_FLIP_
{
	PDP_OVERLAY*		psOverlay;
	IMG_UINT32*		pui32OverlayConfig;     /* Pointer to buffer containing overlay register configuration data.
	                                           Format is: register ADDRESS followed by DATA to be written. */

	IMG_UINT32		ui32OverlayConfigSize;  /* Size of the overlay configuration (number of DWORDS). */


} PDP_PREPARE_FLIP, *PPDP_PREPARE_FLIP;

typedef struct _PDPOVERLAYATTRIBS_
{
	WORD			wValidFlags;				// Flags to say which members of this structure are valid
	int 			nTop;						// Signed position of top of overlay (overlay starts on this line)
	int 			nLeft;						// Signed position of left of overlay (overlay starts on this column)
	int 			nBottom;					// Signed position of bottom of overlay	(line above this one is last line of overlay)
	int 			nRight;						// Signed position of right overlay  (pixel before this one is last line of overlay)

	WORD			wSrcX1;						// SrcX1 position of overlay data within buffer
	WORD			wSrcY1;						// SrcY1 position of overlay data within buffer
	WORD			wSrcX2;						// SrcX2 position of overlay data within buffer
	WORD			wSrcY2;						// SrcY2 position of overlay data within buffer

	BOOL			bCKeyOn;					// Turn on/off colorkey;
	DWORD			dwCKeyValue;				// ColorKey value

	BOOL			bOverlayOn;					// Turn the overlay on/off
	PDP_OVLFORMAT	PixFormat;					// Pixel Format Can be YUY2, YV12, IMC2 or INVALID

}PDP_OVERLAYATTRIBS,*PPDP_OVERLAYATTRIBS;

typedef struct _PDP_ACTIVERECT_
{
	WORD wLeft;
	WORD wRight;
	WORD wTop;
	WORD wBottom;
}PDP_ACTIVERECT, *PPDP_ACTIVERECT;


typedef struct _PDPTEMPCURSOR_
{
	int			nWidth;
	int			nHeight;
	int			nStride;
	BOOL		bIsColor;
	DWORD		adwBuffer[64][64];
}PDP_TEMPCURSOR,*PPDP_TEMPCURSOR;


#define PDP_OVERLAYATTRIB_VALID_DSTPOSITION		0x0001
#define PDP_OVERLAYATTRIB_VALID_SRCPOSITION		0x0002
#define PDP_OVERLAYATTRIB_VALID_CKEY			0x0004
#define PDP_OVERLAYATTRIB_VALID_PIXFMT			0x0008
#define PDP_OVERLAYATTRIB_VALID_VISIBILITY		0x0010
#define PDP_OVERLAYATTRIB_VALID_VERIFY			0x8000   // Can we create an overlay?

#define	PDP_DUMP_PRIMARY		0x01
#define	PDP_TIMING				0x02
#define	PDP_VIDEO				0x04
#define PDP_CURSOR				0x08
#define PDP_COLOR				0x10


//Bit fields in the Panel and PanelExt registry values
#define PDP_REGISTRY_PANEL_LCDPORT  0x80000000
#define PDP_REGISTRY_PANEL_PWMPORT  0x40000000
#define PDP_REGISTRY_PANEL_OVERRIDE 0x0000FFFF
#define PDP_REGISTRY_PANEL_INX_MASK 0x0000FFFF

typedef PVOID PDPHANDLE;

/******************************** Stub Functions ***************************/

#ifdef __cplusplus
extern "C" 
{
#endif

	PDP_ERROR PDP_SetMode (PDPHANDLE pHandle,PPDP_SETMODE psModeStruct, BOOL bGet);
	PDP_ERROR PDP_Palette(PDPHANDLE pHandle,PPDP_PALETTE psPalette,WORD Start,WORD Count, BOOL bGet);
	PDP_ERROR PDP_CursorPos(PDPHANDLE pHandle,PPDP_CURSORPOS psCursorPos, BOOL bGet);
	PDP_ERROR PDP_CursorProperties(PDPHANDLE pHandle,PPDP_CURSOR_PROPERTIES pCursorProperties, BOOL bGet);
	PDP_ERROR PDP_Init(PDPHANDLE pHandle);

	// Display Adjustment
	PDP_ERROR PDP_Contrast(PDPHANDLE pHandle,PPDP_CONTRAST pContrast, BOOL bGet);
	PDP_ERROR PDP_Gamma(PDPHANDLE pHandle,PPDP_GAMMA pGamma, BOOL bGet);
	PDP_ERROR PDP_Brightness(PDPHANDLE pHandle,PPDP_BRIGHTNESS pBrightness, BOOL bGet);


⌨️ 快捷键说明

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