Miguel Manjarrez
Miguel Manjarrez

Reputation: 159

FreeRTOS how to change the callback function of a software timer

I'm using the software timer API from FreeRTOS to create a timer

xTimer = xTimerCreate("Timer", 100, 0, (void *) 0, vTimerCallback0);

Is there a way to change to callback of the timer to another function?

Upvotes: 0

Views: 870

Answers (2)

stathisv
stathisv

Reputation: 509

Another way to do it could be that the callback that you register when the timer gets created (vTimerCallback0) calls one from a set of other functions after some decision making in your code. It depends on what exactly you are trying to do.

Upvotes: 2

Richard
Richard

Reputation: 3246

I don't think there is one - the software timer API is here - https://www.freertos.org/FreeRTOS-Software-Timer-API-Functions.html . Curiously nobody has ever requested that before but I can add a function to do it easily enough - if you subscribe to check-in notifications you will see when it gets added.

Upvotes: 1

Related Questions