Blynk library for embedded hardware. Works with Arduino, ESP8266, Raspberry Pi, Intel Edison/Galileo, LinkIt ONE, Particle Core/Photon, Energia, ARM mbed, etc. http://www.blynk.cc/

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
diff -r fd9a3d7ddadb -r e1d3971fd902 Blynk/BlynkApi.h
--- 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
diff -r fd9a3d7ddadb -r e1d3971fd902 Blynk/BlynkDebug.h
--- 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();
diff -r fd9a3d7ddadb -r e1d3971fd902 utility/BlynkDebug.cpp
--- 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();