In my project, I integrate and call some common functions provided by T.I. with the DSP2833x_header_files (T.I. document and source code: sprc530).
Many of the .c source files provided under \DSP2833x_common\source\ which I use, contain the following include statements:
#include "DSP2833x_Device.h" // DSP2833x Headerfile Include File
#include "DSP2833x_Examples.h" // DSP2833x Examples Include File
This seems unconsistent to me, because "DSP2833x_Device.h" in turn includes many other .h files dedicated to various peripherals and found under ..\DSP2833x_headers\include\ (e.g. "DSP2833x_I2c.h"), while on the other hand "DSP2833x_Examples.h" imports similar files but with a slightly different name and found under ..\DSP2833x_common\include\ (e.g. "DSP2833x_I2C_defines.h")
The contents of the files "DSP2833x_YYYY.h" and "DSP2833x_YYYY_defines.h" are very similar, but not exactly the same.
Including both files produces redeclaration errors when compiling (e.g. the type definition of the I2CMSG structure is contained in both "DSP2833x_I2c.h" and "DSP2833x_I2C_defines.h").
Also, such important #defines as CPU_FRQ_150MHZ are duplicated in "DSP2833x_Device.h" and in "DSP2833x_Examples.h" and there is a real risk to have conflicting settings in the two files.
Probably the simplest solution would be not to include "DSP2833x_Examples.h" at all and let "DSP2833x_Device.h" do the job.
But that would mean having to edit the DSP2833x_header_files (sprc530) which is probably not a good idea either.
Does anyone have a better idea? Thanks a lot.