41 static bool begin(
size_t stackSize);
55 size_t stackSize = DEFAULT_STACK_SIZE);
66 size_t stackSize = DEFAULT_STACK_SIZE)
68 return (
start(NULL, taskLoop, stackSize));
82 static size_t stack();
105 #if defined(TEENSYDUINO) 107 static const size_t DEFAULT_STACK_SIZE = 1024;
108 static const size_t DEFAULT_MAIN_STACK_SIZE = 2048;
109 #if defined(__MK20DX256__) 111 static const size_t STACK_MAX = 16384;
112 #elif defined(__MK64FX512__) 114 static const size_t STACK_MAX = 49152;
115 #elif defined(__MK66FX1M0__) 117 static const size_t STACK_MAX = 65536;
119 #error "Scheduler.h: Teensy board not supported" 122 #elif defined(ARDUINO_ARCH_AVR) 124 static const size_t DEFAULT_STACK_SIZE = 128;
125 static const size_t DEFAULT_MAIN_STACK_SIZE = 256;
127 #elif defined(ARDUINO_ARCH_SAM) 129 static const size_t DEFAULT_STACK_SIZE = 1024;
130 static const size_t DEFAULT_MAIN_STACK_SIZE = 2048;
131 static const size_t STACK_MAX = 32768;
133 #elif defined(ARDUINO_ARCH_SAMD) 135 static const size_t DEFAULT_STACK_SIZE = 1024;
136 static const size_t DEFAULT_MAIN_STACK_SIZE = 2048;
137 static const size_t STACK_MAX = 16384;
140 #error "Scheduler.h: Arduino board not supported" 162 #define await(cond) while (!(cond)) Scheduler.yield()
static task_t * s_running
static bool startLoop(func_t taskLoop, size_t stackSize=DEFAULT_STACK_SIZE)
const uint8_t * stack
Task stack top.
static bool begin(size_t stackSize)
task_t * prev
Previous task.
static void init(func_t setup, func_t loop, const uint8_t *stack)
jmp_buf context
Task context.
static bool start(func_t taskSetup, func_t taskLoop, size_t stackSize=DEFAULT_STACK_SIZE)