SYSTIMER_CreateTimer xmc4700

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user8710
Level 3
Level 3
5 questions asked 50 sign-ins 10 replies posted

Hello, 

 

I have a question regarding a this function :

uint32_t SYSTIMER_CreateTimer ( uint32_t period, SYSTIMER_MODE_t mode, SYSTIMER_CALLBACK_t callback, void *args)


And this is an example in how to use it:
TimerId = (uint32_t)SYSTIMER_CreateTimer(ONESEC,SYSTIMER_MODE_PERIODIC (void*)LED_Toggle_EverySec, NULL);

But I don't quite understand if I can use it with a callback function which return value for example (uint16_t *)LED_UART) and do you know if the part "void *args" is for the variable of return of the callback function? 

If yes, how will it be writen?

Best regards, 

 

0 Likes
1 Solution
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @user8710,

Yes, the return type of the callback function may be defined as per your needs. "void *args" defines the parameter to the callback function.

Regards,
Nikhil

View solution in original post

0 Likes
1 Reply
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @user8710,

Yes, the return type of the callback function may be defined as per your needs. "void *args" defines the parameter to the callback function.

Regards,
Nikhil

0 Likes