You are here

Including Header files | Cypress Semiconductor

Including Header files

Summary: 2 Replies, Latest post by Aditya Panchangam on 11 Jan 2016 04:31 AM PST
Verified Answers: 1
Last post
Log in to post new comments.
adityapanchangam_1560036's picture
User
50 posts

Hi,

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?

user_1377889's picture
User
10803 posts

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)

 

Bob

adityapanchangam_1560036's picture
User
50 posts

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

Aditya

Log in to post new comments.