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

📄 pvrsrvif.cpp

📁 Lido PXA270平台开发板的最新BSP,包括源代码
💻 CPP
字号:
/***************************************************************************
 * Name        : pvrsrvif.cpp
 * Title       : UM service interface
 * Author(s)   : Imagination Technologies
 * Created	   : 7th April 2003
 *
 * Copyright   : 2003 by Imagination Technologies. 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 : MBX WinCE driver GPE class.
 *
 * Platform    : WinCE
 *
 * Modifications:-
 * $Log: pvrsrvif.cpp $
 *
 *  --- Revision Logs Removed --- 
 *
 *  --- Revision Logs Removed --- 
 ****************************************************************************/

#include	"precomp.h"
#include	"pvrsrvif.h"

#ifdef PVR_CETESTKIT
PVRSrvIFace g_cTestKitInterface;

 
DWORD PVRSrvIFace::IFace_Init()
{
	// This has to get a psDevInfo and do some initialization.
	// What would be the best way to do that?
	PVRGetDeviceInfo (&m_sDevData, PVRSRV_DEFAULT_DEV_COOKIE);

 	m_pclDisplay = new GPEDisplayPipe;

/* is this correct ? */
	m_pclDisplay->PDP_Init(m_sDevData.psDevDataKM);
	return 0;
}

DWORD PVRSrvIFace::IFace_DeInit()
{
	m_pclDisplay->PDP_Deinit();
	PVRDestroyDeviceInfo (&m_sDevData);
	delete m_pclDisplay;
	return 0;
}

DWORD PVRSrvIFace::PVRAllocFBMem (IMG_UINT32 ui32Flags, IMG_UINT32 ui32Size, IMG_UINT32 ui32Alignment, ALLOC_DEVICEMEMOUT *psMemAlloc)
{

	return PVRAllocDeviceMem( &m_sDevData,ui32Flags,ui32Size,ui32Alignment,psMemAlloc);
}

DWORD PVRSrvIFace::PVRFreeFBMem(PMEM_INFO psMemInfo)
{
	return PVRFreeDeviceMem(&m_sDevData, psMemInfo);
}

#endif

DWORD APIENTRY GetIface(PVRSrvIFace **pcIface)
{
#ifdef PVR_CETESTKIT
	*pcIface=&g_cTestKitInterface;	
	return g_cTestKitInterface.IFace_Init();
#else
	return -1;
#endif
}

/********************************** end of file ******************************/

⌨️ 快捷键说明

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