Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE, TIDM-1000, SFRA
Hi Champ,
I am asking for my customer.
They used the DCL library for controller.
They would like to add a new member (float32_t xxx) in DCL_PI controller structure in DCLF32.h file.
typedef struct dcl_pi {
float32_t Kp; //!< Proportional gain
......
float32_t integral; //!< Member added by user
} DCL_PI;
However, it compiles with error #137 struct "<unnamed>" has no field "xxx" if initiates value in the .h file.
In .h file., it defines and declares as below.
#define VIENNA_GV DCL_PI
extern VIENNA_GV VIENNA_gv;

In .c file, it's fine.

How to make it work in .h file ? Would the compiler expert kindly explain why it won't work in such way in .h file and please provide workaround?
Thanks for the support.
Regards,
Johnny