47 TickType_t PeriodInTicks,
51 handle = xTimerCreate( TimerName,
53 Periodic ? pdTRUE : pdFALSE,
58 #ifndef CPP_FREERTOS_NO_EXCEPTIONS 61 configASSERT(!
"Timer Constructor Failed");
71 handle = xTimerCreate(
"Default",
73 Periodic ? pdTRUE : pdFALSE,
78 #ifndef CPP_FREERTOS_NO_EXCEPTIONS 81 configASSERT(!
"Timer Constructor Failed");
89 xTimerDelete(
handle, portMAX_DELAY);
95 return xTimerIsTimerActive(
handle) == pdFALSE ? false :
true;
101 return xTimerStart(
handle, CmdTimeout) == pdFALSE ? false :
true;
107 return xTimerStartFromISR(
handle, pxHigherPriorityTaskWoken) == pdFALSE
114 return xTimerStop(
handle, CmdTimeout) == pdFALSE ? false :
true;
120 return xTimerStopFromISR(
handle, pxHigherPriorityTaskWoken) == pdFALSE
127 return xTimerReset(
handle, CmdTimeout) == pdFALSE ? false :
true;
133 return xTimerResetFromISR(
handle, pxHigherPriorityTaskWoken) == pdFALSE
139 TickType_t CmdTimeout)
141 return xTimerChangePeriod(
handle, NewPeriod, CmdTimeout) == pdFALSE
147 BaseType_t *pxHigherPriorityTaskWoken)
149 return xTimerChangePeriodFromISR(
handle, NewPeriod,
150 pxHigherPriorityTaskWoken) == pdFALSE
155 #if (INCLUDE_xTimerGetTimerDaemonTaskHandle == 1) 159 return xTimerGetTimerDaemonTaskHandle();
167 Timer *timer =
static_cast<Timer *
>(pvTimerGetTimerID(xTimer));
static TaskHandle_t GetTimerDaemonHandle()
bool Stop(TickType_t CmdTimeout=portMAX_DELAY)
bool SetPeriodFromISR(TickType_t NewPeriod, BaseType_t *pxHigherPriorityTaskWoken)
bool StopFromISR(BaseType_t *pxHigherPriorityTaskWoken)
bool Start(TickType_t CmdTimeout=portMAX_DELAY)
bool Reset(TickType_t CmdTimeout=portMAX_DELAY)
bool ResetFromISR(BaseType_t *pxHigherPriorityTaskWoken)
static void TimerCallbackFunctionAdapter(TimerHandle_t xTimer)
Timer(const char *const TimerName, TickType_t PeriodInTicks, bool Periodic=true)
bool SetPeriod(TickType_t NewPeriod, TickType_t CmdTimeout=portMAX_DELAY)
bool StartFromISR(BaseType_t *pxHigherPriorityTaskWoken)