Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12604 Discussions

type translation error about "function pointer"

Altera_Forum
Honored Contributor II
997 Views

i met a probelm about compulsory type translation error about "pointer of class function member " in Nios2 IDE. 

 

 

firstly i defined : 

 

class InterruptClass 

public:  

virtual ~InterruptClass() {}; 

}; 

 

class Interrupt 

 

public:  

typedef void (InterruptClass::*Callback)(int); 

Interrupt(int vector); 

~Interrupt() {};  

void Initialize(); 

void SetCallback(InterruptClass *iclass, Callback handler, int arg= 0); 

 

private: 

................. 

 

 

then i invoke SetCallback : 

Interrupt timerIntr...; 

 

timerIntr.SetCallback(this, (Interrupt::Callback)Timer::InterruptHandler); 

 

 

Nios2 IDE info me a error that the type translation can not be executed. 

i tried to compile the code in VC++ and VisualDSP++, it is ok. 

 

So i wonder whether the IDE support this conversion.  

is there any approach to solve this problem?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
300 Views

No one knows?

0 Kudos
Reply