hello all, i am using the header file intr.h to allow me to use my own interrupt service routines. I think i am following the convention specified in intr.h but the code will always give the error " expected a declaration" on each call to intr.h ..... INTR_INIT INTR_HOOK( 16,my_int0) INTR_HOOK( 18,my_int2) .. interrupt void my_int0() { } interrupt void my_int2() { } ... Is this the correct way to do it? the intr.h file has it as such, ... #define INT0_TRAP 16 #define INT1_TRAP 17 #define INT2_TRAP 18 ... /******************************************************************/ /* INTR_INIT - sets interrupt vector pointer */ /******************************************************************/ #define INTR_INIT\ {PMST &= 0x7f; PMST |= ( ( (unsigned int)&_vectors ) & 0xff80u); } /******************************************************************/ /* INTR_HOOK(isr, isrfunc) - sets interrupt service routine vec */ /* isr - interrupt trap number (see TRAP instruction) */ /* isrfunc - address of interrupt service routine */ /******************************************************************/ #define INTR_HOOK(trap_no, isrfunc) \ { isr_jump_table[trap_no] = (ISRFUNC)isrfunc; } I need to use this method since im using codec API and the drv5402.lib file which uses its own vector table. any help would be greatly apprectiated, Andrew Pasquale "PS if i did a stupid mistake, explitives will not offend." |
intr_hook problems
Started by ●August 12, 2002