Microduino

Dependencies:   mbed

Fork of Io_moon by Li Weiyi

Committer:
lixianyu
Date:
Thu Jun 23 11:16:14 2016 +0000
Revision:
0:740c1eb2df13
* AM2321?????????2s????i2c?????; * SimpleTimer??bug?????????????????????????; * Blynk??bug??????????????; * ?????????

Who changed what in which revision?

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