When I try to compile the code for a PIC program using PICMicro C compiler, I got the error "incomplete type is not allowed" for the interrupt service routine part of the code:
char chB = 0;
int clicks = 0;
void interrupt ISR(void) //incomplete type is not allowed
{
if(RBIF == 1)
{
clicks++;
chB = PORTB;
RBIF = 0;
}
}
After checking multiple sources, I still do not see how the service routine is incorrectly written..
Edit: Thanks for all your help, I have found the solution:
char chB = 0;
int clicks = 0;
#pragma vector = 0x04
__interrupt void isr(void)
{
if(RBIF == 1)
{
clicks++;
chB = PORTB;
RBIF = 0;
}
}
void __attribute__ ((interrupt)) ISR(void)
– JigsoreISR
identifier is a macro that requires an ISR name... – user529758