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

📄 tmcrt.h

📁 wince host 和 target PCI驱动程序
💻 H
字号:
/*
	Copyright (c) 1997 Philips Semiconductors. All rights reserved.
	TriMedia Product Group



	Requires host_comm.lib & TMMan32.dll services


	971022	Tilakraj Roy
			Created.
		
*/

#ifndef	_tmcrt_h_
#define	_tmcrt_h_

#include "tmtypes.h"

#ifdef __cplusplus
extern "C" {
#endif


/*	
	Ignore all fields of the CRunTimeParameterBlock 
*/
#define constCRunTimeFlagsIgnoreParams		0x0001

/* 
	Create a new console - this has to be used by 
	Windows GUI apps only 
*/
#define constCRunTimeFlagsAllocConsole		0x0002

/* 
	stdXXX should be ignored - no console windows 
	will popup 
*/
#define constCRunTimeFlagsNoConsole			0x0004

/* 
	interpret the WindowSize field of the 
	CRunTimeParameterBlock structure  
*/
#define constCRunTimeFlagsUseWindowSize		0x0008

/* 
	Signal the Event whose handle is in 
	SynchronizationObject - when target completes 
	execution 
*/
#define constCRunTimeFlagsUseSynchObject	0x0010

/*
	TMCRT prints some status messages to stdout , this
	flag disables write to stdout and reads from stdin.
	So stdin / stdout  /stderr accesses are performed 
	only when requested by the target application.
*/
#define constCRunTimeFlagsNonInteractive	0x0020

/*
*/

typedef struct tagCRunTimeParameterBlock 
{ 
	/*
		Options Flags as defined above  
	*/
	UInt32	OptionBitmap;

	/*
		The following 3 field are handles to the standard i/o devices
		Not interpreted if constCRunTimeFlagsNoConsole is set.
		Has to be a valid Win32  handle, not a FILE* , not a 
		file handle returned by open()
	*/

	/*
		Handle to the standard input device
	*/
	UInt32	StdInHandle;

	/*
		Handle to the standard input device
	*/
	UInt32	StdOutHandle;

	/*
		Handle to the standard input device
	*/
	UInt32	StdErrHandle;

	/*
		Number of lines in the console window
		This parameter is interpreted only if 
		constCRunTimeFlagsUseWindowSize is set.
	*/
	UInt32	WindowSize;

	/*
		Number of threads that will be created to serve
		this node. This parameters is currently not used.
	*/
	UInt32	CRTThreadCount;

	/*
		Handle to the Win32 Event that will be signalled
		when the target exits notmally. This parameter
		is interpreted only if constCRunTimeFlagsUseSynchObject
		is set.
	*/
	UInt32	SynchronizationObject;

	/*
		For the first call to cruntimeCreate in a process context
		this parameter should be 0. And for each subsequent call
		this parameter should be incremented.
	*/
	UInt32	VirtualNodeNumber;

} CRunTimeParameterBlock;

/*
cruntimeCreate

	Allocates resources for the specific TriMedia processor. 
	This function has to be called once for every TriMeddia
	processor that TMCRT needs to serve.


Parameters
	DSPNumber
		DSP Number that this server needs to serve. This should 
		be the same value that is passed to tmmanDSPOpen().

	ArgumentCount
		This should include that target image name.

	ArgumentVector[]
		Pointer to an array of pointers pointing to arguments.
		The first argument has to be the name of the target 
		executable.
	Parameters
		Pointer to a CRunTimeParameterBlock  structure defining
		how the server should bahave.

	CRTHandlePointer
		Address of the memory location where the handle to this 
		instance of the server will be stored.

Returns
	True
		If the function succeeds
	Flase
		If the functions fails which may be due to the following
		reasons.
		Server if already running for this node.
		Node could not be opened. 
		If the Win32 event creation failed.
*/
UInt32	cruntimeCreate( 
	UInt32	DSPNumber,
	UInt32	ArgumentCount,
	UInt8*	ArgumentVector[],
	CRunTimeParameterBlock* Parameters,
	UInt32* CRTHandlePointer );

/*
cruntimeDestroy

	Closes the server instance for this instance of the TriMedia processor.

Parmeters
	
	CRTHandle
		Handle to the C Run Time server instance that has to be closed.

	ExitCodePointer
		Address of the memory lcoation where the exit code for this node
		will be stored. The exit code is valid only if the target has 
		exited notmally. Otherwise the target execution has benn terminated 
		abnormally and the exit code is invalid.

Returns
	True
		Target has exited normally.
	Flase
		Target execution has been stopped. Abnormal Termination.
		Exit Code is invalid.



*/
Bool	cruntimeDestroy ( 
	UInt32	CRTHandle,
	UInt32	*ExitCodePointer );

/*
cruntimeInit

	Initializes the C Run Time server to serve multiple nodes.

Parameters
	None

Returns
	True 
		Succeess
	Flase
		Thread creation failed.

*/
Bool	cruntimeInit ( void );

/*
cruntimeExit

	Teriminates all the C Run Timer Server threads.

Parameters

Returns
	Node

*/
void cruntimeExit ( void );

#ifdef __cplusplus
};
#endif	/* __cplusplus */

#endif

⌨️ 快捷键说明

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