I want to define a macro callback in a UART component by following the guide provided by Cypress. In the guide, it says that I have to define a macro in the file called "cyapicallbacks.h". However, the compiler isn't recognizing the defined the macro despite me putting the code in there. Then I realized that the project doesn't have #include "cyapicallbacks.h" written in any file anywhere. Is there a setting in the project that makes it so that somewhere in the generated code the cyapicallbacks.h file is included?
Solved! Go to Solution.
This solution worked for me (using PSoC Creator 3.3)
Create a cyapicallbacks.h file, add it to your project under "Header Files" section. Below is the contents of a default one (can't attach a .h file).
Delete your generated source folder (good idea to back it up first in case something goes wrong) and rebuild the project
. If you have a look at one of the generated source .c files, it should have an extra line:
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
/*Define your macro callbacks here */
/*For more information, refer to the Macro Callbacks topic in the PSoC Creator Help.*/
#endif /* CYAPICALLBACKS_H */
/*  */
I hope this helps.
cyapicallbacks.h must be present in the .cydsn directory per http://www.cypress.com/forum/psoc-4-architecture/cmostartc-no-return-exception-handler-callback?sour...
THEN, delete generated files and rebuild.