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:
7:8879692d4e6c
Parent:
3:31e4b850b126
Child:
9:7369ec77a3ea
--- a/Blynk/BlynkHandlers.h	Thu Jun 23 23:00:40 2016 +0000
+++ b/Blynk/BlynkHandlers.h	Wed Oct 12 09:18:39 2016 +0300
@@ -152,10 +152,10 @@
 
 // Initial syntax:
 #define BLYNK_WRITE_2(pin) \
-    void BlynkWidgetWrite ## pin (BlynkReq& request, const BlynkParam& param)
+    void BlynkWidgetWrite ## pin (BlynkReq BLYNK_UNUSED &request, const BlynkParam BLYNK_UNUSED &param)
 
 #define BLYNK_READ_2(pin)  \
-    void BlynkWidgetRead ## pin  (BlynkReq& request)
+    void BlynkWidgetRead ## pin  (BlynkReq BLYNK_UNUSED &request)
 
 #define BLYNK_WRITE_DEFAULT() BLYNK_WRITE_2(Default)
 #define BLYNK_READ_DEFAULT()  BLYNK_READ_2(Default)
@@ -165,16 +165,16 @@
 
 // New, more readable syntax:
 #define BLYNK_IN_2(pin)  \
-    void BlynkWidgetWrite ## pin (BlynkReq& request, const BlynkParam& getValue)
+    void BlynkWidgetWrite ## pin (BlynkReq BLYNK_UNUSED &request, const BlynkParam BLYNK_UNUSED &getValue)
 
 #define BLYNK_OUT_2(pin) \
-    void BlynkWidgetRead ## pin  (BlynkReq& request)
+    void BlynkWidgetRead ## pin  (BlynkReq BLYNK_UNUSED &request)
 
-#define BLYNK_IN_DEFAULT()   BLYNK_IN_2(Default)
-#define BLYNK_OUT_DEFAULT()  BLYNK_OUT_2(Default)
+#define BLYNK_INPUT_DEFAULT()   BLYNK_IN_2(Default)
+#define BLYNK_OUTPUT_DEFAULT()  BLYNK_OUT_2(Default)
 
-#define BLYNK_IN(pin)        BLYNK_IN_2(pin)
-#define BLYNK_OUT(pin)       BLYNK_OUT_2(pin)
+#define BLYNK_INPUT(pin)        BLYNK_IN_2(pin)
+#define BLYNK_OUTPUT(pin)       BLYNK_OUT_2(pin)
 
 // Additional handlers
 #define BLYNK_CONNECTED()    void BlynkOnConnected()
@@ -192,7 +192,7 @@
 
 // Could use __attribute__ ((constructor)), but hope for better portability
 #define BLYNK_ATTACH_WIDGET(widget, pin)	\
-	static BlynkAttachWidgetHelper BLYNK_CONCAT2(blnk_widget_helper_, __COUNTER__)((widget), (pin)); \
+	BlynkAttachWidgetHelper BLYNK_CONCAT2(blnk_widget_helper_, __COUNTER__)((widget), (pin)); \
     BLYNK_WRITE(pin) { (widget).onWrite(request, param); }
 
 #define BLYNK_VAR_INT(name, pin)	int name;  \
@@ -225,8 +225,8 @@
     uint8_t pin;
 };
 
-typedef void (*WidgetReadHandler)(BlynkReq& request);
-typedef void (*WidgetWriteHandler)(BlynkReq& request, const BlynkParam& param);
+typedef void (*WidgetReadHandler)(BlynkReq BLYNK_UNUSED &request);
+typedef void (*WidgetWriteHandler)(BlynkReq BLYNK_UNUSED &request, const BlynkParam BLYNK_UNUSED &param);
 
 WidgetReadHandler GetReadHandler(uint8_t pin);
 WidgetWriteHandler GetWriteHandler(uint8_t pin);