Hi
I am working on a Keystone II DSP project. I am having difficulty fixing a compiler error related to a function pointer for an ISR.
The following code is defined in a .cpp file:
extern void System_registerIsr(uint32 sysEvent, uint32 hostEvent, void (*fxn)(UArg));
// Table to define the interrupt sources
typedef struct
{
EIntMap intCoreMap;
uint32 systemInterrupt;
uint32 hostInterrupt;
uint32 hwInterrupt;
void (*isrHandler)(UArg arg);
}Ctrl_IsrCfgTable;
Ctrl_IsrCfgTable IsrCfgTable[ISR_NUM_ENTRIES] =
{
{INT_COREA, 158, 68, 4, &Isr_A},
{INT_COREA, 300, 69, 5, &Isr_B},
<snip>
};
void myFunc()
{
System_registerIsr( IsrCfgTable[idx].systemInterrupt,
IsrCfgTable[idx].hostInterrupt,
IsrCfgTable[idx].isrHandler );
The call to System_registerIsr() yields error:
error #169: argument of type "void (*)(UArg) C" is incompatible with parameter of type "void (*)(UArg)"
System_registerIsr() is declared in another .cpp file.
Why am I getting this error?
Best regards
David