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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

type translation error about "function pointer"

Altera_Forum
Honored Contributor II
1,182 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
485 Views

No one knows?

0 Kudos
Reply