blynk & neopixelring & w7500

Fork of WIZwiki-7500_Blynk by IOP

Committer:
jcm931213
Date:
Mon Nov 27 11:49:08 2017 +0000
Revision:
18:bc3d69c01bf2
Parent:
10:c241e4227173
NeoPixel Ring Blynk Example final!!!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vshymanskyy 0:58b20b438383 1 /**
vshymanskyy 0:58b20b438383 2 * @file BlynkHandlers.cpp
vshymanskyy 0:58b20b438383 3 * @author Volodymyr Shymanskyy
vshymanskyy 0:58b20b438383 4 * @license This project is released under the MIT License (MIT)
vshymanskyy 0:58b20b438383 5 * @copyright Copyright (c) 2015 Volodymyr Shymanskyy
vshymanskyy 0:58b20b438383 6 * @date Jan 2015
vshymanskyy 0:58b20b438383 7 * @brief Virtual pin utilities
vshymanskyy 0:58b20b438383 8 */
vshymanskyy 0:58b20b438383 9
vshymanskyy 0:58b20b438383 10 #include <Blynk/BlynkConfig.h>
vshymanskyy 0:58b20b438383 11 #include <Blynk/BlynkHandlers.h>
vshymanskyy 0:58b20b438383 12 #include <Blynk/BlynkDebug.h>
vshymanskyy 0:58b20b438383 13
vshymanskyy 0:58b20b438383 14 void BlynkNoOpCbk()
vshymanskyy 0:58b20b438383 15 {}
vshymanskyy 0:58b20b438383 16
Volodymyr Shymanskyy 7:8879692d4e6c 17 void BlynkWidgetRead(BlynkReq BLYNK_UNUSED &request)
vshymanskyy 0:58b20b438383 18 {
vshymanskyy 0:58b20b438383 19 BLYNK_LOG2(BLYNK_F("No handler for reading from pin "), request.pin);
vshymanskyy 0:58b20b438383 20 }
vshymanskyy 0:58b20b438383 21
Volodymyr Shymanskyy 7:8879692d4e6c 22 void BlynkWidgetWrite(BlynkReq BLYNK_UNUSED &request, const BlynkParam BLYNK_UNUSED &param)
vshymanskyy 0:58b20b438383 23 {
vshymanskyy 0:58b20b438383 24 BLYNK_LOG2(BLYNK_F("No handler for writing to pin "), request.pin);
vshymanskyy 0:58b20b438383 25 }
vshymanskyy 0:58b20b438383 26
Volodymyr Shymanskyy 7:8879692d4e6c 27 #define BLYNK_ON_READ_IMPL(pin) void BlynkWidgetRead ## pin (BlynkReq BLYNK_UNUSED &req) \
vshymanskyy 0:58b20b438383 28 __attribute__((weak, alias("BlynkWidgetRead")))
vshymanskyy 0:58b20b438383 29
Volodymyr Shymanskyy 7:8879692d4e6c 30 #define BLYNK_ON_WRITE_IMPL(pin) void BlynkWidgetWrite ## pin (BlynkReq BLYNK_UNUSED &req, const BlynkParam BLYNK_UNUSED &param) \
vshymanskyy 0:58b20b438383 31 __attribute__((weak, alias("BlynkWidgetWrite")))
vshymanskyy 0:58b20b438383 32
vshymanskyy 0:58b20b438383 33 BLYNK_CONNECTED() __attribute__((weak, alias("BlynkNoOpCbk")));
vshymanskyy 0:58b20b438383 34 BLYNK_DISCONNECTED() __attribute__((weak, alias("BlynkNoOpCbk")));
vshymanskyy 0:58b20b438383 35
Volodymyr Shymanskyy 10:c241e4227173 36 // Internal Virtual Pins
Volodymyr Shymanskyy 10:c241e4227173 37 BLYNK_ON_WRITE_IMPL(InternalPinACON);
Volodymyr Shymanskyy 10:c241e4227173 38 BLYNK_ON_WRITE_IMPL(InternalPinADIS);
Volodymyr Shymanskyy 10:c241e4227173 39 BLYNK_ON_WRITE_IMPL(InternalPinRTC);
Volodymyr Shymanskyy 10:c241e4227173 40 BLYNK_ON_WRITE_IMPL(InternalPinOTA);
Volodymyr Shymanskyy 9:7369ec77a3ea 41
Volodymyr Shymanskyy 10:c241e4227173 42 // Regular Virtual Pins
vshymanskyy 0:58b20b438383 43 BLYNK_ON_READ_IMPL(Default);
vshymanskyy 0:58b20b438383 44 BLYNK_ON_WRITE_IMPL(Default);
vshymanskyy 0:58b20b438383 45
vshymanskyy 0:58b20b438383 46 BLYNK_ON_READ_IMPL(0 );
vshymanskyy 0:58b20b438383 47 BLYNK_ON_READ_IMPL(1 );
vshymanskyy 0:58b20b438383 48 BLYNK_ON_READ_IMPL(2 );
vshymanskyy 0:58b20b438383 49 BLYNK_ON_READ_IMPL(3 );
vshymanskyy 0:58b20b438383 50 BLYNK_ON_READ_IMPL(4 );
vshymanskyy 0:58b20b438383 51 BLYNK_ON_READ_IMPL(5 );
vshymanskyy 0:58b20b438383 52 BLYNK_ON_READ_IMPL(6 );
vshymanskyy 0:58b20b438383 53 BLYNK_ON_READ_IMPL(7 );
vshymanskyy 0:58b20b438383 54 BLYNK_ON_READ_IMPL(8 );
vshymanskyy 0:58b20b438383 55 BLYNK_ON_READ_IMPL(9 );
vshymanskyy 0:58b20b438383 56 BLYNK_ON_READ_IMPL(10);
vshymanskyy 0:58b20b438383 57 BLYNK_ON_READ_IMPL(11);
vshymanskyy 0:58b20b438383 58 BLYNK_ON_READ_IMPL(12);
vshymanskyy 0:58b20b438383 59 BLYNK_ON_READ_IMPL(13);
vshymanskyy 0:58b20b438383 60 BLYNK_ON_READ_IMPL(14);
vshymanskyy 0:58b20b438383 61 BLYNK_ON_READ_IMPL(15);
vshymanskyy 0:58b20b438383 62 BLYNK_ON_READ_IMPL(16);
vshymanskyy 0:58b20b438383 63 BLYNK_ON_READ_IMPL(17);
vshymanskyy 0:58b20b438383 64 BLYNK_ON_READ_IMPL(18);
vshymanskyy 0:58b20b438383 65 BLYNK_ON_READ_IMPL(19);
vshymanskyy 0:58b20b438383 66 BLYNK_ON_READ_IMPL(20);
vshymanskyy 0:58b20b438383 67 BLYNK_ON_READ_IMPL(21);
vshymanskyy 0:58b20b438383 68 BLYNK_ON_READ_IMPL(22);
vshymanskyy 0:58b20b438383 69 BLYNK_ON_READ_IMPL(23);
vshymanskyy 0:58b20b438383 70 BLYNK_ON_READ_IMPL(24);
vshymanskyy 0:58b20b438383 71 BLYNK_ON_READ_IMPL(25);
vshymanskyy 0:58b20b438383 72 BLYNK_ON_READ_IMPL(26);
vshymanskyy 0:58b20b438383 73 BLYNK_ON_READ_IMPL(27);
vshymanskyy 0:58b20b438383 74 BLYNK_ON_READ_IMPL(28);
vshymanskyy 0:58b20b438383 75 BLYNK_ON_READ_IMPL(29);
vshymanskyy 0:58b20b438383 76 BLYNK_ON_READ_IMPL(30);
vshymanskyy 0:58b20b438383 77 BLYNK_ON_READ_IMPL(31);
Volodymyr Shymanskyy 3:31e4b850b126 78 #ifdef BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 3:31e4b850b126 79 BLYNK_ON_READ_IMPL(32);
Volodymyr Shymanskyy 3:31e4b850b126 80 BLYNK_ON_READ_IMPL(33);
Volodymyr Shymanskyy 3:31e4b850b126 81 BLYNK_ON_READ_IMPL(34);
Volodymyr Shymanskyy 3:31e4b850b126 82 BLYNK_ON_READ_IMPL(35);
Volodymyr Shymanskyy 3:31e4b850b126 83 BLYNK_ON_READ_IMPL(36);
Volodymyr Shymanskyy 3:31e4b850b126 84 BLYNK_ON_READ_IMPL(37);
Volodymyr Shymanskyy 3:31e4b850b126 85 BLYNK_ON_READ_IMPL(38);
Volodymyr Shymanskyy 3:31e4b850b126 86 BLYNK_ON_READ_IMPL(39);
Volodymyr Shymanskyy 3:31e4b850b126 87 BLYNK_ON_READ_IMPL(40);
Volodymyr Shymanskyy 3:31e4b850b126 88 BLYNK_ON_READ_IMPL(41);
Volodymyr Shymanskyy 3:31e4b850b126 89 BLYNK_ON_READ_IMPL(42);
Volodymyr Shymanskyy 3:31e4b850b126 90 BLYNK_ON_READ_IMPL(43);
Volodymyr Shymanskyy 3:31e4b850b126 91 BLYNK_ON_READ_IMPL(44);
Volodymyr Shymanskyy 3:31e4b850b126 92 BLYNK_ON_READ_IMPL(45);
Volodymyr Shymanskyy 3:31e4b850b126 93 BLYNK_ON_READ_IMPL(46);
Volodymyr Shymanskyy 3:31e4b850b126 94 BLYNK_ON_READ_IMPL(47);
Volodymyr Shymanskyy 3:31e4b850b126 95 BLYNK_ON_READ_IMPL(48);
Volodymyr Shymanskyy 3:31e4b850b126 96 BLYNK_ON_READ_IMPL(49);
Volodymyr Shymanskyy 3:31e4b850b126 97 BLYNK_ON_READ_IMPL(50);
Volodymyr Shymanskyy 3:31e4b850b126 98 BLYNK_ON_READ_IMPL(51);
Volodymyr Shymanskyy 3:31e4b850b126 99 BLYNK_ON_READ_IMPL(52);
Volodymyr Shymanskyy 3:31e4b850b126 100 BLYNK_ON_READ_IMPL(53);
Volodymyr Shymanskyy 3:31e4b850b126 101 BLYNK_ON_READ_IMPL(54);
Volodymyr Shymanskyy 3:31e4b850b126 102 BLYNK_ON_READ_IMPL(55);
Volodymyr Shymanskyy 3:31e4b850b126 103 BLYNK_ON_READ_IMPL(56);
Volodymyr Shymanskyy 3:31e4b850b126 104 BLYNK_ON_READ_IMPL(57);
Volodymyr Shymanskyy 3:31e4b850b126 105 BLYNK_ON_READ_IMPL(58);
Volodymyr Shymanskyy 3:31e4b850b126 106 BLYNK_ON_READ_IMPL(59);
Volodymyr Shymanskyy 3:31e4b850b126 107 BLYNK_ON_READ_IMPL(60);
Volodymyr Shymanskyy 3:31e4b850b126 108 BLYNK_ON_READ_IMPL(61);
Volodymyr Shymanskyy 3:31e4b850b126 109 BLYNK_ON_READ_IMPL(62);
Volodymyr Shymanskyy 3:31e4b850b126 110 BLYNK_ON_READ_IMPL(63);
Volodymyr Shymanskyy 3:31e4b850b126 111 BLYNK_ON_READ_IMPL(64);
Volodymyr Shymanskyy 3:31e4b850b126 112 BLYNK_ON_READ_IMPL(65);
Volodymyr Shymanskyy 3:31e4b850b126 113 BLYNK_ON_READ_IMPL(66);
Volodymyr Shymanskyy 3:31e4b850b126 114 BLYNK_ON_READ_IMPL(67);
Volodymyr Shymanskyy 3:31e4b850b126 115 BLYNK_ON_READ_IMPL(68);
Volodymyr Shymanskyy 3:31e4b850b126 116 BLYNK_ON_READ_IMPL(69);
Volodymyr Shymanskyy 3:31e4b850b126 117 BLYNK_ON_READ_IMPL(70);
Volodymyr Shymanskyy 3:31e4b850b126 118 BLYNK_ON_READ_IMPL(71);
Volodymyr Shymanskyy 3:31e4b850b126 119 BLYNK_ON_READ_IMPL(72);
Volodymyr Shymanskyy 3:31e4b850b126 120 BLYNK_ON_READ_IMPL(73);
Volodymyr Shymanskyy 3:31e4b850b126 121 BLYNK_ON_READ_IMPL(74);
Volodymyr Shymanskyy 3:31e4b850b126 122 BLYNK_ON_READ_IMPL(75);
Volodymyr Shymanskyy 3:31e4b850b126 123 BLYNK_ON_READ_IMPL(76);
Volodymyr Shymanskyy 3:31e4b850b126 124 BLYNK_ON_READ_IMPL(77);
Volodymyr Shymanskyy 3:31e4b850b126 125 BLYNK_ON_READ_IMPL(78);
Volodymyr Shymanskyy 3:31e4b850b126 126 BLYNK_ON_READ_IMPL(79);
Volodymyr Shymanskyy 3:31e4b850b126 127 BLYNK_ON_READ_IMPL(80);
Volodymyr Shymanskyy 3:31e4b850b126 128 BLYNK_ON_READ_IMPL(81);
Volodymyr Shymanskyy 3:31e4b850b126 129 BLYNK_ON_READ_IMPL(82);
Volodymyr Shymanskyy 3:31e4b850b126 130 BLYNK_ON_READ_IMPL(83);
Volodymyr Shymanskyy 3:31e4b850b126 131 BLYNK_ON_READ_IMPL(84);
Volodymyr Shymanskyy 3:31e4b850b126 132 BLYNK_ON_READ_IMPL(85);
Volodymyr Shymanskyy 3:31e4b850b126 133 BLYNK_ON_READ_IMPL(86);
Volodymyr Shymanskyy 3:31e4b850b126 134 BLYNK_ON_READ_IMPL(87);
Volodymyr Shymanskyy 3:31e4b850b126 135 BLYNK_ON_READ_IMPL(88);
Volodymyr Shymanskyy 3:31e4b850b126 136 BLYNK_ON_READ_IMPL(89);
Volodymyr Shymanskyy 3:31e4b850b126 137 BLYNK_ON_READ_IMPL(90);
Volodymyr Shymanskyy 3:31e4b850b126 138 BLYNK_ON_READ_IMPL(91);
Volodymyr Shymanskyy 3:31e4b850b126 139 BLYNK_ON_READ_IMPL(92);
Volodymyr Shymanskyy 3:31e4b850b126 140 BLYNK_ON_READ_IMPL(93);
Volodymyr Shymanskyy 3:31e4b850b126 141 BLYNK_ON_READ_IMPL(94);
Volodymyr Shymanskyy 3:31e4b850b126 142 BLYNK_ON_READ_IMPL(95);
Volodymyr Shymanskyy 3:31e4b850b126 143 BLYNK_ON_READ_IMPL(96);
Volodymyr Shymanskyy 3:31e4b850b126 144 BLYNK_ON_READ_IMPL(97);
Volodymyr Shymanskyy 3:31e4b850b126 145 BLYNK_ON_READ_IMPL(98);
Volodymyr Shymanskyy 3:31e4b850b126 146 BLYNK_ON_READ_IMPL(99);
Volodymyr Shymanskyy 3:31e4b850b126 147 BLYNK_ON_READ_IMPL(100);
Volodymyr Shymanskyy 3:31e4b850b126 148 BLYNK_ON_READ_IMPL(101);
Volodymyr Shymanskyy 3:31e4b850b126 149 BLYNK_ON_READ_IMPL(102);
Volodymyr Shymanskyy 3:31e4b850b126 150 BLYNK_ON_READ_IMPL(103);
Volodymyr Shymanskyy 3:31e4b850b126 151 BLYNK_ON_READ_IMPL(104);
Volodymyr Shymanskyy 3:31e4b850b126 152 BLYNK_ON_READ_IMPL(105);
Volodymyr Shymanskyy 3:31e4b850b126 153 BLYNK_ON_READ_IMPL(106);
Volodymyr Shymanskyy 3:31e4b850b126 154 BLYNK_ON_READ_IMPL(107);
Volodymyr Shymanskyy 3:31e4b850b126 155 BLYNK_ON_READ_IMPL(108);
Volodymyr Shymanskyy 3:31e4b850b126 156 BLYNK_ON_READ_IMPL(109);
Volodymyr Shymanskyy 3:31e4b850b126 157 BLYNK_ON_READ_IMPL(110);
Volodymyr Shymanskyy 3:31e4b850b126 158 BLYNK_ON_READ_IMPL(111);
Volodymyr Shymanskyy 3:31e4b850b126 159 BLYNK_ON_READ_IMPL(112);
Volodymyr Shymanskyy 3:31e4b850b126 160 BLYNK_ON_READ_IMPL(113);
Volodymyr Shymanskyy 3:31e4b850b126 161 BLYNK_ON_READ_IMPL(114);
Volodymyr Shymanskyy 3:31e4b850b126 162 BLYNK_ON_READ_IMPL(115);
Volodymyr Shymanskyy 3:31e4b850b126 163 BLYNK_ON_READ_IMPL(116);
Volodymyr Shymanskyy 3:31e4b850b126 164 BLYNK_ON_READ_IMPL(117);
Volodymyr Shymanskyy 3:31e4b850b126 165 BLYNK_ON_READ_IMPL(118);
Volodymyr Shymanskyy 3:31e4b850b126 166 BLYNK_ON_READ_IMPL(119);
Volodymyr Shymanskyy 3:31e4b850b126 167 BLYNK_ON_READ_IMPL(120);
Volodymyr Shymanskyy 3:31e4b850b126 168 BLYNK_ON_READ_IMPL(121);
Volodymyr Shymanskyy 3:31e4b850b126 169 BLYNK_ON_READ_IMPL(122);
Volodymyr Shymanskyy 3:31e4b850b126 170 BLYNK_ON_READ_IMPL(123);
Volodymyr Shymanskyy 3:31e4b850b126 171 BLYNK_ON_READ_IMPL(124);
Volodymyr Shymanskyy 3:31e4b850b126 172 BLYNK_ON_READ_IMPL(125);
Volodymyr Shymanskyy 3:31e4b850b126 173 BLYNK_ON_READ_IMPL(126);
Volodymyr Shymanskyy 3:31e4b850b126 174 BLYNK_ON_READ_IMPL(127);
Volodymyr Shymanskyy 3:31e4b850b126 175 #endif
vshymanskyy 0:58b20b438383 176
vshymanskyy 0:58b20b438383 177 BLYNK_ON_WRITE_IMPL(0 );
vshymanskyy 0:58b20b438383 178 BLYNK_ON_WRITE_IMPL(1 );
vshymanskyy 0:58b20b438383 179 BLYNK_ON_WRITE_IMPL(2 );
vshymanskyy 0:58b20b438383 180 BLYNK_ON_WRITE_IMPL(3 );
vshymanskyy 0:58b20b438383 181 BLYNK_ON_WRITE_IMPL(4 );
vshymanskyy 0:58b20b438383 182 BLYNK_ON_WRITE_IMPL(5 );
vshymanskyy 0:58b20b438383 183 BLYNK_ON_WRITE_IMPL(6 );
vshymanskyy 0:58b20b438383 184 BLYNK_ON_WRITE_IMPL(7 );
vshymanskyy 0:58b20b438383 185 BLYNK_ON_WRITE_IMPL(8 );
vshymanskyy 0:58b20b438383 186 BLYNK_ON_WRITE_IMPL(9 );
vshymanskyy 0:58b20b438383 187 BLYNK_ON_WRITE_IMPL(10);
vshymanskyy 0:58b20b438383 188 BLYNK_ON_WRITE_IMPL(11);
vshymanskyy 0:58b20b438383 189 BLYNK_ON_WRITE_IMPL(12);
vshymanskyy 0:58b20b438383 190 BLYNK_ON_WRITE_IMPL(13);
vshymanskyy 0:58b20b438383 191 BLYNK_ON_WRITE_IMPL(14);
vshymanskyy 0:58b20b438383 192 BLYNK_ON_WRITE_IMPL(15);
vshymanskyy 0:58b20b438383 193 BLYNK_ON_WRITE_IMPL(16);
vshymanskyy 0:58b20b438383 194 BLYNK_ON_WRITE_IMPL(17);
vshymanskyy 0:58b20b438383 195 BLYNK_ON_WRITE_IMPL(18);
vshymanskyy 0:58b20b438383 196 BLYNK_ON_WRITE_IMPL(19);
vshymanskyy 0:58b20b438383 197 BLYNK_ON_WRITE_IMPL(20);
vshymanskyy 0:58b20b438383 198 BLYNK_ON_WRITE_IMPL(21);
vshymanskyy 0:58b20b438383 199 BLYNK_ON_WRITE_IMPL(22);
vshymanskyy 0:58b20b438383 200 BLYNK_ON_WRITE_IMPL(23);
vshymanskyy 0:58b20b438383 201 BLYNK_ON_WRITE_IMPL(24);
vshymanskyy 0:58b20b438383 202 BLYNK_ON_WRITE_IMPL(25);
vshymanskyy 0:58b20b438383 203 BLYNK_ON_WRITE_IMPL(26);
vshymanskyy 0:58b20b438383 204 BLYNK_ON_WRITE_IMPL(27);
vshymanskyy 0:58b20b438383 205 BLYNK_ON_WRITE_IMPL(28);
vshymanskyy 0:58b20b438383 206 BLYNK_ON_WRITE_IMPL(29);
vshymanskyy 0:58b20b438383 207 BLYNK_ON_WRITE_IMPL(30);
vshymanskyy 0:58b20b438383 208 BLYNK_ON_WRITE_IMPL(31);
Volodymyr Shymanskyy 3:31e4b850b126 209 #ifdef BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 3:31e4b850b126 210 BLYNK_ON_WRITE_IMPL(32);
Volodymyr Shymanskyy 3:31e4b850b126 211 BLYNK_ON_WRITE_IMPL(33);
Volodymyr Shymanskyy 3:31e4b850b126 212 BLYNK_ON_WRITE_IMPL(34);
Volodymyr Shymanskyy 3:31e4b850b126 213 BLYNK_ON_WRITE_IMPL(35);
Volodymyr Shymanskyy 3:31e4b850b126 214 BLYNK_ON_WRITE_IMPL(36);
Volodymyr Shymanskyy 3:31e4b850b126 215 BLYNK_ON_WRITE_IMPL(37);
Volodymyr Shymanskyy 3:31e4b850b126 216 BLYNK_ON_WRITE_IMPL(38);
Volodymyr Shymanskyy 3:31e4b850b126 217 BLYNK_ON_WRITE_IMPL(39);
Volodymyr Shymanskyy 3:31e4b850b126 218 BLYNK_ON_WRITE_IMPL(40);
Volodymyr Shymanskyy 3:31e4b850b126 219 BLYNK_ON_WRITE_IMPL(41);
Volodymyr Shymanskyy 3:31e4b850b126 220 BLYNK_ON_WRITE_IMPL(42);
Volodymyr Shymanskyy 3:31e4b850b126 221 BLYNK_ON_WRITE_IMPL(43);
Volodymyr Shymanskyy 3:31e4b850b126 222 BLYNK_ON_WRITE_IMPL(44);
Volodymyr Shymanskyy 3:31e4b850b126 223 BLYNK_ON_WRITE_IMPL(45);
Volodymyr Shymanskyy 3:31e4b850b126 224 BLYNK_ON_WRITE_IMPL(46);
Volodymyr Shymanskyy 3:31e4b850b126 225 BLYNK_ON_WRITE_IMPL(47);
Volodymyr Shymanskyy 3:31e4b850b126 226 BLYNK_ON_WRITE_IMPL(48);
Volodymyr Shymanskyy 3:31e4b850b126 227 BLYNK_ON_WRITE_IMPL(49);
Volodymyr Shymanskyy 3:31e4b850b126 228 BLYNK_ON_WRITE_IMPL(50);
Volodymyr Shymanskyy 3:31e4b850b126 229 BLYNK_ON_WRITE_IMPL(51);
Volodymyr Shymanskyy 3:31e4b850b126 230 BLYNK_ON_WRITE_IMPL(52);
Volodymyr Shymanskyy 3:31e4b850b126 231 BLYNK_ON_WRITE_IMPL(53);
Volodymyr Shymanskyy 3:31e4b850b126 232 BLYNK_ON_WRITE_IMPL(54);
Volodymyr Shymanskyy 3:31e4b850b126 233 BLYNK_ON_WRITE_IMPL(55);
Volodymyr Shymanskyy 3:31e4b850b126 234 BLYNK_ON_WRITE_IMPL(56);
Volodymyr Shymanskyy 3:31e4b850b126 235 BLYNK_ON_WRITE_IMPL(57);
Volodymyr Shymanskyy 3:31e4b850b126 236 BLYNK_ON_WRITE_IMPL(58);
Volodymyr Shymanskyy 3:31e4b850b126 237 BLYNK_ON_WRITE_IMPL(59);
Volodymyr Shymanskyy 3:31e4b850b126 238 BLYNK_ON_WRITE_IMPL(60);
Volodymyr Shymanskyy 3:31e4b850b126 239 BLYNK_ON_WRITE_IMPL(61);
Volodymyr Shymanskyy 3:31e4b850b126 240 BLYNK_ON_WRITE_IMPL(62);
Volodymyr Shymanskyy 3:31e4b850b126 241 BLYNK_ON_WRITE_IMPL(63);
Volodymyr Shymanskyy 3:31e4b850b126 242 BLYNK_ON_WRITE_IMPL(64);
Volodymyr Shymanskyy 3:31e4b850b126 243 BLYNK_ON_WRITE_IMPL(65);
Volodymyr Shymanskyy 3:31e4b850b126 244 BLYNK_ON_WRITE_IMPL(66);
Volodymyr Shymanskyy 3:31e4b850b126 245 BLYNK_ON_WRITE_IMPL(67);
Volodymyr Shymanskyy 3:31e4b850b126 246 BLYNK_ON_WRITE_IMPL(68);
Volodymyr Shymanskyy 3:31e4b850b126 247 BLYNK_ON_WRITE_IMPL(69);
Volodymyr Shymanskyy 3:31e4b850b126 248 BLYNK_ON_WRITE_IMPL(70);
Volodymyr Shymanskyy 3:31e4b850b126 249 BLYNK_ON_WRITE_IMPL(71);
Volodymyr Shymanskyy 3:31e4b850b126 250 BLYNK_ON_WRITE_IMPL(72);
Volodymyr Shymanskyy 3:31e4b850b126 251 BLYNK_ON_WRITE_IMPL(73);
Volodymyr Shymanskyy 3:31e4b850b126 252 BLYNK_ON_WRITE_IMPL(74);
Volodymyr Shymanskyy 3:31e4b850b126 253 BLYNK_ON_WRITE_IMPL(75);
Volodymyr Shymanskyy 3:31e4b850b126 254 BLYNK_ON_WRITE_IMPL(76);
Volodymyr Shymanskyy 3:31e4b850b126 255 BLYNK_ON_WRITE_IMPL(77);
Volodymyr Shymanskyy 3:31e4b850b126 256 BLYNK_ON_WRITE_IMPL(78);
Volodymyr Shymanskyy 3:31e4b850b126 257 BLYNK_ON_WRITE_IMPL(79);
Volodymyr Shymanskyy 3:31e4b850b126 258 BLYNK_ON_WRITE_IMPL(80);
Volodymyr Shymanskyy 3:31e4b850b126 259 BLYNK_ON_WRITE_IMPL(81);
Volodymyr Shymanskyy 3:31e4b850b126 260 BLYNK_ON_WRITE_IMPL(82);
Volodymyr Shymanskyy 3:31e4b850b126 261 BLYNK_ON_WRITE_IMPL(83);
Volodymyr Shymanskyy 3:31e4b850b126 262 BLYNK_ON_WRITE_IMPL(84);
Volodymyr Shymanskyy 3:31e4b850b126 263 BLYNK_ON_WRITE_IMPL(85);
Volodymyr Shymanskyy 3:31e4b850b126 264 BLYNK_ON_WRITE_IMPL(86);
Volodymyr Shymanskyy 3:31e4b850b126 265 BLYNK_ON_WRITE_IMPL(87);
Volodymyr Shymanskyy 3:31e4b850b126 266 BLYNK_ON_WRITE_IMPL(88);
Volodymyr Shymanskyy 3:31e4b850b126 267 BLYNK_ON_WRITE_IMPL(89);
Volodymyr Shymanskyy 3:31e4b850b126 268 BLYNK_ON_WRITE_IMPL(90);
Volodymyr Shymanskyy 3:31e4b850b126 269 BLYNK_ON_WRITE_IMPL(91);
Volodymyr Shymanskyy 3:31e4b850b126 270 BLYNK_ON_WRITE_IMPL(92);
Volodymyr Shymanskyy 3:31e4b850b126 271 BLYNK_ON_WRITE_IMPL(93);
Volodymyr Shymanskyy 3:31e4b850b126 272 BLYNK_ON_WRITE_IMPL(94);
Volodymyr Shymanskyy 3:31e4b850b126 273 BLYNK_ON_WRITE_IMPL(95);
Volodymyr Shymanskyy 3:31e4b850b126 274 BLYNK_ON_WRITE_IMPL(96);
Volodymyr Shymanskyy 3:31e4b850b126 275 BLYNK_ON_WRITE_IMPL(97);
Volodymyr Shymanskyy 3:31e4b850b126 276 BLYNK_ON_WRITE_IMPL(98);
Volodymyr Shymanskyy 3:31e4b850b126 277 BLYNK_ON_WRITE_IMPL(99);
Volodymyr Shymanskyy 3:31e4b850b126 278 BLYNK_ON_WRITE_IMPL(100);
Volodymyr Shymanskyy 3:31e4b850b126 279 BLYNK_ON_WRITE_IMPL(101);
Volodymyr Shymanskyy 3:31e4b850b126 280 BLYNK_ON_WRITE_IMPL(102);
Volodymyr Shymanskyy 3:31e4b850b126 281 BLYNK_ON_WRITE_IMPL(103);
Volodymyr Shymanskyy 3:31e4b850b126 282 BLYNK_ON_WRITE_IMPL(104);
Volodymyr Shymanskyy 3:31e4b850b126 283 BLYNK_ON_WRITE_IMPL(105);
Volodymyr Shymanskyy 3:31e4b850b126 284 BLYNK_ON_WRITE_IMPL(106);
Volodymyr Shymanskyy 3:31e4b850b126 285 BLYNK_ON_WRITE_IMPL(107);
Volodymyr Shymanskyy 3:31e4b850b126 286 BLYNK_ON_WRITE_IMPL(108);
Volodymyr Shymanskyy 3:31e4b850b126 287 BLYNK_ON_WRITE_IMPL(109);
Volodymyr Shymanskyy 3:31e4b850b126 288 BLYNK_ON_WRITE_IMPL(110);
Volodymyr Shymanskyy 3:31e4b850b126 289 BLYNK_ON_WRITE_IMPL(111);
Volodymyr Shymanskyy 3:31e4b850b126 290 BLYNK_ON_WRITE_IMPL(112);
Volodymyr Shymanskyy 3:31e4b850b126 291 BLYNK_ON_WRITE_IMPL(113);
Volodymyr Shymanskyy 3:31e4b850b126 292 BLYNK_ON_WRITE_IMPL(114);
Volodymyr Shymanskyy 3:31e4b850b126 293 BLYNK_ON_WRITE_IMPL(115);
Volodymyr Shymanskyy 3:31e4b850b126 294 BLYNK_ON_WRITE_IMPL(116);
Volodymyr Shymanskyy 3:31e4b850b126 295 BLYNK_ON_WRITE_IMPL(117);
Volodymyr Shymanskyy 3:31e4b850b126 296 BLYNK_ON_WRITE_IMPL(118);
Volodymyr Shymanskyy 3:31e4b850b126 297 BLYNK_ON_WRITE_IMPL(119);
Volodymyr Shymanskyy 3:31e4b850b126 298 BLYNK_ON_WRITE_IMPL(120);
Volodymyr Shymanskyy 3:31e4b850b126 299 BLYNK_ON_WRITE_IMPL(121);
Volodymyr Shymanskyy 3:31e4b850b126 300 BLYNK_ON_WRITE_IMPL(122);
Volodymyr Shymanskyy 3:31e4b850b126 301 BLYNK_ON_WRITE_IMPL(123);
Volodymyr Shymanskyy 3:31e4b850b126 302 BLYNK_ON_WRITE_IMPL(124);
Volodymyr Shymanskyy 3:31e4b850b126 303 BLYNK_ON_WRITE_IMPL(125);
Volodymyr Shymanskyy 3:31e4b850b126 304 BLYNK_ON_WRITE_IMPL(126);
Volodymyr Shymanskyy 3:31e4b850b126 305 BLYNK_ON_WRITE_IMPL(127);
Volodymyr Shymanskyy 3:31e4b850b126 306 #endif
vshymanskyy 0:58b20b438383 307
vshymanskyy 0:58b20b438383 308 static const WidgetReadHandler BlynkReadHandlerVector[] BLYNK_PROGMEM = {
vshymanskyy 0:58b20b438383 309 BlynkWidgetRead0, BlynkWidgetRead1, BlynkWidgetRead2, BlynkWidgetRead3,
vshymanskyy 0:58b20b438383 310 BlynkWidgetRead4, BlynkWidgetRead5, BlynkWidgetRead6, BlynkWidgetRead7,
vshymanskyy 0:58b20b438383 311 BlynkWidgetRead8, BlynkWidgetRead9, BlynkWidgetRead10, BlynkWidgetRead11,
vshymanskyy 0:58b20b438383 312 BlynkWidgetRead12, BlynkWidgetRead13, BlynkWidgetRead14, BlynkWidgetRead15,
vshymanskyy 0:58b20b438383 313 BlynkWidgetRead16, BlynkWidgetRead17, BlynkWidgetRead18, BlynkWidgetRead19,
vshymanskyy 0:58b20b438383 314 BlynkWidgetRead20, BlynkWidgetRead21, BlynkWidgetRead22, BlynkWidgetRead23,
vshymanskyy 0:58b20b438383 315 BlynkWidgetRead24, BlynkWidgetRead25, BlynkWidgetRead26, BlynkWidgetRead27,
vshymanskyy 0:58b20b438383 316 BlynkWidgetRead28, BlynkWidgetRead29, BlynkWidgetRead30, BlynkWidgetRead31,
Volodymyr Shymanskyy 3:31e4b850b126 317 #ifdef BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 3:31e4b850b126 318 BlynkWidgetRead32, BlynkWidgetRead33, BlynkWidgetRead34, BlynkWidgetRead35,
Volodymyr Shymanskyy 3:31e4b850b126 319 BlynkWidgetRead36, BlynkWidgetRead37, BlynkWidgetRead38, BlynkWidgetRead39,
Volodymyr Shymanskyy 3:31e4b850b126 320 BlynkWidgetRead40, BlynkWidgetRead41, BlynkWidgetRead42, BlynkWidgetRead43,
Volodymyr Shymanskyy 3:31e4b850b126 321 BlynkWidgetRead44, BlynkWidgetRead45, BlynkWidgetRead46, BlynkWidgetRead47,
Volodymyr Shymanskyy 3:31e4b850b126 322 BlynkWidgetRead48, BlynkWidgetRead49, BlynkWidgetRead50, BlynkWidgetRead51,
Volodymyr Shymanskyy 3:31e4b850b126 323 BlynkWidgetRead52, BlynkWidgetRead53, BlynkWidgetRead54, BlynkWidgetRead55,
Volodymyr Shymanskyy 3:31e4b850b126 324 BlynkWidgetRead56, BlynkWidgetRead57, BlynkWidgetRead58, BlynkWidgetRead59,
Volodymyr Shymanskyy 3:31e4b850b126 325 BlynkWidgetRead60, BlynkWidgetRead61, BlynkWidgetRead62, BlynkWidgetRead63,
Volodymyr Shymanskyy 3:31e4b850b126 326 BlynkWidgetRead64, BlynkWidgetRead65, BlynkWidgetRead66, BlynkWidgetRead67,
Volodymyr Shymanskyy 3:31e4b850b126 327 BlynkWidgetRead68, BlynkWidgetRead69, BlynkWidgetRead70, BlynkWidgetRead71,
Volodymyr Shymanskyy 3:31e4b850b126 328 BlynkWidgetRead72, BlynkWidgetRead73, BlynkWidgetRead74, BlynkWidgetRead75,
Volodymyr Shymanskyy 3:31e4b850b126 329 BlynkWidgetRead76, BlynkWidgetRead77, BlynkWidgetRead78, BlynkWidgetRead79,
Volodymyr Shymanskyy 3:31e4b850b126 330 BlynkWidgetRead80, BlynkWidgetRead81, BlynkWidgetRead82, BlynkWidgetRead83,
Volodymyr Shymanskyy 3:31e4b850b126 331 BlynkWidgetRead84, BlynkWidgetRead85, BlynkWidgetRead86, BlynkWidgetRead87,
Volodymyr Shymanskyy 3:31e4b850b126 332 BlynkWidgetRead88, BlynkWidgetRead89, BlynkWidgetRead90, BlynkWidgetRead91,
Volodymyr Shymanskyy 3:31e4b850b126 333 BlynkWidgetRead92, BlynkWidgetRead93, BlynkWidgetRead94, BlynkWidgetRead95,
Volodymyr Shymanskyy 3:31e4b850b126 334 BlynkWidgetRead96, BlynkWidgetRead97, BlynkWidgetRead98, BlynkWidgetRead99,
Volodymyr Shymanskyy 3:31e4b850b126 335 BlynkWidgetRead100, BlynkWidgetRead101, BlynkWidgetRead102, BlynkWidgetRead103,
Volodymyr Shymanskyy 3:31e4b850b126 336 BlynkWidgetRead104, BlynkWidgetRead105, BlynkWidgetRead106, BlynkWidgetRead107,
Volodymyr Shymanskyy 3:31e4b850b126 337 BlynkWidgetRead108, BlynkWidgetRead109, BlynkWidgetRead110, BlynkWidgetRead111,
Volodymyr Shymanskyy 3:31e4b850b126 338 BlynkWidgetRead112, BlynkWidgetRead113, BlynkWidgetRead114, BlynkWidgetRead115,
Volodymyr Shymanskyy 3:31e4b850b126 339 BlynkWidgetRead116, BlynkWidgetRead117, BlynkWidgetRead118, BlynkWidgetRead119,
Volodymyr Shymanskyy 3:31e4b850b126 340 BlynkWidgetRead120, BlynkWidgetRead121, BlynkWidgetRead122, BlynkWidgetRead123,
Volodymyr Shymanskyy 3:31e4b850b126 341 BlynkWidgetRead124, BlynkWidgetRead125, BlynkWidgetRead126, BlynkWidgetRead127,
Volodymyr Shymanskyy 3:31e4b850b126 342 #endif
vshymanskyy 0:58b20b438383 343 };
vshymanskyy 0:58b20b438383 344
vshymanskyy 0:58b20b438383 345 static const WidgetWriteHandler BlynkWriteHandlerVector[] BLYNK_PROGMEM = {
vshymanskyy 0:58b20b438383 346 BlynkWidgetWrite0, BlynkWidgetWrite1, BlynkWidgetWrite2, BlynkWidgetWrite3,
vshymanskyy 0:58b20b438383 347 BlynkWidgetWrite4, BlynkWidgetWrite5, BlynkWidgetWrite6, BlynkWidgetWrite7,
vshymanskyy 0:58b20b438383 348 BlynkWidgetWrite8, BlynkWidgetWrite9, BlynkWidgetWrite10, BlynkWidgetWrite11,
vshymanskyy 0:58b20b438383 349 BlynkWidgetWrite12, BlynkWidgetWrite13, BlynkWidgetWrite14, BlynkWidgetWrite15,
vshymanskyy 0:58b20b438383 350 BlynkWidgetWrite16, BlynkWidgetWrite17, BlynkWidgetWrite18, BlynkWidgetWrite19,
vshymanskyy 0:58b20b438383 351 BlynkWidgetWrite20, BlynkWidgetWrite21, BlynkWidgetWrite22, BlynkWidgetWrite23,
vshymanskyy 0:58b20b438383 352 BlynkWidgetWrite24, BlynkWidgetWrite25, BlynkWidgetWrite26, BlynkWidgetWrite27,
vshymanskyy 0:58b20b438383 353 BlynkWidgetWrite28, BlynkWidgetWrite29, BlynkWidgetWrite30, BlynkWidgetWrite31,
Volodymyr Shymanskyy 3:31e4b850b126 354 #ifdef BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 3:31e4b850b126 355 BlynkWidgetWrite32, BlynkWidgetWrite33, BlynkWidgetWrite34, BlynkWidgetWrite35,
Volodymyr Shymanskyy 3:31e4b850b126 356 BlynkWidgetWrite36, BlynkWidgetWrite37, BlynkWidgetWrite38, BlynkWidgetWrite39,
Volodymyr Shymanskyy 3:31e4b850b126 357 BlynkWidgetWrite40, BlynkWidgetWrite41, BlynkWidgetWrite42, BlynkWidgetWrite43,
Volodymyr Shymanskyy 3:31e4b850b126 358 BlynkWidgetWrite44, BlynkWidgetWrite45, BlynkWidgetWrite46, BlynkWidgetWrite47,
Volodymyr Shymanskyy 3:31e4b850b126 359 BlynkWidgetWrite48, BlynkWidgetWrite49, BlynkWidgetWrite50, BlynkWidgetWrite51,
Volodymyr Shymanskyy 3:31e4b850b126 360 BlynkWidgetWrite52, BlynkWidgetWrite53, BlynkWidgetWrite54, BlynkWidgetWrite55,
Volodymyr Shymanskyy 3:31e4b850b126 361 BlynkWidgetWrite56, BlynkWidgetWrite57, BlynkWidgetWrite58, BlynkWidgetWrite59,
Volodymyr Shymanskyy 3:31e4b850b126 362 BlynkWidgetWrite60, BlynkWidgetWrite61, BlynkWidgetWrite62, BlynkWidgetWrite63,
Volodymyr Shymanskyy 3:31e4b850b126 363 BlynkWidgetWrite64, BlynkWidgetWrite65, BlynkWidgetWrite66, BlynkWidgetWrite67,
Volodymyr Shymanskyy 3:31e4b850b126 364 BlynkWidgetWrite68, BlynkWidgetWrite69, BlynkWidgetWrite70, BlynkWidgetWrite71,
Volodymyr Shymanskyy 3:31e4b850b126 365 BlynkWidgetWrite72, BlynkWidgetWrite73, BlynkWidgetWrite74, BlynkWidgetWrite75,
Volodymyr Shymanskyy 3:31e4b850b126 366 BlynkWidgetWrite76, BlynkWidgetWrite77, BlynkWidgetWrite78, BlynkWidgetWrite79,
Volodymyr Shymanskyy 3:31e4b850b126 367 BlynkWidgetWrite80, BlynkWidgetWrite81, BlynkWidgetWrite82, BlynkWidgetWrite83,
Volodymyr Shymanskyy 3:31e4b850b126 368 BlynkWidgetWrite84, BlynkWidgetWrite85, BlynkWidgetWrite86, BlynkWidgetWrite87,
Volodymyr Shymanskyy 3:31e4b850b126 369 BlynkWidgetWrite88, BlynkWidgetWrite89, BlynkWidgetWrite90, BlynkWidgetWrite91,
Volodymyr Shymanskyy 3:31e4b850b126 370 BlynkWidgetWrite92, BlynkWidgetWrite93, BlynkWidgetWrite94, BlynkWidgetWrite95,
Volodymyr Shymanskyy 3:31e4b850b126 371 BlynkWidgetWrite96, BlynkWidgetWrite97, BlynkWidgetWrite98, BlynkWidgetWrite99,
Volodymyr Shymanskyy 3:31e4b850b126 372 BlynkWidgetWrite100, BlynkWidgetWrite101, BlynkWidgetWrite102, BlynkWidgetWrite103,
Volodymyr Shymanskyy 3:31e4b850b126 373 BlynkWidgetWrite104, BlynkWidgetWrite105, BlynkWidgetWrite106, BlynkWidgetWrite107,
Volodymyr Shymanskyy 3:31e4b850b126 374 BlynkWidgetWrite108, BlynkWidgetWrite109, BlynkWidgetWrite110, BlynkWidgetWrite111,
Volodymyr Shymanskyy 3:31e4b850b126 375 BlynkWidgetWrite112, BlynkWidgetWrite113, BlynkWidgetWrite114, BlynkWidgetWrite115,
Volodymyr Shymanskyy 3:31e4b850b126 376 BlynkWidgetWrite116, BlynkWidgetWrite117, BlynkWidgetWrite118, BlynkWidgetWrite119,
Volodymyr Shymanskyy 3:31e4b850b126 377 BlynkWidgetWrite120, BlynkWidgetWrite121, BlynkWidgetWrite122, BlynkWidgetWrite123,
Volodymyr Shymanskyy 3:31e4b850b126 378 BlynkWidgetWrite124, BlynkWidgetWrite125, BlynkWidgetWrite126, BlynkWidgetWrite127,
Volodymyr Shymanskyy 3:31e4b850b126 379 #endif
vshymanskyy 0:58b20b438383 380 };
vshymanskyy 0:58b20b438383 381
vshymanskyy 0:58b20b438383 382 WidgetReadHandler GetReadHandler(uint8_t pin)
vshymanskyy 0:58b20b438383 383 {
Volodymyr Shymanskyy 9:7369ec77a3ea 384 if (pin >= BLYNK_COUNT_OF(BlynkReadHandlerVector))
vshymanskyy 0:58b20b438383 385 return NULL;
vshymanskyy 0:58b20b438383 386 #ifdef BLYNK_HAS_PROGMEM
vshymanskyy 0:58b20b438383 387 return (WidgetReadHandler)pgm_read_word(&BlynkReadHandlerVector[pin]);
vshymanskyy 0:58b20b438383 388 #else
vshymanskyy 0:58b20b438383 389 return BlynkReadHandlerVector[pin];
vshymanskyy 0:58b20b438383 390 #endif
vshymanskyy 0:58b20b438383 391 }
vshymanskyy 0:58b20b438383 392
vshymanskyy 0:58b20b438383 393 WidgetWriteHandler GetWriteHandler(uint8_t pin)
vshymanskyy 0:58b20b438383 394 {
Volodymyr Shymanskyy 9:7369ec77a3ea 395 if (pin >= BLYNK_COUNT_OF(BlynkWriteHandlerVector))
vshymanskyy 0:58b20b438383 396 return NULL;
vshymanskyy 0:58b20b438383 397 #ifdef BLYNK_HAS_PROGMEM
vshymanskyy 0:58b20b438383 398 return (WidgetWriteHandler)pgm_read_word(&BlynkWriteHandlerVector[pin]);
vshymanskyy 0:58b20b438383 399 #else
vshymanskyy 0:58b20b438383 400 return BlynkWriteHandlerVector[pin];
vshymanskyy 0:58b20b438383 401 #endif
vshymanskyy 0:58b20b438383 402 }