You are here

PSoC Creator 3.3 Macro Callbacks, How to take advange of them? | Cypress Semiconductor

PSoC Creator 3.3 Macro Callbacks, How to take advange of them?

Summary: 7 Replies, Latest post by Bob Marlowe on 06 Oct 2016 12:16 AM PDT
Verified Answers: 1
Last post
Log in to post new comments.
user_365962704's picture
144 posts

I´m checking what's new on Creator 3.3, the New Project Wizard is good, Resource-Meter is really nice (to me), but what i can't quite understand is the Macro Callbacks usage.

I got an interrupt component attached to an Digital Input Pin (assigned to the SW1 of the 5LP Proto Kit). With Creator 3.2 i just write this on the main.c file:


and then write my custom code on the merge region on the isr.c file (i can do this on Creator 3.3 aswell) but i was looking to know how to take advantage of this "feature". Now to have the same results using Macro Callbacks i need to make this on the cyapicallbacks.h:


void isr_Interrupt_InterruptCallback(void); /* Function declaration as Creator Help says*/

and then need to include cyapicallbacks.h on the main.c file, plus the implementation code of the function:

void isr_Interrupt_InterruptCallback(void){

I'm using this right? What other advantages can we have with this feature?

Thanks in advance




user_14586677's picture
7646 posts

There is a brief description in the system reference guide, also in component author guide,

Creator, help menu to access both.


Regards, Dana.

JJHawg's picture
19 posts

Thanks for the info.

I can see how the location of the callback would be fixed in component API code that *I* create, however, if I add a callback to a Cypress component, for instance, will subsequent builds leave it alone, or do I need to hide it in a "Merge Region?"

- Jim


user_365962704's picture
144 posts

Did a easy program and the code on the callback function is kept after newer builds, "merge region" is there just for backward compatibility.

user_274749305's picture
76 posts

I looked at it. IMHO it won't help much until cypress starts adding the hooks to the component library. But will their idea of where to add match my/our desires.


It will make it a little easier to take a library component, copy it, mod it for MY wanted hooks, then use it. It will make it easier to port to new releases.


It is more of a standard coding practice than a 'feature' like the parsing engine of regions.


All my opinion,




user_365962704's picture
144 posts

@danaaknight thanks for the help, i didn't see that documents before , just the Creator Help.

@psoc-ed i think i see the purpose now,  thanks for the opinion.

jyothi_1762361's picture
4 posts


same thing which carlos mentioned, i used the same thing in my code can i implemnt those macros for my other functions also in creator 3.3.

what my question is i want to add different files for different task like for reading and computing tempereature and then displaying . i am not getting how to include those different files in main.c and how to call those functions in main.c its completely like archieving and tio bring my code to standard one plz anybody help me


user_1377889's picture
9279 posts

different files for different task  This is usually solved using a .h file (only Declarations, no variables except externals) and the corresponding .c file. The .h file is #included into main.c (and of course in the corresponding .c)



Log in to post new comments.