Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
I have found that the overloaded "attach" member function of mbed::CAN is not actually implemented in the library and reports...
Quote:
Undefined symbol mbed::CAN::attach<CAN_Interface>(T1*, void(T1::*)())
I am a C++ novice but i think this is a bug some where i have published an exampled project here http://mbed.org/users/chrispearce1972/programs/can_test/luz4y5 but basically looks like this...
class CAN_stack { private: CAN* adapter; void can_callback ( void ); public: CAN_stack(CAN* can_int); void poll (void); } CAN_stack::CAN_stack(CAN* can_int) { adapter=can_int; adapter->attach(this, &CAN_stack::can_callback); } void CAN_stack::poll (void) { /* pop fifo and do stuff */ } void CAN_stack::can_callback ( void ) { CANMessage msg; adapter->read(msg); /* push msg to fifo etc */ }The error occurs on the
line, and im unsure as to why???