I am reading <tms320 dsp algorithm standard api reference>,but find file idma2.h is not integral. I can not find where idma2_obj define.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am reading <tms320 dsp algorithm standard api reference>,but find file idma2.h is not integral. I can not find where idma2_obj define.
The spec defines a logical DMA channel handle, IDMA2_Handle simply as a typedef - as a pointer to a structure of type "struct IDMA2_Obj", as excerped here:
/*
* ======== IDMA2_Handle ========
* Handle to "logical" DMA channel.
*/
typedef struct IDMA2_Obj *IDMA2_Handle;
XDAIS spec chooses to keep the definition of the "struct IDMA2_Obj" unpublished, so there is no standard defined implementation constraints on what needs to be in the structure representing the Handle object. This is a legal C definition, even though it appears be missing a definition, as long as you don't try to de-reference the Handle, and only then you would need to have the IDM2_Obj structure definition. Algorithms should not need to know the internal representation of the handle object, as this is an opaque structure by IDMA2 interface definition. The handle needs to be simply treated as a pointer (to an unknown struct) as there is nothing to see inside the handle for the holders of the handle.
Note that, any resource manager that is actually allocating/deallocating & managing IDMA2 channels will define this structure, allocate memory for it and use it in an implementation dependent manner, it is simply hidden from the public interface, which should be fine, since the actual contents of the handle structure is a private implementation detail that algorithms should not be interested in.
Murat