📄 tmman32.h
字号:
PTMMAN_TMCONS_PARAMS pTMConsParams );
/*
tmDSPExecutableStop
Parameters
dwHandle
Handle to the DSP returned by tmDSPOpen.
Comments
Stops program execution on the TriMedia processor. Puts the
TriMedia processor in the reset state. Resets all the peripheral
devices on TriMedia.
*/
STATUS tmDSPExecutableStop ( DWORD dwDSPHandle );
/*
tmDSPReset
Parameters
dwHandle
Handle to the DSP returned by tmDSPOpen.
Comments
Performs a hardware reset of the TM Processor.
This puts TM1 in a cold boot state.
*/
STATUS tmDSPReset ( DWORD dwDSPHandle );
/*
tmDSPClose
Parameters
dwDSPHandle
Handle to the DSP board returned by tmDSPOpen.
Comments
This call closes the handle to the DSP. After this call, the handle
to the DSP is invalid and should not be used.
*/
STATUS tmDSPClose ( DWORD dwDSPHandle );
/*
tmDSPGetStatus
Parameters
dwDSPHandle
Handle to the DSP returned by tmDSPOpen.
pdwFlags
Pointer to memory location where the information is to be copied.
Flags are used to indicate the following :
TMMAN_DSPSTATUS_EXECUTABLE_RUNNING
TriMedia Processor is running code.
TMMAN_DSPSTATUS_EXECUTABLE_STOPPED
TriMedia program code execution has been stopped.
TriMedia is in reset state.
Comments
Retrieves status information for the given DSP board.
*/
STATUS tmDSPGetStatus ( DWORD dwDSPHandle, PDWORD pdwFlags );
/*
tmDSPGetMiscInfo
Comments
This function is for internal use of tmman components.
This should not be called by applications.
*/
STATUS tmDSPGetMiscInfo ( DWORD dwDSPHandle, PTMMAN_DSP_INFO pDSPInfo );
/*
tmTaskCreate
Parameters
dwDSPHandle
Handle to the DSP returned by tmDSPOpen.
pTaskAttribute
This object is used to pass and retrieve parameters required
to open the task. The validity of the parameters that are
returned by the interface are determined by the return
code of this call.
pdwHandle
Handle to the newly created task. The validity of this parameter
is dictated by the return status code of this call. i.e.
the task handle is valid if this call succeeds.
Comments
This function creates a task on the TriMedia processor. This function
requires a RTOS to be running on the TriMedia processor. The task
is created but execution does not start until the tmTaskStart function
is called.
*/
STATUS tmTaskCreate ( DWORD dwDSPHandle, PTMMAN_TASK_CREATE pTaskAttrib,
PDWORD pdwHandle );
/*
tmTaskStart
Parameters
dwTaskHandle
Handle to the task returned by tmTaskCreate.
Comments
This function starts the task execution. The RTOS on TriMedia creates
the Task Control Block and starts the execution.
*/
STATUS tmTaskStart ( DWORD dwTaskHandle );
/*
tmTaskStop
Parameters
dwTaskHandle
Handle to the task returned by tmTaskCreate.
Comments
This function suspends the execution of a certain task on the
TriMedia processor. Note that the Task Control Block is not destroyed.
*/
STATUS tmTaskStop ( DWORD dwTaskHandle );
/*
tmTaskDestroy
Parameters
dwTaskHandle
Handle to the task returned by tmTaskCreate.
Comments
Removes the task from the RTOS Task Control Block and free all
the resources allocated to the task.
*/
STATUS tmTaskDestroy ( DWORD dwTaskHandle );
/*
tmMsgCreate
Parameters
dwDSPHandle
Handle to the DSP returned by tmDSPOpen.
pMessageAttrib
Pointer to the structure describing the attributes for
creating the message queue.
dwMsgHandle
Address of the buffer where the handle to the newly
created message queue will be stored.
Comments
Creates a message queue between the host and the target.
The target application has to create a similar queue on
the TriMedia processor for communication to take place.
The target should not try to send messages to this queue
until the host side completes this function successfully.
*/
STATUS tmMsgCreate ( DWORD dwDSPHandle, PTMMAN_MESSAGE_DESC pMessageAttrib,
PDWORD pdwMessageHandle );
/*
tmMsgDestroy
Parameters
dwMsgHandle
Handle to the message queue returned by tmMsgCreate.
Comments
Destroys the message channel created by tmMsgCreate. After
this call the message channel no longer exists and no more
notifications will arrive on this message queue.
*/
STATUS tmMsgDestroy ( DWORD dwDSPHandle );
/*
tmMsgSend
Parameters
dwMsgHandle
Handle to the message queue returned by tmMsgCreate.
pPacket
Pointer to the message packet buffer.
Comments
This function sends the given packet to the corresponding message queue
on the target. The target will receive a notification when this packet
is delivered to the target. If the target side fails to retrieve packets
from the queue as fast as the host sends them, the queue will overflow
and packets will be dropped. In reality this rarely happens due to the
fact the host processor is always more heavily loaded than the target.
*/
STATUS tmMsgSend ( DWORD dwDSPHandle, PTMSTD_PACKET pPacket );
/*
tmShmemAllocate
Parameters
dwDSPHandle
Handle to the DSP returned by tmDSPOpen.
dwFlags
Flags that specify the attributes of the allocated memory.
Currently this is specified as 0.
dwLength
Length of the memory to be allocated in bytes.
ppLinear
Address of the buffer where the linear address of the
allocated memory will be stored by this function.
pdwPhysical
Address of the buffer where the physical address of the
allocated memory will be stored by this function.
Comments
This function allocates memory from the page locked pool
on the host. The memory allocated via this function is
guaranteed to be contiguous and page locked at all times.
The target can access this memory block using the physical
address returned by this function. The memory allocated via
this function is a limited resource and should be used very
sparingly.
*/
STATUS tmShmemAllocate ( DWORD dwDSPHandle, DWORD Flags, DWORD Length,
PVOID *ppLinear, PDWORD pPhysical );
/*
tmShmemFree
Parameters
dwDSPHandle
Handle to the DSP returned by tmDSPOpen.
pLinear
Linear address of the memory block returned by tmShmemAllocate.
Comments
This function frees the memory block allocated by tmShmemAllocate.
*/
STATUS tmShmemFree ( DWORD dwDSPHandle, PVOID pLinear );
/*
tmParameterDWORDGet
Parameters
DSPHandle
Handle to the DSP returned by tmDSPOpen.
ID
ID of the slot where the parameter will be retrieved from.
IDs below 0x10 are reserved for TMMan抯 internal use. User
programs should use ID greater than 0x10.
pValue
Address of the memory location where the retrieved value
will be stored.
Comments
This function is used by the host to retrieve parameters that
are set by the target. Before this function is called the target
should have set the parameter via tmParameterDWORDSet using the
same ID that is used in this call.
*/
STATUS tmParameterDWORDGet ( DWORD DSPHandle, DWORD ID, PDWORD pValue );
/*
tmParameterDWORDSet
Parameters
DSPHandle
Handle to the DSP returned by tmDSPOpen.
ID
ID of the slot where the parameter will be written into.
IDs below 0x10 are reserved for TMMan抯 internal use. User
programs should use ID greater than 0x10.
Value
The value that has to be written to that slot.
Comments
This function is used to set a parameter that can be retrieved
by the target. To retrieve the parameter, the target side will
have to call tmParameterDWORDGet using the same ID that is used
in this call.
*/
STATUS tmParameterDWORDSet ( DWORD DSPHandle, DWORD ID, DWORD Value );
/*
tmBufferPrepare
Parameters
dwDSPHandle
Handle to the DSP returned by tmDSPOpen.
pvBufferAddr
Address of the buffer where the linear address of page locked
buffer will be stored by this function
dwBufferSize
Size of the buffer to be page locked.
pdwPhysicalAddress
Address of the buffer where the physical address of the page
frame table header will be stored by this function. This
parameter should not used by the host, it is passed to the
target to access the page locked buffer.
pdwBufferHandle
Handle to the prepared buffer.
Comments
Page locks the specified buffer and generates a page table entry
list that can be used by the DSP to perform bus master DMA
transfers between host memory and DSP SDRAM. Note that
pdwPhysical address should not be used on the host. It should
only be used on the target.
*/
STATUS tmBufferPrepare ( DWORD DSPHandle, PVOID pvBufferAddr,
DWORD dwBufferSize, PDWORD pdwPhysicalAddress, PDWORD pdwHandle );
/*
tmBufferUnprepare
Parameters
dwBufferHandle
Handle to the buffer returned by tmBufferPrepare.
Comments
Undoes the page locking for the given buffer handle. Once the
buffer has been unprepared it cannot be used for transferring
data to or from the target.
*/
STATUS tmBufferUnprepare ( DWORD dwBufferHandle );
STATUS tmDSPSetMiscInfo ( DWORD DSPHandle, PTMMAN_DSP_INFO pDSPInfo );
PCHAR tmGetErrorString ( DWORD Code );
BOOL tmGetImageInfo (
CHAR* ImagePath,
DWORD* TypePtr,
DWORD* EndianPtr );
BOOL tmGetTCSPath (
CHAR* TCSPathBuffer,
DWORD TCSPathBufferLength );
#ifdef __cplusplus
};
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -