Other Parts Discussed in Thread: CONTROLSUITE
Hi
I want to ask few question for my understanding i hope some one can answer in some files such as svgen_dq.h for motor control application
1) why argument to function (of function pointer calc) field is left empty(if left empty function expects an integer while later we pass pointer to structure as argument to this function)
void (*calc)(); // Pointer to calculation function , declared as member of SVGENDQ structure
2) Why a pointer SVGENDQ_handle to structure is declared which is never used while its declared as
typedef SVGENDQ *SVGENDQ_handle
3) Pointer to function which is a member of strucutre SVGENDQ is initialized here as (void (*)(Uint32))svgendq_calc i dont understand this syntax please help, i thought only svgnedq_cal as name of function was enough.
#define SVGENDQ_DEFAULTS { 0,0,0,0,0,0,0,0,0,0,15,{1,5,4,6,2,3}, \
(void (*)(Uint32))svgendq_calc }
4)Document svgen_dq.pdf in \DMC\c28\v32x\lib\doc on page 3 shows that svgendq_calc receives a pointer to structure so in my understanding its prototype may be like
void svgendq_calc(SVGENDQ *); but it is void svgendq_calc(SVGENDQ_handle);
Regards
Shakeel