#include <ESP8266Task.h>
|
| using | TaskCallback = void (*)(void) |
| | Callback function with no arguments.
|
| |
| using | TaskArgCallback = void (*)(void *) |
| | Callback function with void pointer argument.
|
| |
| template<typename T> |
| using | TaskTypeCallback = void (*)(volatile T) |
| | Templated callback function with typed argument.
|
| |
|
| | ESP8266Task () |
| | Constructor.
|
| |
| virtual | ~ESP8266Task () |
| | Destructor that ensures the timer is detached.
|
| |
| void | attach (uint32_t ms, bool repeat, TaskCallback callback) |
| | Attach a simple callback to run periodically.
|
| |
| template<typename T> |
| void | attach (uint32_t ms, bool repeat, TaskTypeCallback< volatile T > callback, volatile T arg) |
| | Attach a typed callback with argument to run periodically.
|
| |
| void | detach () |
| | Stop and detach the timer.
|
| |
| bool | isAttached () |
| | Check if the timer is attached.
|
| |
◆ TaskArgCallback
Callback function with void pointer argument.
◆ TaskCallback
Callback function with no arguments.
◆ TaskTypeCallback
Templated callback function with typed argument.
◆ ESP8266Task()
| uniot::ESP8266Task::ESP8266Task |
( |
| ) |
|
|
inline |
◆ ~ESP8266Task()
| virtual uniot::ESP8266Task::~ESP8266Task |
( |
| ) |
|
|
inlinevirtual |
Destructor that ensures the timer is detached.
◆ attach() [1/2]
| void uniot::ESP8266Task::attach |
( |
uint32_t | ms, |
|
|
bool | repeat, |
|
|
TaskCallback | callback ) |
|
inline |
Attach a simple callback to run periodically.
- Parameters
-
| ms | Millisecond interval between executions |
| repeat | True to run repeatedly, false to run once |
| callback | Function to execute |
◆ attach() [2/2]
template<typename T>
| void uniot::ESP8266Task::attach |
( |
uint32_t | ms, |
|
|
bool | repeat, |
|
|
TaskTypeCallback< volatile T > | callback, |
|
|
volatile T | arg ) |
|
inline |
Attach a typed callback with argument to run periodically.
- Parameters
-
| ms | Millisecond interval between executions |
| repeat | True to run repeatedly, false to run once |
| callback | Function to execute |
| arg | Argument to pass to the callback (must fit in 4 bytes) |
◆ detach()
| void uniot::ESP8266Task::detach |
( |
| ) |
|
|
inline |
Stop and detach the timer.
◆ isAttached()
| bool uniot::ESP8266Task::isAttached |
( |
| ) |
|
|
inline |
Check if the timer is attached.
- Return values
-
| true | The timer is attached and running |
| false | The timer is not attached |
The documentation for this class was generated from the following file: