2 Replies Latest reply on Jan 11, 2016 4:31 AM by adpac_1560036

    Including Header files




      Each time when I build a project, the header files I've included into interrupt service routine files are getting deleted.


      Its becoming a recurring task to again type the #include directive at all the isr.c files for the every time I build.


      Same problem is encounterd when the design is modified even without touching the isr component.


      Solution for this?

        • 1. Re: Including Header files

          There are special areas within the generated files that allow for code insertion by you. These areas are clearly marked.


          Generally I would suggest to avoid making changes in those files. There are two different ways to circumvent this:


          Use _StartEx() APIs of the component to announce your own interrupt handlers, might be in main(). Use CY_ISR and CY_ISR_PROTO as documented in System Reference Guide (from Help-menu of Creator)


          Latest Creator version introduces "Callback Macros". A file named cyapicallbacks.h is generated with a new project. Here you specify from which API you want to have a callback and you provide a function with a given name to be called back. See Creator Help for "Callback macros)





          • 2. Re: Including Header files

            Oh yes..got it. Thanks a lot Bob.