Browse Source

v3.0.3 (testing) - release prep
- updated all files with new version and features
- officially discontinues support for offline docs
- provided extra example: 6 ways to blink with TS

Anatoli Arkhipenko 6 năm trước cách đây
mục cha
commit
69d5ccd2aa

+ 1 - 1
LICENSE.txt

@@ -1,4 +1,4 @@
-Copyright (c) 2015, Anatoli Arkhipenko.
+Copyright (c) 2015-2019, Anatoli Arkhipenko.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification,

+ 9 - 133
README

@@ -1,5 +1,5 @@
-Task Scheduler – cooperative multitasking for Arduino and ESP8266 microcontrollers
-Version 3.0.2 2018-11-14
+Task Scheduler – cooperative multitasking for Arduino, ESPx, STM32 and other microcontrollers
+Version 3.0.3 2019-06-13
 
 If you find TaskScheduler useful for your Arduino project, please drop me an email: arkhipenko@hotmail.com
 ----------------------------------------------------------------------------------------------------------
@@ -15,10 +15,9 @@ OVERVIEW:
  7. Task IDs and Control Points for error handling and watchdog timer
  8. Local Task Storage pointer (allowing use of same callback code for multiple tasks)
  9. Layered task prioritization
-10. Support for std::functions (ESP8266 only)
+10. Support for std::functions (tested on ESPx only)
 11. Overall task timeout
 12. Static and dynamic callback method binding
-13. Support for STM32F1 ARM Cortex-M3 boards
 
 Scheduling overhead: between 15 and 18 microseconds per scheduling pass (check the benchmark example).
 
@@ -31,9 +30,11 @@ Tested on the following microcontrollers:
  - 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
 
-For detailed functionality overview please refer to TaskScheduler documentation in the 'extras' folder.
-=======================================================================================================
+For detailed functionality overview please refer to TaskScheduler Wiki page: 
+            https://github.com/arkhipenko/TaskScheduler/wiki
+============================================================================
 
 Check out what TaskScheduler can do:
 ====================================
