فهرست منبع

v2.5.2 - add _TASK_BARE_METAL
* added compilation directive for bare method implementations:
forward definition of certain arduino-specific methods, like millis()

Anatoli Arkhipenko 8 سال پیش
والد
کامیت
21b1835b38
4فایلهای تغییر یافته به همراه15 افزوده شده و 4 حذف شده
  1. 3 0
      README
  2. 1 0
      keywords.txt
  3. 3 3
      src/TaskScheduler.h
  4. 8 1
      src/TaskSchedulerDeclarations.h

+ 3 - 0
README

@@ -80,7 +80,10 @@ Check out what TaskScheduler can do:
 Changelog:
 =========
 v2.5.2:
+
    2018-01-09 - _TASK_INLINE compilation directive making all methods declared "inline" (issue #42)
+   2018-01-10 - _TASK_BARE_METAL compilation directive. Forward definition of arduino specific methods 
+                for bare metal implementations
 
 v2.5.1:
    2018-01-06 - support for IDLE sleep on Teensy boards (tested on Teensy 3.6)

+ 1 - 0
keywords.txt

@@ -90,6 +90,7 @@ _TASK_MICRO_RES	LITERAL1
 _TASK_STD_FUNCTION	LITERAL1
 _TASK_DEBUG	LITERAL1
 _TASK_INLINE	LITERAL1
+_TASK_BARE_METAL	LITERAL1
 TaskCallback	LITERAL1
 TaskOnDisable	LITERAL1
 TaskOnEnable	LITERAL1

+ 3 - 3
src/TaskScheduler.h

@@ -125,7 +125,8 @@
 //
 // v2.5.2:
 //    2018-01-09 - _TASK_INLINE compilation directive making all methods declared "inline" (issue #42)
-
+//    2018-01-10 - _TASK_BARE_METAL compilation directive. Forward definition of arduino specific methods 
+//                 for bare metal implementations
 
 
 #include <Arduino.h>
@@ -148,8 +149,7 @@
 // #define _TASK_STD_FUNCTION      // Support for std::function (ESP8266 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_BARE_METAL        // Add declarations of a few arduino-specifc methods 
 
  #ifdef _TASK_MICRO_RES
  

+ 8 - 1
src/TaskSchedulerDeclarations.h

@@ -21,7 +21,7 @@
 // #define _TASK_STD_FUNCTION      // Support for std::function (ESP8266 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_BARE_METAL        // Add declarations of a few arduino-specifc methods 
 
 #ifdef _TASK_DEBUG
     #define _TASK_SCOPE  public
@@ -38,6 +38,13 @@
     extern Scheduler* iCurrentScheduler;
 #endif // _TASK_PRIORITY
 
+#ifdef _TASK_BARE_METAL
+	extern unsigned long micros(void);
+	extern unsigned long millis(void);
+	extern void yield(void);
+	extern void delay(unsigned long);
+#endif
+
 
 #ifdef _TASK_INLINE	
 #define INLINE	inline