Hi All
I am working with Hi-Tech's HC51-Lite compiler...its a nightmare.
I am trying to assign an ISR to run on a certain interrupt vector.
The Hi-Tech manual recommends a couple techniques only one of which works in my version: using inline asm code. The asm code means I need obtain a pointer to the ISR so I can place this in the ACC and thus reference it in the asm section.
My current C code to do this is:
But the compiler gives me errors:Code:// ISR name= interrupt void ext1isr (void) void (*pisr)(void); pisr = &ext1isr; // Line 23 ACC = ((int*)pisr); // Line 24
Error : 23 undefined identifier "ext1isr"
Warning : 23 illegal conversion between pointer types
Warning : 24 illegal conversion of pointer to integer
Frankly void pointers and pointers to functions are outside my level of knowledge so any help much appreciated.
Thanks
EDIT: just tried: interrupt voide (*pisr) (void); but no change




Reply With Quote