Volodymyr Shymanskyy / Blynk Featured

Dependents:   Blynk_RBL_BLE_Nano Blynk_MicroBit Blynk_Serial Blynk_RBL_BLE_Nano

Files at this revision

API Documentation at this revision

Comitter:
vshymanskyy
Date:
Fri Jan 26 22:18:19 2018 +0000
Parent:
21:fd9a3d7ddadb
Commit message:
Fix BlynkSystemInit for MBED

Changed in this revision

Blynk/BlynkApi.h Show annotated file Show diff for this revision Revisions of this file
Blynk/BlynkDebug.h Show annotated file Show diff for this revision Revisions of this file
utility/BlynkDebug.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Blynk/BlynkApi.h	Thu Dec 21 14:34:46 2017 +0200
+++ b/Blynk/BlynkApi.h	Fri Jan 26 22:18:19 2018 +0000
@@ -25,11 +25,13 @@
 /**
  * Represents high-level functions of Blynk
  */
+ 
 template <class Proto>
 class BlynkApi
 {
 public:
     BlynkApi() {
+        BlynkSystemInit();
     }
 
 #ifdef DOXYGEN // These API here are only for the documentation
--- a/Blynk/BlynkDebug.h	Thu Dec 21 14:34:46 2017 +0200
+++ b/Blynk/BlynkDebug.h	Fri Jan 26 22:18:19 2018 +0000
@@ -30,6 +30,7 @@
     typedef uint32_t millis_time_t;
 #endif
 
+void            BlynkSystemInit();
 void            BlynkDelay(millis_time_t ms);
 millis_time_t   BlynkMillis();
 size_t          BlynkFreeRam();
--- a/utility/BlynkDebug.cpp	Thu Dec 21 14:34:46 2017 +0200
+++ b/utility/BlynkDebug.cpp	Fri Jan 26 22:18:19 2018 +0000
@@ -153,8 +153,8 @@
         //pc.puts("(...)");
     }
 
-    BLYNK_CONSTRUCTOR
-    static void BlynkSystemInit()
+    //BLYNK_CONSTRUCTOR
+    void BlynkSystemInit()
     {
         blynk_waker.attach(&blynk_wake, 2.0);
         blynk_millis_timer.start();