7 Replies Latest reply on Oct 6, 2016 12:16 AM by user_1377889

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

    user_365962704

      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:

         

      isr_Start();

         

      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:

         

      #define isr_INTERRUPT_INTERRUPT_CALLBACK

         

      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){
          SW_ClearInterrupt();
          LED_Write(~LED_Read());    
      }

         

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

         

      Thanks in advance

         

      Carlos