At first: Never ever use a delay within an interrupt handler, this may stall the complete system.
I did not hear of a SetHandler() function, but for an interrupt component there is a isr_StartEx() API
You are setting and resetting the flag, nobody will see that.
You need an infinite loop in your main() or the program will halt or be re-initialized.
All global variables changed in an interrupt handler should be declared with "volatile" to prevent them from getting optimized out of a loop.
How flag set & how main function call handler?
An interrupt is something asynchronous and is usually not "called" i.e. from main(). Instead an interrupt gets fired by an external event (a signal changing, a character received or a button pushed)
Attached: A script about interrupts
Art of Programmingx.pdf 56.4 K
Some more ref material -
http://www.cypress.com/documentation/application-notes/an54460-psoc-3-and-psoc-5lp-interrupts AN54460 - PSoC® 3, PSoC 4, and PSoC 5LP Interrupts
http://www.cypress.com/?rID=95069 AN90799 - PSoC® 4 Interrupts