I have not written C ++ code for a long time; however, now I have to work on Texas Instruments F28335 DSP, and I'm trying to switch from C to C ++. I have the following code that tries to initialize an interrupt service routine with a static class method:
typedef interrupt void (*PINT)(void);
class EPWMManager
{
public:
EPWMManager();
static interrupt void Epwm1InterruptHandler(void);
};
interrupt void EPWMManager::Epwm1InterruptHandler(void)
{
}
int main(void)
{
PINT p;
p = &(EPWMManager::Epwm1InterruptHandler);
return 0;
}
When compiling, I get the following:
error: value of type "void (*) ()" cannot be assigned to an entity of type "PINT"
I guess I miss some kind of throw.
Trope source
share