Hello,
Whenever I #include "ehrpwm.h" in my project, I receive at compile time the above mentioned error, that's because of a "typedef char bool;" present in the header file which conflicts with C library types. I removed it from the header, but I needed to add this line in the drivers_c674x_c6748\ehrpwm.c, ehrpwm_c674x_c6748_evmC6748\ehrpwmWaveForm.c so that the library still compiles.
Is it the same in 1.20.03.03? Can someone fixit in a newer revision or it's my code that conflicts with that header?
Thank you in advance,
David.
David,
This file is the same in the new 1.20.03.03 release.
I'm not sure that I understand the problem. Are you using this header file with some other (non-StarterWare) header files that has an alternate definition of "bool"? If so, one workaround could be to simply replace "bool" in the files include/ehrpwm.h and drivers/ehrpwm.c with "char" and remove the typedef from include/ehrpwm.h. You could also modify the other (non-StarterWare) header file to avoid the issue by removing the conflicting definition of "bool".
Hope this helps. Please let me know if I didn't answer your question.
Please click the Verify Answer button on this post if it answers your question.
Hi Joe,
I believe it conflicts with C stdint.h and predefined types. That isolated definition shouldn't be there, I solved it like you said, but for StarterWare library don't think it belongs there, it's bad header design.
Best regards,