void on_low_interrupt(void) __interrupt 2;
void on_low_interrupt(void) __interrupt 2
{
#ifdef CONFIG_ENABLE_I2C
i2c_handle_interrupt();
#endif
#ifdef CONFIG_ENABLE_SERIAL
serial_handle_interrupt();
#endif
}
I'm adapting some code to run I2C in slave mode on a PIC18F47Q10.
The code was written for another similar PIC but it does need some adapting.
This is the original code: https://github.com/texane/pic18f_i2c
I don't understand the call before being defined, I also don't get what the '2' is meant to do.
This is from the int.c
file posted in the original. Any help or explanation is appreciated.
For now I'm commenting all of this out and hoping it works without it.
The errors seen are:
"unexpected token: __interrupt
Unable to resolve identifier on_low_interrupt."
"error: expected function body after function declarator"