- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to have a file called interrupts.c and I want to just have my interrupt in it without any of the other generated code which PSoC creator makes whenever you drop an interrupt pin on the schematic.
Is this possible?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure. Use CY_ISR / CY_ISR_PROTO to define your interrupt function (in the .c / .h file). Having done that, start your component with *_StartEx(&function) to hand it your interrupt function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay so as I understand this,
create file called interrupts.c and do all the CY stuff etc, then in main start the interrupts off with startEx and then a link to the function in interrupts.c
What will happen with the autogeneration of files though, will they still get generated?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeah after trying what you said and deleting the generated files it just keeps regenerating them on rebuild and then complaining about multiple definitions of the same interrupt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Usually the files will be generated, but under normal conditions (default settings) the linker will optimize-out the unneeded functions, so there will be no double code.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have got it working, all I did was give my own interrupts unique names, so the ones in the generated files exist but instead of default name blah_Interrupt I just used something original.. eg *_StartEx(lovelyLadyLumps);
Thanks for the help guys!