@@ -82,130 +83,5 @@ Check out what TaskScheduler can do:
     (by arkhipenko: http://www.instructables.com/id/Interactive-Halloween-Pumpkin/)
 
 
-Changelog:
-=========
-v3.0.0: MAJOR RELEASE
-   2018-03-15 - Optional Dynamic callback method binding (_TASK_OO_CALLBACKS compilation directive).
-
-v2.6.1:
-   2018-02-13 - Bug: Support for task self-destruction in the OnDisable method.
-                Example 19: dynamic task creation and destruction.
-   2018-03-14 - Bug: high level scheduler ignored if lower level chain is empty
-                Example 20: use of local task storage to work with task-specific class objects
-
-v2.6.0:
-   2018-01-30 - _TASK_TIMEOUT compilation directive: Task overall timeout functionality
-   2018-01-30 - Support for ESP32
-                (Contributed by Marco Tombesi: https://github.com/baggior)
-
-v2.5.2:
-   2018-01-09 - _TASK_INLINE compilation directive making all methods declared "inline" (issue #42)
-
-
-v2.5.1:
-   2018-01-06 - support for IDLE sleep on Teensy boards (tested on Teensy 3.6)
-
-v2.5.0:
-   2017-04-27 - added optional support for std::functions via _TASK_STD_FUNCTION
-                (Contributed by Edwin van Leeuwen [BlackEdder - https://github.com/BlackEdder)
-   2017-08-30 - add _TASK_DEBUG making all methods and variables public FOR DEBUGGING PURPOSES ONLY!
-                *** USE AT YOUR OWN RISK ***
-   2017-08-30 - bug fix: Scheduler::addTask() checks if task is already part of an execution chain (github issue #37)
-   2017-08-30 - support for multi-tab sketches (Contributed by Adam Ryczkowski - https://github.com/adamryczkowski)
-
-v2.4.0:
-   2017-04-27 - added destructor to the Task class to ensure tasks are disables and taken off the execution chain
-                upon destruction. (Contributed by Edwin van Leeuwen [BlackEdder - https://github.com/BlackEdder)
-
-v2.3.0:
-    2017-02-24 - new timeUntilNextIteration() method within Scheduler class - inquire when a particlar task is
-                 scheduled to run next time
-
-v2.2.1:
-    2016-11-30 - inlined constructors. Added "yield()" and "yieldOnce()" functions to easily break down and
-				 chain back together long running callback methods
-    2016-12-16 - added "getCount()" to StatusRequest objects, made every task StatusRequest enabled.
-                 Internal StatusRequest objects are accessible via "getInternalStatusRequest()" method.
-
-v2.2.0:
-    2016-11-17 - all methods made 'inline' to support inclusion of TaskSchedule.h file into other header files
-
-v2.1.0:
-    2016-02-01 - support for microsecond resolution
-    2016-02-02 - added Scheduler baseline start time reset method: startNow()
-
-v2.0.1:
-    2016-01-02 - bug fix: issue#11 Xtensa compiler (esp8266): Declaration of constructor does not match implementation
-
-v2.0.0:
-    2015-12-22 - _TASK_PRIORITY - support for layered task prioritization
-
-v1.9.2:
-    2015-11-28 - _TASK_ROLLOVER_FIX is deprecated (not necessary)
-    2015-12-16 - bug fixes: automatic millis rollover support for delay methods
-    2015-12-17 - new method for _TASK_TIMECRITICAL option: getStartDelay()
-
-v1.9.0:
-    2015-11-24 - packed three byte-long status variables into one byte-long bit array structure data type - saving 2 bytes per each task instance
-
-v1.8.5:
-    2015-11-23 - bug fix: incorrect calculation of next task invocation in case callback changed the interval
-    2015-11-23 - bug fix: Task::set() method calls setInterval() explicitly, therefore delaying the task in the same manner
-
-v1.8.4:
-    2015-11-15 - bug fix: Task alignment with millis() for scheduling purposes should be done after OnEnable, not before. Especially since OnEnable method can change the interval
-
-v1.8.3:
-    2015-11-05 - support for task activation on a status request with arbitrary interval and number of iterations (0 and 1 are still default values)
-    2015-11-05 - implement waitForDelayed() method to allow task activation on the status request completion delayed for one current interval
-    2015-11-09 - added callback methods prototypes to all examples for Arduino IDE 1.6.6 compatibility
-    2015-11-14 - added several constants to be used as task parameters for readability (e.g, TASK_FOREVER, TASK_SECOND, etc.)
-    2015-11-14 - significant optimization of the scheduler's execute loop, including millis() rollover fix option
-
-v1.8.2:
-    2015-10-27 - implement Local Task Storage Pointer (allow use of same callback code for different tasks)
-    2015-10-27 - bug: currentTask() method returns incorrect Task reference if called within OnEnable and OnDisable methods
-    2015-10-27 - protection against infinite loop in OnEnable (if enable() methods are called within OnEnable)
-    2015-10-29 - new currentLts() method in the scheduler class returns current task's LTS pointer in one call
-
-v1.8.1:
-    2015-10-22 - implement Task id and control points to support identification of failure points for watchdog timer logging
-
-v1.8.0:
-    2015-10-13 - support for status request objects allowing tasks waiting on requests
-    2015-10-13 - moved to a single header file to allow compilation control via #defines from the main sketch
-
-v1.7.0:
-    2015-10-08 - introduced callback run counter - callback functions can branch on the iteration number.
-    2015-10-11 - enableIfNot() - enable a task only if it is not already enabled. Returns true if was already enabled, false if was disabled.
-    2015-10-11 - disable() returns previous enable state (true if was enabled, false if was already disabled)
-    2015-10-11 - introduced callback functions "on enable" and "on disable". On enable runs every time enable is called, on disable runs only if task was enabled
-    2015-10-12 - new Task method: forceNextIteration() - makes next iteration happen immediately during the next pass regardless how much time is left
-
-v1.6.0:
-    2015-09-22 - revert back to having all tasks disable on last iteration.
-    2015-09-22 - deprecated disableOnLastIteration method as a result
-    2015-10-01 - made version numbers semver compliant (documentation only)
-
-v1.5.1:
-    2015-09-21 - bug fix: incorrect handling of active tasks via set() and setIterations().
-		 		 Thanks to Hannes Morgenstern for catching this one
-
-v1.5.0:
-    2015-09-20 - access to currently executing task (for callback functions)
-    2015-09-20 - pass scheduler as a parameter to the task constructor to append the task to the end of the chain
-    2015-09-20 - option to create a task already enabled
-
-v1.4.1:
-    2015-09-15 - more careful placement of AVR-specific includes for sleep functions (compatibility with DUE)
-                         sleep on idle run is no longer a default and should be explicitly compiled with _TASK_SLEEP_ON_IDLE_RUN defined
-
-v1.0.0:
-    2015-02-24 - Initial release
-    2015-02-28 - added delay() and disableOnLastIteration() functions
-    2015-03-25 - changed scheduler execute() function for a more precise delay calculation:
-                 1. Do not delay if any of the tasks ran (making request for immediate execution redundant)
-                 2. Delay is invoked only if none of the tasks ran
-                 3. Delay is based on the min anticipated wait until next task _AND_ the runtime of execute function itself.
-    2015-05-11 - added  restart() and restartDelayed() functions to restart tasks which are on hold after running all iterations
-    2015-05-19 - completely removed  delay from the scheduler since there are no power saving there. using 1 ms sleep instead
+Changelog is located here: https://github.com/arkhipenko/TaskScheduler/wiki/Changelog
+=====================================================================================

+ 5 - 5
README.md

@@ -1,6 +1,6 @@
 # Task Scheduler
-### Cooperative multitasking for Arduino microcontrollers
-#### Version 3.0.2: 2018-11-14
+### Cooperative multitasking for Arduino, ESPx, STM32 and other microcontrollers
+#### Version 3.0.3: 2019-06-13
 
 ### OVERVIEW:
 A lightweight implementation of cooperative multitasking (task scheduling) supporting:
@@ -13,10 +13,9 @@ A lightweight implementation of cooperative multitasking (task scheduling) suppo
 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` (`ESP8266` only)
+10. Support for `std::functions` (tested on `ESPx` only)
 11. Overall task timeout
 12. Static and dynamic callback method binding
-13. Support for STM32F1 ARM Cortex-M3 boards
 
 Scheduling overhead: between `15` and `18` microseconds per scheduling pass (Arduino UNO rev 3 @ `16MHz` clock, single scheduler w/o prioritization)
 
@@ -29,6 +28,7 @@ Scheduling overhead: between `15` and `18` microseconds per scheduling pass (Ard
 * 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](https://github.com/arkhipenko/TaskScheduler/raw/master/extras/TaskScheduler_html.png)
 ---
@@ -38,7 +38,7 @@ Scheduling overhead: between `15` and `18` microseconds per scheduling pass (Ard
 
 >>>>>>> b36cc818db89430b7564d1c56a668937f6dae6ec
 
-#### For detailed functionality overview please refer to TaskScheduler documentation in the 'extras' folder or in the [Wiki page](https://github.com/arkhipenko/TaskScheduler/wiki).
+#### For detailed functionality overview please refer to TaskScheduler [Wiki page](https://github.com/arkhipenko/TaskScheduler/wiki).
 
 ### Check out what TaskScheduler can do:
 

+ 296 - 0
examples/Scheduler_example00_Blink/Scheduler_example00_Blink.ino

@@ -0,0 +1,296 @@
+/*
+   Every example set must have a LED blink example
+   For this one the idea is to have as many ways to blink the LED
+   as I can think of. So, here we go.
+
+   Tested on:
+   - Arduino Nano
+   - ESP8266
+   - ESP32
+   - STM32 Maple Mini
+*/
+
+
+// #define _TASK_TIMECRITICAL      // Enable monitoring scheduling overruns
+#define _TASK_SLEEP_ON_IDLE_RUN // Enable 1 ms SLEEP_IDLE powerdowns between tasks if no callback methods were invoked during the pass
+#define _TASK_STATUS_REQUEST    // Compile with support for StatusRequest functionality - triggering tasks on status change events in addition to time only
+// #define _TASK_WDT_IDS           // Compile with support for wdt control points and task ids
+// #define _TASK_LTS_POINTER       // Compile with support for local task storage pointer
+// #define _TASK_PRIORITY          // Support for layered scheduling priority
+// #define _TASK_MICRO_RES         // Support for microsecond resolution
+// #define _TASK_STD_FUNCTION      // Support for std::function (ESP8266 and ESP32 ONLY)
+// #define _TASK_DEBUG             // Make all methods and variables public for debug purposes
+// #define _TASK_INLINE            // Make all methods "inline" - needed to support some multi-tab, multi-file implementations
+// #define _TASK_TIMEOUT           // Support for overall task timeout
+// #define _TASK_OO_CALLBACKS      // Support for dynamic callback method binding
+#include <TaskScheduler.h>
+
+// Debug and Test options
+#define _DEBUG_
+//#define _TEST_
+
+#ifdef _DEBUG_
+#define _PP(a) Serial.print(a);
+#define _PL(a) Serial.println(a);
+#else
+#define _PP(a)
+#define _PL(a)
+#endif
+
+// LED_BUILTIN  13
+#if defined( ARDUINO_ARCH_ESP32 )
+#define LED_BUILTIN  23 // esp32 dev2 kit does not have LED
+#endif
+
+// Scheduler
+Scheduler ts;
+
+/*
+   Approach 1: LED is driven by the boolean variable; false = OFF, true = ON
+*/
+#define PERIOD1 500
+#define DURATION 10000
+void blink1CB();
+Task tBlink1 ( PERIOD1 * TASK_MILLISECOND, DURATION / PERIOD1, &blink1CB, &ts, true );
+
+/*
+   Approac 2: two callback methods: one turns ON, another turns OFF
+*/
+#define PERIOD2 400
+void blink2CB_ON();
+void blink2CB_OFF();
+Task tBlink2 ( PERIOD2 * TASK_MILLISECOND, DURATION / PERIOD2, &blink2CB_ON, &ts, false );
+
+/*
+   Approach 3: Use RunCounter
+*/
+#define PERIOD3 300
+void blink3CB();
+Task tBlink3 (PERIOD3 * TASK_MILLISECOND, DURATION / PERIOD3, &blink3CB, &ts, false);
+
+/*
+   Approach 4: Use status request objects to pass control from one task to the other
+*/
+#define PERIOD4 200
+bool blink41OE();
+void blink41();
+void blink42();
+void blink42OD();
+Task tBlink4On  ( PERIOD4 * TASK_MILLISECOND, TASK_ONCE, blink41, &ts, false, &blink41OE );
+Task tBlink4Off ( PERIOD4 * TASK_MILLISECOND, TASK_ONCE, blink42, &ts, false, NULL, &blink42OD );
+
+
+/*
+   Approach 5: Two interleaving tasks
+*/
+#define PERIOD5 600
+bool blink51OE();
+void blink51();
+void blink52();
+void blink52OD();
+Task tBlink5On  ( 600 * TASK_MILLISECOND, DURATION / PERIOD5, &blink51, &ts, false, &blink51OE );
+Task tBlink5Off ( 600 * TASK_MILLISECOND, DURATION / PERIOD5, &blink52, &ts, false, NULL, &blink52OD );
+
+
+/*
+   Approach 6: RunCounter-based with random intervals
+*/
+#define PERIOD6 300
+void blink6CB();
+bool blink6OE();
+void blink6OD();
+Task tBlink6 ( PERIOD6 * TASK_MILLISECOND, DURATION / PERIOD6, &blink6CB, &ts, false, &blink6OE, &blink6OD );
+
+void setup() {
+  // put your setup code here, to run once:
+#if defined(_DEBUG_) || defined(_TEST_)
+  Serial.begin(115200);
+  delay(TASK_SECOND);
+  _PL("TaskScheduler Blink example");
+  _PL("Blinking for 10 seconds using various techniques\n");
+  delay(2 * TASK_SECOND);
+#endif
+  pinMode(LED_BUILTIN, OUTPUT);
+}
+
+void loop() {
+  ts.execute();
+}
+
+inline void LEDOn() {
+  digitalWrite( LED_BUILTIN, HIGH );
+}
+
+inline void LEDOff() {
+  digitalWrite( LED_BUILTIN, LOW );
+}
+
+// === 1 =======================================
+bool LED_state = false;
+void blink1CB() {
+  if ( tBlink1.isFirstIteration() ) {
+    _PP(millis());
+    _PL(": Blink1 - simple flag driven");
+    LED_state = false;
+  }
+
+  if ( LED_state ) {
+    LEDOff();
+    LED_state = false;
+  }
+  else {
+    LEDOn();
+    LED_state = true;
+  }
+
+  if ( tBlink1.isLastIteration() ) {
+    tBlink2.restartDelayed( 2 * TASK_SECOND );
+    LEDOff();
+  }
+}
+
+
+// === 2 ======================================
+void blink2CB_ON() {
+  if ( tBlink2.isFirstIteration() ) {
+    _PP(millis());
+    _PL(": Blink2 - 2 callback methods");
+  }
+
+  LEDOn();
+  tBlink2.setCallback( &blink2CB_OFF );
+
+  if ( tBlink2.isLastIteration() ) {
+    tBlink3.restartDelayed( 2 * TASK_SECOND );
+    LEDOff();
+  }
+}
+
+
+void blink2CB_OFF() {
+
+  LEDOff();
+  tBlink2.setCallback( &blink2CB_ON );
+
+  if ( tBlink2.isLastIteration() ) {
+    tBlink3.restartDelayed( 2 * TASK_SECOND );
+    LEDOff();
+  }
+}
+
+
+// === 3 =====================================
+void blink3CB() {
+  if ( tBlink3.isFirstIteration() ) {
+    _PP(millis());
+    _PL(": Blink3 - Run Counter driven");
+  }
+
+  if ( tBlink3.getRunCounter() & 1 ) {
+    LEDOn();
+  }
+  else {
+    LEDOff();
+  }
+
+  if ( tBlink3.isLastIteration() ) {
+    tBlink4On.setOnEnable( &blink41OE );
+    tBlink4On.restartDelayed( 2 * TASK_SECOND );
+    LEDOff();
+  }
+}
+
+
+// === 4 =============================================
+int counter = 0;
+bool blink41OE() {
+  _PP(millis());
+  _PL(": Blink4 - Internal status request based");
+  counter = 0;
+  tBlink4On.setOnEnable( NULL );
+  return true;
+}
+
+void blink41() {
+  //  _PP(millis());
+  //  _PL(": blink41");
+  LEDOn();
+  StatusRequest* r = tBlink4On.getInternalStatusRequest();
+  tBlink4Off.waitForDelayed( r );
+  counter++;
+}
+
+void blink42() {
+  //  _PP(millis());
+  //  _PL(": blink42");
+  LEDOff();
+  StatusRequest* r = tBlink4Off.getInternalStatusRequest();
+  tBlink4On.waitForDelayed( r );
+  counter++;
+}
+
+
+void blink42OD() {
+  if ( counter >= DURATION / PERIOD4 ) {
+    tBlink4On.disable();
+    tBlink4Off.disable();
+
+    tBlink5On.setOnEnable( &blink51OE );
+    tBlink5On.restartDelayed( 2 * TASK_SECOND );
+    tBlink5Off.restartDelayed( 2 * TASK_SECOND + PERIOD5 / 2 );
+    LEDOff();
+  }
+}
+
+
+// === 5 ==========================================
+bool blink51OE() {
+  _PP(millis());
+  _PL(": Blink5 - Two interleaving tasks");
+  tBlink5On.setOnEnable( NULL );
+  return true;
+}
+void blink51() {
+  //  _PP(millis());
+  //  _PL(": blink51");
+  LEDOn();
+}
+void blink52() {
+  //  _PP(millis());
+  //  _PL(": blink52");
+  LEDOff();
+}
+void blink52OD() {
+  tBlink6.restartDelayed( 2 * TASK_SECOND );
+  LEDOff();
+}
+
+
+// === 6 ============================================
+long interval6 = 0;
+bool blink6OE() {
+  _PP(millis());
+  _PP(": Blink6 - RunCounter + Random ON interval = ");
+  interval6 = random( 100, 901 );
+  tBlink6.setInterval( interval6 );
+  _PL( interval6 );
+  tBlink6.delay( 2 * TASK_SECOND );
+
+  return true;
+}
+
+void blink6CB() {
+  if ( tBlink6.getRunCounter() & 1 ) {
+    LEDOn();
+    tBlink6.setInterval( interval6 );
+  }
+  else {
+    LEDOff();
+    tBlink6.setInterval( TASK_SECOND - interval6 );
+  }
+}
+
+void blink6OD() {
+  tBlink1.restartDelayed( 2 * TASK_SECOND );
+  LEDOff();
+}

BIN
extras/TaskScheduler.doc


BIN
extras/TaskScheduler.pdf


+ 3 - 0
extras/These documents are no longer current.txt

@@ -0,0 +1,3 @@
+As of March 2018 these offline documents are no longer maintained. 
+For the latest documentation of TaskScheduler please visit:
+https://github.com/arkhipenko/TaskScheduler/wiki

+ 71 - 65
keywords.txt

@@ -6,103 +6,109 @@
 # Datatypes (KEYWORD1)
 #######################################
 
-Task	KEYWORD1
 Scheduler	KEYWORD1
 StatusRequest	KEYWORD1
+Task	KEYWORD1
 
 #######################################
 # Methods and Functions (KEYWORD2)
 #######################################
 
-init	KEYWORD2
 addTask	KEYWORD2
+allowSleep	KEYWORD2
+Callback	KEYWORD2
+completed	KEYWORD2
+currentLts	KEYWORD2
+currentScheduler	KEYWORD2
+currentTask	KEYWORD2
+delay	KEYWORD2
 deleteTask	KEYWORD2
+disable	KEYWORD2
 disableAll	KEYWORD2
-enableAll	KEYWORD2
-currentTask	KEYWORD2
-currentLts	KEYWORD2
-execute	KEYWORD2
-timeUntilNextIteration	KEYWORD2
-startNow	KEYWORD2
-allowSleep	KEYWORD2
+disableOnLastIteration	KEYWORD2
 enable	KEYWORD2
-enableIfNot	KEYWORD2
+enableAll	KEYWORD2
 enableDelayed	KEYWORD2
-delay	KEYWORD2
+enableIfNot	KEYWORD2
+execute	KEYWORD2
 forceNextIteration	KEYWORD2
-restart	KEYWORD2
-restartDelayed	KEYWORD2
-disable	KEYWORD2
-isEnabled	KEYWORD2
-set	KEYWORD2
-setInterval	KEYWORD2
+getControlPoint	KEYWORD2
+getCount	KEYWORD2
+getCount	KEYWORD2
+getId	KEYWORD2
+getInternalStatusRequest	KEYWORD2
 getInterval	KEYWORD2
-setIterations	KEYWORD2
 getIterations	KEYWORD2
-getRunCounter	KEYWORD2
-setCallback	KEYWORD2
-setOnEnable	KEYWORD2
-setOnDisable	KEYWORD2
-disableOnLastIteration	KEYWORD2
-yield	KEYWORD2
-yieldOnce	KEYWORD2
-getInternalStatusRequest	KEYWORD2
-getCount	KEYWORD2
+getLtsPointer	KEYWORD2
 getOverrun	KEYWORD2
+getRunCounter	KEYWORD2
 getStartDelay	KEYWORD2
+getStatus	KEYWORD2
+getStatusRequest	KEYWORD2
+getTimeout	KEYWORD2
+init	KEYWORD2
+isEnabled	KEYWORD2
 isFirstIteration	KEYWORD2
 isLastIteration	KEYWORD2
-setWaiting	KEYWORD2
-signal	KEYWORD2
-signalComplete	KEYWORD2
+isOverrun	KEYWORD2
+OnDisable	KEYWORD2
+OnEnable	KEYWORD2
 pending	KEYWORD2
-completed	KEYWORD2
-getStatus	KEYWORD2
-waitFor	KEYWORD2
-waitForDelayed	KEYWORD2
-getStatusRequest	KEYWORD2
-getCount	KEYWORD2
-setId	KEYWORD2
-getId	KEYWORD2
+resetTimeout	KEYWORD2
+restart	KEYWORD2
+restartDelayed	KEYWORD2
+set	KEYWORD2
+setCallback	KEYWORD2
 setControlPoint	KEYWORD2
-getControlPoint	KEYWORD2
-setLtsPointer	KEYWORD2
-getLtsPointer	KEYWORD2
-isOverrun	KEYWORD2
 setHighPriorityScheduler	KEYWORD2
-currentScheduler	KEYWORD2
+setId	KEYWORD2
+setInterval	KEYWORD2
+setIterations	KEYWORD2
+setLtsPointer	KEYWORD2
+setOnDisable	KEYWORD2
+setOnEnable	KEYWORD2
+setSleepMethod	KEYWORD2
 setTimeout	KEYWORD2
-resetTimeout	KEYWORD2
-getTimeout	KEYWORD2
-untilTimeout	KEYWORD2
+setWaiting	KEYWORD2
+signal	KEYWORD2
+signalComplete	KEYWORD2
+startNow	KEYWORD2
 timedOut	KEYWORD2
-Callback	KEYWORD2
-OnEnable	KEYWORD2
-OnDisable	KEYWORD2
+timeUntilNextIteration	KEYWORD2
+untilTimeout	KEYWORD2
+waitFor	KEYWORD2
+waitForDelayed	KEYWORD2
+yield	KEYWORD2
+yieldOnce	KEYWORD2
+
 #######################################
 # Constants (LITERAL1)
-TASK_MILLISECOND	LITERAL1
-TASK_SECOND	LITERAL1
-TASK_MINUTE	LITERAL1
-TASK_HOUR	LITERAL1
-TASK_FOREVER	LITERAL1
-TASK_IMMEDIATE	LITERAL1
-TASK_ONCE	LITERAL1
-TASK_NOTIMEOUT	LITERAL1
-_TASK_TIMECRITICAL	LITERAL1
-_TASK_SLEEP_ON_IDLE_RUN	LITERAL1
-_TASK_STATUS_REQUEST	LITERAL1
-_TASK_WDT_IDS	LITERAL1
+
+_TASK_DEBUG	LITERAL1
+_TASK_INLINE	LITERAL1
 _TASK_LTS_POINTER	LITERAL1
-_TASK_PRIORITY	LITERAL1
 _TASK_MICRO_RES	LITERAL1
+_TASK_OO_CALLBACKS	LITERAL1
+_TASK_PRIORITY	LITERAL1
+_TASK_SLEEP_ON_IDLE_RUN	LITERAL1
+_TASK_STATUS_REQUEST	LITERAL1
 _TASK_STD_FUNCTION	LITERAL1
-_TASK_DEBUG	LITERAL1
-_TASK_INLINE	LITERAL1
+_TASK_TIMECRITICAL	LITERAL1
 _TASK_TIMEOUT	LITERAL1
-_TASK_OO_CALLBACKS	LITERAL1
+_TASK_WDT_IDS	LITERAL1
+SleepCallback	LITERAL1
+TASK_FOREVER	LITERAL1
+TASK_HOUR	LITERAL1
+TASK_IMMEDIATE	LITERAL1
+TASK_MILLISECOND	LITERAL1
+TASK_MINUTE	LITERAL1
+TASK_NOTIMEOUT	LITERAL1
+TASK_ONCE	LITERAL1
+TASK_SECOND	LITERAL1
 TaskCallback	LITERAL1
 TaskOnDisable	LITERAL1
 TaskOnEnable	LITERAL1
+
+
 #######################################
 

+ 2 - 2
library.json

@@ -1,7 +1,7 @@
 {
   "name": "TaskScheduler",
   "keywords": "multitasking, cooperative, event, task, taskscheduler, scheduling",
-  "description": "Cooperative multitasking for Arduino and ESP8266 microcontrollers",
+  "description": "Cooperative multitasking for Arduino, ESPx, STM32 and other microcontrollers",
   "repository":
   {
     "type": "git",
@@ -16,7 +16,7 @@
       "maintainer": true
     }
   ],
-  "version": "3.0.2",
+  "version": "3.0.3",
   "frameworks": "arduino",
   "platforms": "*"
 }

+ 2 - 2
library.properties

@@ -1,8 +1,8 @@
 name=TaskScheduler
-version=3.0.2
+version=3.0.3
 author=Anatoli Arkhipenko <arkhipenko@hotmail.com>
 maintainer=Anatoli Arkhipenko <arkhipenko@hotmail.com>
-sentence=A light-weight cooperative multitasking library for arduino and esp8266 microcontrollers.
+sentence=Cooperative multitasking for Arduino, ESPx, STM32 and other microcontrollers.
 paragraph=Supports: periodic task execution (with dynamic execution period in milliseconds or microseconds – frequency of execution), number of iterations (limited or infinite number of iterations), execution of tasks in predefined sequence, dynamic change of task execution parameters (frequency, number of iterations, callback methods), power saving via entering IDLE sleep mode when tasks are not scheduled to run, event-driven task invocation via Status Request object, task IDs and Control Points for error handling and watchdog timer, Local Task Storage pointer (allowing use of same callback code for multiple tasks), layered task prioritization, std::functions (esp8266, esp32 only), overall task timeout, static and dynamic callback method binding.
 category=Timing
 url=https://github.com/arkhipenko/TaskScheduler.git

+ 6 - 0
src/TaskScheduler.h

@@ -145,6 +145,12 @@
 //
 // v3.0.2:
 //    2018-11-11 - bug: default constructor is ambiguous when Status Request objects are enabled (github issue #65 & #68)
+//
+// v3.0.3:
+//    2019-06-13 - feature: custom sleep callback method: setSleepMethod() - ability to dynamically control idle sleep for various microcontrollers
+//               - feature: support for MSP430 and MSP432 boards (pull request #75: big thanks to Guillaume Pirou, https://github.com/elominp)
+//               - officially discontinued support for offile documentation in favor of updating the Wiki pages
+
 
 #include <Arduino.h>
 #include "TaskSchedulerDeclarations.h"

+ 1 - 1
src/TaskSchedulerDeclarations.h

@@ -264,7 +264,7 @@ class Task {
 
 #ifdef _TASK_TIMEOUT
 	unsigned long            iTimeout;				 // Task overall timeout
-	unsigned long 			 iStarttime;			 // millis at task start time
+	unsigned long 		 iStarttime;			 // millis at task start time
 #endif // _TASK_TIMEOUT
 };