Other Parts Discussed in Thread: SYSBIOS
Hello,
I have a C++ class which currently uses the TIRTOS Clock with a C callback wrapper function, along the lines of:
// Wrapper function for clock callback
extern "C" {
void abstractClockTick(UArg arg0) {
static RadioDevice *task = reinterpret_cast<RadioDevice*>(arg0);
task->tick();
}
}
...and the clock is initialized thus:
Clock_Params clkParams;
Clock_Params_init(&clkParams);
clkParams.period = 5000;
clkParams.startFlag = TRUE;
clkParams.arg = (UArg)this;
I now need more accuracy and want to use a hardware timer through the Timer driver api, but it doesn't look like I can pass an argument (this) to the C function so it can reference the instance, per Timer doc: TI Drivers Runtime APIs
Is there a workaround?