- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
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?
Thanks,
Alex
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn't find such a place. I suggest you to create a support case, so that Cypress gets informed and can fix it.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn't find such a place. I suggest you to create a support case, so that Cypress gets informed and can fix it.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Alex, did you ever figure this out?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
cyapicallbacks.h:
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#ifndef CYAPICALLBACKS_H
#define CYAPICALLBACKS_H
/*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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note:
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.