#include <RBCXTimers.h>
|
| uint16_t | schedule (uint32_t period_ms, std::function< bool()> callback) |
| | Schedule callback to fire after period (in millisecond). More...
|
| |
| bool | reset (uint16_t id, uint32_t period_ms) |
| | Reset the timer with the given ID. More...
|
| |
| bool | cancel (uint16_t id) |
| | Cancel the timer with the given ID. More...
|
| |
| bool | stop (uint16_t id) |
| | Stop the timer with the given ID. More...
|
| |
| bool | isOnTimerTask () const |
| |
◆ cancel()
| bool rb::Timers::cancel |
( |
uint16_t |
id | ) |
|
Cancel the timer with the given ID.
- Parameters
-
| id | is the ID of the timer to cancel. |
- Returns
- true if the timer was cancelled, false if the timer was not found.
◆ deleteFreeRtOsTimerTask()
| void rb::Timers::deleteFreeRtOsTimerTask |
( |
| ) |
|
|
static |
If you don't plan to use FreeRTOS SW timers, call this to free up 2KB of heap.
◆ get()
◆ isOnTimerTask()
| bool rb::Timers::isOnTimerTask |
( |
| ) |
const |
◆ reset()
| bool rb::Timers::reset |
( |
uint16_t |
id, |
|
|
uint32_t |
period_ms |
|
) |
| |
Reset the timer with the given ID.
- Parameters
-
| id | is the ID of the timer to reset. |
| period_ms | is the new period of the timer. |
◆ schedule()
| uint16_t rb::Timers::schedule |
( |
uint32_t |
period_ms, |
|
|
std::function< bool()> |
callback |
|
) |
| |
Schedule callback to fire after period (in millisecond).
Return true from the callback to schedule periodically, false to not (singleshot timer).
- Parameters
-
| period_ms | is period in which will be the schedule callback fired |
| callback | is a function which will be schedule with the set period. |
- Returns
- timer ID that you can use to cancel the timer.
◆ stop()
| bool rb::Timers::stop |
( |
uint16_t |
id | ) |
|
Stop the timer with the given ID.
- Parameters
-
| id | is the ID of the timer to stop. |
- Returns
- true if the timer was stopped, false if the timer was not found.
◆ INVALID_ID
| constexpr uint16_t rb::Timers::INVALID_ID = 0 |
|
staticconstexpr |
The documentation for this class was generated from the following files: