AceRoutine  0.3
A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.
Static Public Member Functions | List of all members
ace_routine::CoroutineScheduler Class Reference

Class that manages instances of the Coroutine class, and executes them in a round-robin fashion. More...

#include <CoroutineScheduler.h>

Static Public Member Functions

static void setup ()
 Set up the scheduler. More...
 
static void loop ()
 Run the current coroutine using the current scheduler. More...
 
static void list (Print &printer)
 Print out the known coroutines to the printer (usually Serial). More...
 

Detailed Description

Class that manages instances of the Coroutine class, and executes them in a round-robin fashion.

Definition at line 37 of file CoroutineScheduler.h.

Member Function Documentation

◆ list()

static void ace_routine::CoroutineScheduler::list ( Print &  printer)
inlinestatic

Print out the known coroutines to the printer (usually Serial).

Note that if this method is never called, the linker will strip out the code. If Serial is never configured in setup(), then this method causes no additional flash memory consumption.

Definition at line 56 of file CoroutineScheduler.h.

◆ loop()

static void ace_routine::CoroutineScheduler::loop ( )
inlinestatic

Run the current coroutine using the current scheduler.

This method returns when the underlying Coroutine suspends execution, which allows the system loop() to return to do systems processing, such as WiFi. Everyone must cooperate to make the whole thing work.

Definition at line 48 of file CoroutineScheduler.h.

◆ setup()

static void ace_routine::CoroutineScheduler::setup ( )
inlinestatic

Set up the scheduler.

Should be called from the global setup().

Definition at line 40 of file CoroutineScheduler.h.


The documentation for this class was generated from the following files: