From: 谢继雷 <xj...@99...> - 2010-08-11 02:05:53
|
On 2010-8-4 12:20, gazs wrote: > Hi Folks > > What is the correct way of Declare Prototypes of ISR ? > > Is it only in the file that contains main() > > or > > file that has main() and file that contain ISR routine it self > > or > > every file that is compiled and linked to for the runtime object ? > > > void Timer0_ISR(void) interrupt 1 using 2; > > void Timer0_ISR(void) interrupt 1 using 2 > { > ... > } > In my project, I'd implement ISR in library modules and include the header in the file contains main() function: main.c: #include <mylib.h> void main() { ... } mylib.h: void isr_xxx() interrupt yyy; mylib.c: #include <mylib.h> void isr_xxx() interrupt yyy { ... } and link main.c with mylib.o, the ISV is correctly generated in the result binary. Lenik |