暫無描述

Anatoli Arkhipenko 4ef9a800de v3.2.0 - xs-code preparations 5 年之前
examples 1fc172167a v3.2.0 template update 5 年之前
extras fc18a9ffe4 v3.1.5 - light sleep for esp32 5 年之前
src 4ef9a800de v3.2.0 - xs-code preparations 5 年之前
LICENSE.txt 69d5ccd2aa v3.0.3 (testing) - release prep 6 年之前
README.md 4ef9a800de v3.2.0 - xs-code preparations 5 年之前
keywords.txt 5b2c148296 v3.2.0-scheduling options 5 年之前
library.json 5b2c148296 v3.2.0-scheduling options 5 年之前
library.properties 5b2c148296 v3.2.0-scheduling options 5 年之前

README.md

Task Scheduler

Cooperative multitasking for Arduino, ESPx, STM32 and other microcontrollers

Version 3.2.0: 2020-08-16 Latest updates

arduino-library-badgexscode

OVERVIEW:

A lightweight implementation of cooperative multitasking (task scheduling) supporting:

  1. Periodic task execution, with dynamic execution period in milliseconds (default) or microseconds (if explicitly enabled) – frequency of execution
  2. Number of iterations (limited or infinite number of iterations)
  3. Execution of tasks in predefined sequence
  4. Dynamic change of task execution parameters (frequency, number of iterations, callback methods)
  5. Power saving via entering IDLE sleep mode when tasks are not scheduled to run
  6. Support for event-driven task invocation via Status Request object
  7. Support for task IDs and Control Points for error handling and watchdog timer
  8. Support for Local Task Storage pointer (allowing use of same callback code for multiple tasks)
  9. Support for layered task prioritization
  10. Support for std::functions (tested on ESPx only)
  11. Overall task timeout
  12. Static and dynamic callback method binding
  13. CPU load / idle statistics for time critical applications
  14. Scheduling options with priotity for original schedule (with and without catchup) and interval

Scheduling overhead: between 15 and 18 microseconds per scheduling pass (Arduino UNO rev 3 @ 16MHz clock, single scheduler w/o prioritization)

TaskScheduler was tested on the following platforms:

  • Arduino Uno R3
  • Arduino Nano
  • Arduino Micro
  • ATtiny85
  • ESP8266 (Node MCU v2.0)
  • ESP32
  • Teensy (tested on Teensy 3.5)
  • STM32F1 (tested on Mini USB STM32F103RCBT6 ARM Cortex-M3 leaflabs Leaf maple mini module F)
  • MSP430 and MSP432 boards

    TaskScheduler process diagram

    Changelog is located here.

For detailed functionality overview please refer to TaskScheduler documentation in the 'extras' folder or in the Wiki page.

Check out what TaskScheduler can do: