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

Revision:
9:7369ec77a3ea
Parent:
7:8879692d4e6c
Child:
13:ed6276c0afb7
--- a/Blynk/BlynkDebug.h	Wed Oct 12 10:38:37 2016 +0300
+++ b/Blynk/BlynkDebug.h	Thu Jan 05 14:55:36 2017 +0200
@@ -35,9 +35,9 @@
 
 #if defined(ARDUINO)
     #if ARDUINO >= 100
-        #include "Arduino.h"
+        #include <Arduino.h>
     #else
-        #include "WProgram.h"
+        #include <WProgram.h>
     #endif
 #endif
 
@@ -45,17 +45,15 @@
     #define BLYNK_NO_YIELD
 #endif
 
-// General defines
-
-#define STRINGIFY(x) #x
-#define TOSTRING(x) STRINGIFY(x)
-#define COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
-#define BLYNK_ATTR_PACKED __attribute__ ((__packed__))
-#define BLYNK_NORETURN __attribute__ ((noreturn))
-#define BLYNK_UNUSED __attribute__((__unused__))
-
-// Causes problems on some platforms
-#define BLYNK_FORCE_INLINE inline //__attribute__((always_inline))
+#if !defined(BLYNK_RUN_YIELD)
+    #if defined(BLYNK_NO_YIELD)
+        #define BLYNK_RUN_YIELD() {}
+    #elif defined(SPARK) || defined(PARTICLE)
+        #define BLYNK_RUN_YIELD() { Particle.process(); }
+    #else
+        #define BLYNK_RUN_YIELD() { ::delay(0); }
+    #endif
+#endif
 
 #if defined(__AVR__)
     #include <avr/pgmspace.h>
@@ -69,8 +67,12 @@
     #define BLYNK_PSTR(s) s
 #endif
 
-#ifndef LED_BUILTIN
-# define LED_BUILTIN 2
+#ifdef ARDUINO_AVR_DIGISPARK
+    typedef fstr_t __FlashStringHelper;
+#endif
+
+#if defined(BLYNK_DEBUG_ALL) && !(__cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__))
+    #warning "Compiler features not enabled -> please contact yor board vendor to enable c++0x"
 #endif
 
 // Diagnostic defines
@@ -148,8 +150,9 @@
                         prev_print = false;
                     }
                 }
-                if (!prev_print)
-                	BLYNK_PRINT.print(']');
+                if (!prev_print) {
+                    BLYNK_PRINT.print(']');
+                }
                 BLYNK_PRINT.println();
             }
         }
@@ -178,9 +181,9 @@
         }
         #endif // ARDUINO_ARCH_ARC32
 
-	#elif defined(MBED_LIBRARY_VERSION)
-	    
-	    //TODO
+    #elif defined(MBED_LIBRARY_VERSION)
+
+        //TODO
 
     #elif defined(LINUX)
 
@@ -230,7 +233,7 @@
 
     #else
 
-        #warning Could not detect platform
+        #warning "Cannot detect platform"
 
     #endif