8 #ifndef COMPONENTS_CPP_UTILS_FREERTOSTIMER_H_
9 #define COMPONENTS_CPP_UTILS_FREERTOSTIMER_H_
10 #include <freertos/FreeRTOS.h>
11 #include <freertos/task.h>
12 #include <freertos/timers.h>
20 void changePeriod(TickType_t newPeriod, TickType_t blockTime = portMAX_DELAY);
24 void reset(TickType_t blockTime = portMAX_DELAY);
25 void start(TickType_t blockTime = portMAX_DELAY);
26 void stop(TickType_t blockTime = portMAX_DELAY);
29 TimerHandle_t timerHandle;
32 static void internalCallback(TimerHandle_t xTimer);
FreeRTOSTimer(char *name, TickType_t period, UBaseType_t reload, void *data, void(*callback)(FreeRTOSTimer *pTimer))
Construct a timer.
Definition: FreeRTOSTimer.cpp:46
void reset(TickType_t blockTime=portMAX_DELAY)
Reset the timer to the period and start it ticking.
Definition: FreeRTOSTimer.cpp:90
TickType_t getPeriod()
Return the period of the timer.
Definition: FreeRTOSTimer.cpp:100
virtual ~FreeRTOSTimer()
Destroy a class instance.
Definition: FreeRTOSTimer.cpp:68
void stop(TickType_t blockTime=portMAX_DELAY)
Stop the timer from ticking.
Definition: FreeRTOSTimer.cpp:83
void changePeriod(TickType_t newPeriod, TickType_t blockTime=portMAX_DELAY)
Change the period of the timer.
Definition: FreeRTOSTimer.cpp:110
const char * getName()
Get the name of the timer.
Definition: FreeRTOSTimer.cpp:122
void start(TickType_t blockTime=portMAX_DELAY)
Start the timer ticking.
Definition: FreeRTOSTimer.cpp:76
void * getData()
Get the user supplied data associated with the timer.
Definition: FreeRTOSTimer.cpp:132
Wrapper around the FreeRTOS timer functions.
Definition: FreeRTOSTimer.h:16