Task manager is a simple co-routine style implementation for Arduino which supports scheduling work to be done at a given time, repeating tasks, interrupt marshalling and events. It is generally thread safe such that code outside of task manager can add, remove and manage tasks even while task manager is running.
More...
Go to the source code of this file.
Task manager is a simple co-routine style implementation for Arduino which supports scheduling work to be done at a given time, repeating tasks, interrupt marshalling and events. It is generally thread safe such that code outside of task manager can add, remove and manage tasks even while task manager is running.
◆ RawIntHandler
| typedef void(* RawIntHandler) () |
the definition of an interrupt handler function, to be called back when an interrupt occurs.
◆ InterruptFn
| typedef void(* InterruptFn) (pintype_t pin) |
Definition of a function to be called back when an interrupt is detected, marshalled by task manager into a task. The pin that caused the interrupt is passed in the parameter on a best efforts basis.
- Parameters
-
| pin | the pin on which the interrupt occurred (best efforts) |
◆ yield()
This defines the yield function for environments that don't have the function, as per framework on Arduino
◆ millis()
MBED ONLY: This defines the millis function for environments that don't have the function, as per framework on Arduino
◆ micros()
MBED ONLY: This defines the micros function as per framework on Arduino on environments that don't have it
◆ repeatSeconds()
Create a repeating time period for scheduling in seconds
- Parameters
-
| seconds | the number of seconds to schedule in |
- Returns
- the time period for scheduling.
◆ repeatMillis()
Create a repeating time period for scheduling in millis
- Parameters
-
| millis | the number of milliseconds to schedule in |
- Returns
- the time period for scheduling.
◆ repeatMicros()
Create a repeating time period for scheduling in microseconds
- Parameters
-
| micros | the number of microseconds to schedule in |
- Returns
- the time period for scheduling.
◆ onceSeconds()
Create a time period for scheduling once in seconds
- Parameters
-
| seconds | the number of seconds to schedule in |
- Returns
- the time period for scheduling.
◆ onceMillis()
Create a time period for scheduling once in milliseconds
- Parameters
-
| millis | the number of milliseconds to schedule in |
- Returns
- the time period for scheduling.
◆ onceMicros()
Create a time period for scheduling once in microseconds
- Parameters
-
| millis | the number of microseconds to schedule in |
- Returns
- the time period for scheduling.
◆ taskManager
the global task manager, this would normally be associated with the main runLoop.