I'm trying to assign to a response function and channel event function inside another object:
void object::init() {
....
ANT_AssignResponseFunction(f1, ant_message);
ANT_AssignChannelEventFunction(USER_ANTCHANNEL, f1, ant_message);
}
and I'm having issues declaring the function (f1) since it isn't of the type RESPONSE_FUNC. I know that I can get it to work if I declare the function as static:
BOOL f1(UCHAR ucChannel_, UCHAR ucEvent_) {}
but I need to use variables within the class object so I can't do that. If I declare the function within the object:
BOOL object::f1(UCHAR ucChannel_, UCHAR ucEvent_) {}
The error that I get is: "Error: argument of type "BOOL (object::*)(UCHAR ucChannel_, UCHAR ucEvent_)" is incompatible with parameter of type "RESPONSE_FUNC"".
Any suggestions?