RtTimerCreate

How to use RtTimerCreate?

I don’t know what to do with the 4 parameter void * data

I get an error void value not ignored as it ought to be
whatever I put there :frowning:

I would guess it’s your 3 parameter, the pointer to a function. That function is probably not of the right type.

You wouldn’t have any example on how to use this function?

No sorry never used it.

invoker,

I’ve never used it either. But the following at least compiles for me:

#include <photon/realtime/RtTimer.h>

int myCallback(RtTimer_t *timer, void *data)
{
	return 0;
}

int main() 
{
	RtTimer_t *foo;
	char bar[20];

	foo = RtTimerCreate(1, 10, myCallback, &bar); 
	
}

Tho clearly putting a 1 in for the 1st argument isn’t going to let it run. You’d need to make a call to timer_create() to get a legit parameter to put there.

Tim