blynk & neopixelring & w7500

Fork of WIZwiki-7500_Blynk by IOP

Committer:
Volodymyr Shymanskyy
Date:
Sun Apr 09 14:50:30 2017 +0300
Revision:
13:ed6276c0afb7
Parent:
9:7369ec77a3ea
Update version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vshymanskyy 0:58b20b438383 1 /**
vshymanskyy 0:58b20b438383 2 * @file BlynkDetectDevice.h
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) 2016 Volodymyr Shymanskyy
vshymanskyy 0:58b20b438383 6 * @date May 2016
vshymanskyy 0:58b20b438383 7 * @brief
vshymanskyy 0:58b20b438383 8 *
vshymanskyy 0:58b20b438383 9 */
vshymanskyy 0:58b20b438383 10
vshymanskyy 0:58b20b438383 11 #ifndef BlynkDetectDevice_h
vshymanskyy 0:58b20b438383 12 #define BlynkDetectDevice_h
vshymanskyy 0:58b20b438383 13
Volodymyr Shymanskyy 9:7369ec77a3ea 14 // General defines
Volodymyr Shymanskyy 9:7369ec77a3ea 15
Volodymyr Shymanskyy 9:7369ec77a3ea 16 #define BLYNK_STRINGIFY(x) #x
Volodymyr Shymanskyy 9:7369ec77a3ea 17 #define BLYNK_TOSTRING(x) BLYNK_STRINGIFY(x)
Volodymyr Shymanskyy 9:7369ec77a3ea 18 #define BLYNK_COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
Volodymyr Shymanskyy 9:7369ec77a3ea 19 #define BLYNK_ATTR_PACKED __attribute__ ((__packed__))
Volodymyr Shymanskyy 9:7369ec77a3ea 20 #define BLYNK_NORETURN __attribute__ ((noreturn))
Volodymyr Shymanskyy 9:7369ec77a3ea 21 #define BLYNK_UNUSED __attribute__((__unused__))
Volodymyr Shymanskyy 9:7369ec77a3ea 22 #define BLYNK_DEPRECATED __attribute__ ((deprecated))
Volodymyr Shymanskyy 9:7369ec77a3ea 23
Volodymyr Shymanskyy 9:7369ec77a3ea 24 // Causes problems on some platforms
Volodymyr Shymanskyy 9:7369ec77a3ea 25 #define BLYNK_FORCE_INLINE inline //__attribute__((always_inline))
Volodymyr Shymanskyy 9:7369ec77a3ea 26
vshymanskyy 0:58b20b438383 27 #ifndef BLYNK_INFO_CPU
vshymanskyy 0:58b20b438383 28
vshymanskyy 0:58b20b438383 29 /******************************************
vshymanskyy 0:58b20b438383 30 * ATmega
vshymanskyy 0:58b20b438383 31 */
vshymanskyy 0:58b20b438383 32
vshymanskyy 0:58b20b438383 33 #if defined(__AVR_ATmega168__)
vshymanskyy 0:58b20b438383 34 #define BLYNK_INFO_CPU "ATmega168"
vshymanskyy 0:58b20b438383 35 #elif defined(__AVR_ATmega328P__)
vshymanskyy 0:58b20b438383 36 #define BLYNK_INFO_CPU "ATmega328P"
vshymanskyy 0:58b20b438383 37 #elif defined(__AVR_ATmega1280__)
vshymanskyy 0:58b20b438383 38 #define BLYNK_INFO_CPU "ATmega1280"
vshymanskyy 0:58b20b438383 39 #elif defined(__AVR_ATmega1284__)
vshymanskyy 0:58b20b438383 40 #define BLYNK_INFO_CPU "ATmega1284"
vshymanskyy 0:58b20b438383 41 #elif defined(__AVR_ATmega2560__)
vshymanskyy 0:58b20b438383 42 #define BLYNK_INFO_CPU "ATmega2560"
vshymanskyy 0:58b20b438383 43 #elif defined(__AVR_ATmega32U4__)
vshymanskyy 0:58b20b438383 44 #define BLYNK_INFO_CPU "ATmega32U4"
vshymanskyy 0:58b20b438383 45 #elif defined(__SAM3X8E__)
vshymanskyy 0:58b20b438383 46 #define BLYNK_INFO_CPU "AT91SAM3X8E"
vshymanskyy 0:58b20b438383 47
vshymanskyy 0:58b20b438383 48 /******************************************
vshymanskyy 0:58b20b438383 49 * ATtiny
vshymanskyy 0:58b20b438383 50 */
vshymanskyy 0:58b20b438383 51
vshymanskyy 0:58b20b438383 52 #elif defined(__AVR_ATtiny25__)
vshymanskyy 0:58b20b438383 53 #define BLYNK_INFO_CPU "ATtiny25"
vshymanskyy 0:58b20b438383 54 #elif defined(__AVR_ATtiny45__)
vshymanskyy 0:58b20b438383 55 #define BLYNK_INFO_CPU "ATtiny45"
vshymanskyy 0:58b20b438383 56 #elif defined(__AVR_ATtiny85__)
vshymanskyy 0:58b20b438383 57 #define BLYNK_INFO_CPU "ATtiny85"
vshymanskyy 0:58b20b438383 58 #elif defined(__AVR_ATtiny24__)
vshymanskyy 0:58b20b438383 59 #define BLYNK_INFO_CPU "ATtiny24"
vshymanskyy 0:58b20b438383 60 #elif defined(__AVR_ATtiny44__)
vshymanskyy 0:58b20b438383 61 #define BLYNK_INFO_CPU "ATtiny44"
vshymanskyy 0:58b20b438383 62 #elif defined(__AVR_ATtiny84__)
vshymanskyy 0:58b20b438383 63 #define BLYNK_INFO_CPU "ATtiny84"
vshymanskyy 0:58b20b438383 64 #elif defined(__AVR_ATtiny2313__)
vshymanskyy 0:58b20b438383 65 #define BLYNK_INFO_CPU "ATtiny2313"
vshymanskyy 0:58b20b438383 66 #elif defined(__AVR_ATtiny4313__)
vshymanskyy 0:58b20b438383 67 #define BLYNK_INFO_CPU "ATtiny4313"
vshymanskyy 0:58b20b438383 68 #endif
vshymanskyy 0:58b20b438383 69 #endif
vshymanskyy 0:58b20b438383 70
vshymanskyy 0:58b20b438383 71 #ifndef BLYNK_INFO_DEVICE
vshymanskyy 0:58b20b438383 72
vshymanskyy 0:58b20b438383 73 #if defined(ENERGIA)
Volodymyr Shymanskyy 7:8879692d4e6c 74
Volodymyr Shymanskyy 7:8879692d4e6c 75 #define BLYNK_NO_YIELD
Volodymyr Shymanskyy 3:31e4b850b126 76 #define BLYNK_USE_128_VPINS
vshymanskyy 0:58b20b438383 77
Volodymyr Shymanskyy 7:8879692d4e6c 78 #if defined(ENERGIA_ARCH_MSP430)
Volodymyr Shymanskyy 9:7369ec77a3ea 79 #define BLYNK_INFO_DEVICE "LaunchPad MSP430"
Volodymyr Shymanskyy 7:8879692d4e6c 80 #define BLYNK_INFO_CPU "MSP430"
Volodymyr Shymanskyy 7:8879692d4e6c 81 #define BLYNK_NO_FLOAT
Volodymyr Shymanskyy 7:8879692d4e6c 82 #elif defined(ENERGIA_ARCH_MSP432)
Volodymyr Shymanskyy 9:7369ec77a3ea 83 #define BLYNK_INFO_DEVICE "LaunchPad MSP432"
Volodymyr Shymanskyy 7:8879692d4e6c 84 #define BLYNK_INFO_CPU "MSP432"
Volodymyr Shymanskyy 7:8879692d4e6c 85 #elif defined(ENERGIA_ARCH_TIVAC)
Volodymyr Shymanskyy 7:8879692d4e6c 86 #define BLYNK_INFO_DEVICE "LaunchPad"
Volodymyr Shymanskyy 7:8879692d4e6c 87
Volodymyr Shymanskyy 7:8879692d4e6c 88 #elif defined(ENERGIA_ARCH_CC3200)
Volodymyr Shymanskyy 7:8879692d4e6c 89 #define BLYNK_INFO_CONNECTION "CC3200"
Volodymyr Shymanskyy 7:8879692d4e6c 90 #define BLYNK_SEND_CHUNK 64
Volodymyr Shymanskyy 9:7369ec77a3ea 91 #define BLYNK_BUFFERS_SIZE 1024
Volodymyr Shymanskyy 7:8879692d4e6c 92
Volodymyr Shymanskyy 9:7369ec77a3ea 93 #if defined(ENERGIA_CC3200_LAUNCHXL) //TODO: This is a bug in Energia IDE
Volodymyr Shymanskyy 9:7369ec77a3ea 94 #define BLYNK_INFO_DEVICE "CC32000 LaunchXL"
Volodymyr Shymanskyy 7:8879692d4e6c 95 #elif defined(ENERGIA_RedBearLab_CC3200)
Volodymyr Shymanskyy 7:8879692d4e6c 96 #define BLYNK_INFO_DEVICE "RBL CC3200"
Volodymyr Shymanskyy 7:8879692d4e6c 97 #elif defined(ENERGIA_RedBearLab_WiFiMini)
Volodymyr Shymanskyy 7:8879692d4e6c 98 #define BLYNK_INFO_DEVICE "RBL WiFi Mini"
Volodymyr Shymanskyy 7:8879692d4e6c 99 #elif defined(ENERGIA_RedBearLab_WiFiMicro)
Volodymyr Shymanskyy 7:8879692d4e6c 100 #define BLYNK_INFO_DEVICE "RBL WiFi Micro"
Volodymyr Shymanskyy 7:8879692d4e6c 101 #endif
Volodymyr Shymanskyy 7:8879692d4e6c 102 #endif
Volodymyr Shymanskyy 7:8879692d4e6c 103
Volodymyr Shymanskyy 7:8879692d4e6c 104 #if !defined(BLYNK_INFO_DEVICE)
Volodymyr Shymanskyy 7:8879692d4e6c 105 #define BLYNK_INFO_DEVICE "Energia"
vshymanskyy 0:58b20b438383 106 #endif
vshymanskyy 0:58b20b438383 107
vshymanskyy 0:58b20b438383 108 #elif defined(LINUX)
vshymanskyy 0:58b20b438383 109
vshymanskyy 0:58b20b438383 110 #define BLYNK_INFO_DEVICE "Linux"
Volodymyr Shymanskyy 3:31e4b850b126 111 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 112 #define BLYNK_BUFFERS_SIZE 4096
vshymanskyy 0:58b20b438383 113
vshymanskyy 0:58b20b438383 114 #elif defined(SPARK) || defined(PARTICLE)
vshymanskyy 0:58b20b438383 115
Volodymyr Shymanskyy 3:31e4b850b126 116 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 117 #define BLYNK_BUFFERS_SIZE 1024
Volodymyr Shymanskyy 3:31e4b850b126 118
vshymanskyy 0:58b20b438383 119 #if PLATFORM_ID==0
vshymanskyy 0:58b20b438383 120 #define BLYNK_INFO_DEVICE "Particle Core"
Volodymyr Shymanskyy 9:7369ec77a3ea 121 #undef BLYNK_BUFFERS_SIZE // Use default on Core
vshymanskyy 0:58b20b438383 122 #elif PLATFORM_ID==6
vshymanskyy 0:58b20b438383 123 #define BLYNK_INFO_DEVICE "Particle Photon"
vshymanskyy 0:58b20b438383 124 #elif PLATFORM_ID==8
vshymanskyy 0:58b20b438383 125 #define BLYNK_INFO_DEVICE "Particle P1"
vshymanskyy 0:58b20b438383 126 #elif PLATFORM_ID==9
vshymanskyy 0:58b20b438383 127 #define BLYNK_INFO_DEVICE "Particle Ethernet"
vshymanskyy 0:58b20b438383 128 #elif PLATFORM_ID==10
vshymanskyy 0:58b20b438383 129 #define BLYNK_INFO_DEVICE "Particle Electron"
Volodymyr Shymanskyy 13:ed6276c0afb7 130 #elif PLATFORM_ID==31
Volodymyr Shymanskyy 13:ed6276c0afb7 131 #define BLYNK_INFO_DEVICE "Particle RPi"
vshymanskyy 0:58b20b438383 132 #elif PLATFORM_ID==82
vshymanskyy 0:58b20b438383 133 #define BLYNK_INFO_DEVICE "Digistump Oak"
vshymanskyy 0:58b20b438383 134 #elif PLATFORM_ID==88
vshymanskyy 0:58b20b438383 135 #define BLYNK_INFO_DEVICE "RedBear Duo"
vshymanskyy 0:58b20b438383 136 #elif PLATFORM_ID==103
vshymanskyy 0:58b20b438383 137 #define BLYNK_INFO_DEVICE "Bluz"
vshymanskyy 0:58b20b438383 138 #else
Volodymyr Shymanskyy 9:7369ec77a3ea 139 #if defined(BLYNK_DEBUG_ALL)
Volodymyr Shymanskyy 9:7369ec77a3ea 140 #warning "Cannot detect board type"
Volodymyr Shymanskyy 9:7369ec77a3ea 141 #endif
vshymanskyy 0:58b20b438383 142 #define BLYNK_INFO_DEVICE "Particle"
vshymanskyy 0:58b20b438383 143 #endif
vshymanskyy 0:58b20b438383 144
vshymanskyy 0:58b20b438383 145 #elif defined(MBED_LIBRARY_VERSION)
vshymanskyy 0:58b20b438383 146
vshymanskyy 0:58b20b438383 147 #define BLYNK_INFO_DEVICE "MBED"
Volodymyr Shymanskyy 3:31e4b850b126 148 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 149 #define BLYNK_BUFFERS_SIZE 512
vshymanskyy 4:fa1450a7dd08 150 #define noInterrupts() __disable_irq()
vshymanskyy 4:fa1450a7dd08 151 #define interrupts() __enable_irq()
vshymanskyy 0:58b20b438383 152
vshymanskyy 0:58b20b438383 153 #elif defined(ARDUINO) && defined(MPIDE)
vshymanskyy 0:58b20b438383 154 #define BLYNK_NO_YIELD
vshymanskyy 0:58b20b438383 155
vshymanskyy 0:58b20b438383 156 #if defined(_BOARD_UNO_)
vshymanskyy 0:58b20b438383 157 #define BLYNK_INFO_DEVICE "chipKIT Uno32"
vshymanskyy 0:58b20b438383 158 #else
vshymanskyy 0:58b20b438383 159 #define BLYNK_INFO_DEVICE "chipKIT"
vshymanskyy 0:58b20b438383 160 #endif
vshymanskyy 0:58b20b438383 161
Volodymyr Shymanskyy 3:31e4b850b126 162 #elif defined(ARDUINO) && defined(TEENSYDUINO)
Volodymyr Shymanskyy 3:31e4b850b126 163
Volodymyr Shymanskyy 9:7369ec77a3ea 164 #if defined(__MK66FX1M0__)
Volodymyr Shymanskyy 9:7369ec77a3ea 165 #define BLYNK_INFO_DEVICE "Teensy 3.6"
Volodymyr Shymanskyy 9:7369ec77a3ea 166 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 167 #define BLYNK_BUFFERS_SIZE 1024
Volodymyr Shymanskyy 9:7369ec77a3ea 168 #elif defined(__MK64FX512__)
Volodymyr Shymanskyy 9:7369ec77a3ea 169 #define BLYNK_INFO_DEVICE "Teensy 3.5"
Volodymyr Shymanskyy 9:7369ec77a3ea 170 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 171 #define BLYNK_BUFFERS_SIZE 1024
Volodymyr Shymanskyy 9:7369ec77a3ea 172 #elif defined(__MK20DX256__)
Volodymyr Shymanskyy 3:31e4b850b126 173 #define BLYNK_INFO_DEVICE "Teensy 3.2/3.1"
Volodymyr Shymanskyy 3:31e4b850b126 174 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 175 #define BLYNK_BUFFERS_SIZE 1024
Volodymyr Shymanskyy 3:31e4b850b126 176 #elif defined(__MK20DX128__)
Volodymyr Shymanskyy 3:31e4b850b126 177 #define BLYNK_INFO_DEVICE "Teensy 3.0"
Volodymyr Shymanskyy 3:31e4b850b126 178 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 179 #define BLYNK_BUFFERS_SIZE 1024
Volodymyr Shymanskyy 3:31e4b850b126 180 #elif defined(__MKL26Z64__)
Volodymyr Shymanskyy 3:31e4b850b126 181 #define BLYNK_INFO_DEVICE "Teensy LC"
Volodymyr Shymanskyy 9:7369ec77a3ea 182 #define BLYNK_BUFFERS_SIZE 512
Volodymyr Shymanskyy 3:31e4b850b126 183 #elif defined(ARDUINO_ARCH_AVR)
Volodymyr Shymanskyy 3:31e4b850b126 184 #define BLYNK_INFO_DEVICE "Teensy 2.0"
Volodymyr Shymanskyy 3:31e4b850b126 185 #else
Volodymyr Shymanskyy 3:31e4b850b126 186 #define BLYNK_INFO_DEVICE "Teensy"
Volodymyr Shymanskyy 3:31e4b850b126 187 #endif
Volodymyr Shymanskyy 3:31e4b850b126 188
vshymanskyy 0:58b20b438383 189 #elif defined(ARDUINO)
vshymanskyy 0:58b20b438383 190
Volodymyr Shymanskyy 7:8879692d4e6c 191 #if defined(ESP8266) || defined(ESP32)
Volodymyr Shymanskyy 3:31e4b850b126 192 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 193 #define BLYNK_BUFFERS_SIZE 1024
Volodymyr Shymanskyy 3:31e4b850b126 194 #endif
Volodymyr Shymanskyy 3:31e4b850b126 195
vshymanskyy 0:58b20b438383 196 /* Arduino AVR */
vshymanskyy 0:58b20b438383 197 #if defined(ARDUINO_AVR_NANO)
vshymanskyy 0:58b20b438383 198 #define BLYNK_INFO_DEVICE "Arduino Nano"
vshymanskyy 0:58b20b438383 199 #elif defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_DUEMILANOVE)
vshymanskyy 0:58b20b438383 200 #define BLYNK_INFO_DEVICE "Arduino Uno"
vshymanskyy 0:58b20b438383 201 #elif defined(ARDUINO_AVR_YUN)
vshymanskyy 0:58b20b438383 202 #define BLYNK_INFO_DEVICE "Arduino Yun"
vshymanskyy 0:58b20b438383 203 #elif defined(ARDUINO_AVR_MINI)
vshymanskyy 0:58b20b438383 204 #define BLYNK_INFO_DEVICE "Arduino Mini"
vshymanskyy 0:58b20b438383 205 #elif defined(ARDUINO_AVR_ETHERNET)
vshymanskyy 0:58b20b438383 206 #define BLYNK_INFO_DEVICE "Arduino Ethernet"
vshymanskyy 0:58b20b438383 207 #elif defined(ARDUINO_AVR_FIO)
vshymanskyy 0:58b20b438383 208 #define BLYNK_INFO_DEVICE "Arduino Fio"
vshymanskyy 0:58b20b438383 209 #elif defined(ARDUINO_AVR_BT)
vshymanskyy 0:58b20b438383 210 #define BLYNK_INFO_DEVICE "Arduino BT"
vshymanskyy 0:58b20b438383 211 #elif defined(ARDUINO_AVR_PRO)
vshymanskyy 0:58b20b438383 212 #define BLYNK_INFO_DEVICE "Arduino Pro"
vshymanskyy 0:58b20b438383 213 #elif defined(ARDUINO_AVR_NG)
vshymanskyy 0:58b20b438383 214 #define BLYNK_INFO_DEVICE "Arduino NG"
vshymanskyy 0:58b20b438383 215 #elif defined(ARDUINO_AVR_GEMMA)
vshymanskyy 0:58b20b438383 216 #define BLYNK_INFO_DEVICE "Arduino Gemma"
vshymanskyy 0:58b20b438383 217 #elif defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560)
vshymanskyy 0:58b20b438383 218 #define BLYNK_INFO_DEVICE "Arduino Mega"
Volodymyr Shymanskyy 3:31e4b850b126 219 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 220 #define BLYNK_BUFFERS_SIZE 1024
vshymanskyy 0:58b20b438383 221 #elif defined(ARDUINO_AVR_ADK)
vshymanskyy 0:58b20b438383 222 #define BLYNK_INFO_DEVICE "Arduino Mega ADK"
Volodymyr Shymanskyy 3:31e4b850b126 223 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 224 #define BLYNK_BUFFERS_SIZE 1024
vshymanskyy 0:58b20b438383 225 #elif defined(ARDUINO_AVR_LEONARDO)
vshymanskyy 0:58b20b438383 226 #define BLYNK_INFO_DEVICE "Arduino Leonardo"
vshymanskyy 0:58b20b438383 227 #elif defined(ARDUINO_AVR_MICRO)
vshymanskyy 0:58b20b438383 228 #define BLYNK_INFO_DEVICE "Arduino Micro"
vshymanskyy 0:58b20b438383 229 #elif defined(ARDUINO_AVR_ESPLORA)
vshymanskyy 0:58b20b438383 230 #define BLYNK_INFO_DEVICE "Arduino Esplora"
vshymanskyy 0:58b20b438383 231 #elif defined(ARDUINO_AVR_LILYPAD)
vshymanskyy 0:58b20b438383 232 #define BLYNK_INFO_DEVICE "Lilypad"
vshymanskyy 0:58b20b438383 233 #elif defined(ARDUINO_AVR_LILYPAD_USB)
vshymanskyy 0:58b20b438383 234 #define BLYNK_INFO_DEVICE "Lilypad USB"
vshymanskyy 0:58b20b438383 235 #elif defined(ARDUINO_AVR_ROBOT_MOTOR)
vshymanskyy 0:58b20b438383 236 #define BLYNK_INFO_DEVICE "Robot Motor"
vshymanskyy 0:58b20b438383 237 #elif defined(ARDUINO_AVR_ROBOT_CONTROL)
vshymanskyy 0:58b20b438383 238 #define BLYNK_INFO_DEVICE "Robot Control"
vshymanskyy 0:58b20b438383 239
vshymanskyy 0:58b20b438383 240 /* Arduino SAM/SAMD */
vshymanskyy 0:58b20b438383 241 #elif defined(ARDUINO_SAM_DUE)
vshymanskyy 0:58b20b438383 242 #define BLYNK_INFO_DEVICE "Arduino Due"
Volodymyr Shymanskyy 3:31e4b850b126 243 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 244 #define BLYNK_BUFFERS_SIZE 1024
vshymanskyy 0:58b20b438383 245 #elif defined(ARDUINO_SAMD_ZERO)
vshymanskyy 0:58b20b438383 246 #define BLYNK_INFO_DEVICE "Arduino Zero"
Volodymyr Shymanskyy 3:31e4b850b126 247 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 248 #define BLYNK_BUFFERS_SIZE 1024
vshymanskyy 0:58b20b438383 249 #elif defined(ARDUINO_SAMD_MKR1000)
vshymanskyy 0:58b20b438383 250 #define BLYNK_INFO_DEVICE "Arduino MKR1000"
Volodymyr Shymanskyy 3:31e4b850b126 251 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 252 #define BLYNK_BUFFERS_SIZE 1024
vshymanskyy 0:58b20b438383 253
vshymanskyy 0:58b20b438383 254 /* Intel */
vshymanskyy 0:58b20b438383 255 #elif defined(ARDUINO_GALILEO)
vshymanskyy 0:58b20b438383 256 #define BLYNK_INFO_DEVICE "Galileo"
Volodymyr Shymanskyy 3:31e4b850b126 257 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 258 #define BLYNK_BUFFERS_SIZE 4096
vshymanskyy 0:58b20b438383 259 #elif defined(ARDUINO_GALILEOGEN2)
vshymanskyy 0:58b20b438383 260 #define BLYNK_INFO_DEVICE "Galileo Gen2"
Volodymyr Shymanskyy 9:7369ec77a3ea 261 #define BLYNK_BUFFERS_SIZE 4096
Volodymyr Shymanskyy 3:31e4b850b126 262 #define BLYNK_USE_128_VPINS
vshymanskyy 0:58b20b438383 263 #elif defined(ARDUINO_EDISON)
vshymanskyy 0:58b20b438383 264 #define BLYNK_INFO_DEVICE "Edison"
Volodymyr Shymanskyy 3:31e4b850b126 265 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 266 #define BLYNK_BUFFERS_SIZE 4096
Volodymyr Shymanskyy 3:31e4b850b126 267 #elif defined(ARDUINO_ARCH_ARC32)
vshymanskyy 0:58b20b438383 268 #define BLYNK_INFO_DEVICE "Arduino 101"
Volodymyr Shymanskyy 3:31e4b850b126 269 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 270 #define BLYNK_BUFFERS_SIZE 1024
vshymanskyy 0:58b20b438383 271
vshymanskyy 0:58b20b438383 272 /* Konekt */
vshymanskyy 0:58b20b438383 273 #elif defined(ARDUINO_DASH)
vshymanskyy 0:58b20b438383 274 #define BLYNK_INFO_DEVICE "Dash"
vshymanskyy 0:58b20b438383 275 #elif defined(ARDUINO_DASHPRO)
vshymanskyy 0:58b20b438383 276 #define BLYNK_INFO_DEVICE "Dash Pro"
vshymanskyy 0:58b20b438383 277
vshymanskyy 0:58b20b438383 278 /* Red Bear Lab */
vshymanskyy 0:58b20b438383 279 #elif defined(ARDUINO_RedBear_Duo)
vshymanskyy 0:58b20b438383 280 #define BLYNK_INFO_DEVICE "RedBear Duo"
Volodymyr Shymanskyy 3:31e4b850b126 281 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 282 #define BLYNK_BUFFERS_SIZE 1024
vshymanskyy 0:58b20b438383 283 #elif defined(ARDUINO_BLEND)
vshymanskyy 0:58b20b438383 284 #define BLYNK_INFO_DEVICE "Blend"
vshymanskyy 0:58b20b438383 285 #elif defined(ARDUINO_BLEND_MICRO_8MHZ) || defined(ARDUINO_BLEND_MICRO_16MHZ)
vshymanskyy 0:58b20b438383 286 #define BLYNK_INFO_DEVICE "Blend Micro"
vshymanskyy 0:58b20b438383 287 #elif defined(ARDUINO_RBL_nRF51822)
vshymanskyy 0:58b20b438383 288 #define BLYNK_INFO_DEVICE "BLE Nano"
vshymanskyy 0:58b20b438383 289
vshymanskyy 0:58b20b438383 290 /* ESP8266 */
vshymanskyy 0:58b20b438383 291 #elif defined(ARDUINO_ESP8266_ESP01)
vshymanskyy 0:58b20b438383 292 #define BLYNK_INFO_DEVICE "ESP8266"
vshymanskyy 0:58b20b438383 293 #elif defined(ARDUINO_ESP8266_ESP12)
vshymanskyy 0:58b20b438383 294 #define BLYNK_INFO_DEVICE "ESP-12"
vshymanskyy 0:58b20b438383 295 #elif defined(ARDUINO_ESP8266_NODEMCU)
vshymanskyy 0:58b20b438383 296 #define BLYNK_INFO_DEVICE "NodeMCU"
vshymanskyy 0:58b20b438383 297 #elif defined(ARDUINO_ESP8266_THING)
vshymanskyy 0:58b20b438383 298 #define BLYNK_INFO_DEVICE "Esp Thing"
vshymanskyy 0:58b20b438383 299 #elif defined(ARDUINO_ESP8266_THING_DEV)
vshymanskyy 0:58b20b438383 300 #define BLYNK_INFO_DEVICE "Esp Thing Dev"
vshymanskyy 0:58b20b438383 301
Volodymyr Shymanskyy 7:8879692d4e6c 302 /* ESP32 */
Volodymyr Shymanskyy 7:8879692d4e6c 303 #elif defined(ARDUINO_ESP32_DEV)
Volodymyr Shymanskyy 7:8879692d4e6c 304 #define BLYNK_INFO_DEVICE "ESP32"
Volodymyr Shymanskyy 9:7369ec77a3ea 305 #elif defined(ARDUINO_ESP320)
Volodymyr Shymanskyy 9:7369ec77a3ea 306 #define BLYNK_INFO_DEVICE "SweetPeas ESP320"
Volodymyr Shymanskyy 9:7369ec77a3ea 307 #elif defined(ARDUINO_NANO32)
Volodymyr Shymanskyy 9:7369ec77a3ea 308 #define BLYNK_INFO_DEVICE "ESP32 Nano32"
Volodymyr Shymanskyy 9:7369ec77a3ea 309 #elif defined(ARDUINO_LoLin32)
Volodymyr Shymanskyy 9:7369ec77a3ea 310 #define BLYNK_INFO_DEVICE "LoLin32"
Volodymyr Shymanskyy 9:7369ec77a3ea 311 #elif defined(ARDUINO_ESPea32)
Volodymyr Shymanskyy 9:7369ec77a3ea 312 #define BLYNK_INFO_DEVICE "ESPea32"
Volodymyr Shymanskyy 9:7369ec77a3ea 313 #elif defined(ARDUINO_QUANTUM)
Volodymyr Shymanskyy 9:7369ec77a3ea 314 #define BLYNK_INFO_DEVICE "Noduino Quantum"
Volodymyr Shymanskyy 9:7369ec77a3ea 315
Volodymyr Shymanskyy 9:7369ec77a3ea 316 /* STM32 */
Volodymyr Shymanskyy 9:7369ec77a3ea 317 #elif defined(ARDUINO_ARCH_STM32F1)
Volodymyr Shymanskyy 9:7369ec77a3ea 318 #define BLYNK_INFO_DEVICE "STM32F1"
Volodymyr Shymanskyy 9:7369ec77a3ea 319 #define BLYNK_NO_YIELD
Volodymyr Shymanskyy 9:7369ec77a3ea 320 #elif defined(ARDUINO_ARCH_STM32F3)
Volodymyr Shymanskyy 9:7369ec77a3ea 321 #define BLYNK_INFO_DEVICE "STM32F3"
Volodymyr Shymanskyy 9:7369ec77a3ea 322 #define BLYNK_NO_YIELD
Volodymyr Shymanskyy 9:7369ec77a3ea 323 #elif defined(ARDUINO_ARCH_STM32F4)
Volodymyr Shymanskyy 9:7369ec77a3ea 324 #define BLYNK_INFO_DEVICE "STM32F4"
Volodymyr Shymanskyy 9:7369ec77a3ea 325 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 326 #define BLYNK_BUFFERS_SIZE 1024
Volodymyr Shymanskyy 9:7369ec77a3ea 327 #define BLYNK_NO_YIELD
Volodymyr Shymanskyy 7:8879692d4e6c 328
vshymanskyy 0:58b20b438383 329 /* Digistump */
vshymanskyy 0:58b20b438383 330 #elif defined(ARDUINO_ESP8266_OAK)
vshymanskyy 0:58b20b438383 331 #define BLYNK_INFO_DEVICE "Oak"
Volodymyr Shymanskyy 3:31e4b850b126 332 #define BLYNK_USE_128_VPINS
vshymanskyy 0:58b20b438383 333 #elif defined(ARDUINO_AVR_DIGISPARK)
vshymanskyy 0:58b20b438383 334 #define BLYNK_INFO_DEVICE "Digispark"
Volodymyr Shymanskyy 3:31e4b850b126 335 #define BLYNK_NO_YIELD
vshymanskyy 0:58b20b438383 336 #elif defined(ARDUINO_AVR_DIGISPARKPRO)
vshymanskyy 0:58b20b438383 337 #define BLYNK_INFO_DEVICE "Digispark Pro"
Volodymyr Shymanskyy 3:31e4b850b126 338 #define BLYNK_NO_YIELD
vshymanskyy 0:58b20b438383 339
vshymanskyy 0:58b20b438383 340 /* Microduino */
vshymanskyy 0:58b20b438383 341 #elif defined(ARDUINO_AVR_USB)
vshymanskyy 0:58b20b438383 342 #define BLYNK_INFO_DEVICE "CoreUSB"
vshymanskyy 0:58b20b438383 343 #elif defined(ARDUINO_AVR_PLUS)
vshymanskyy 0:58b20b438383 344 #define BLYNK_INFO_DEVICE "Core+"
vshymanskyy 0:58b20b438383 345 #elif defined(ARDUINO_AVR_RF)
vshymanskyy 0:58b20b438383 346 #define BLYNK_INFO_DEVICE "CoreRF"
vshymanskyy 0:58b20b438383 347
vshymanskyy 0:58b20b438383 348 /* Wildfire */
vshymanskyy 0:58b20b438383 349 #elif defined(ARDUINO_WILDFIRE_V2)
vshymanskyy 0:58b20b438383 350 #define BLYNK_INFO_DEVICE "Wildfire V2"
Volodymyr Shymanskyy 3:31e4b850b126 351 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 352 #define BLYNK_BUFFERS_SIZE 1024
vshymanskyy 0:58b20b438383 353 #elif defined(ARDUINO_WILDFIRE_V3)
vshymanskyy 0:58b20b438383 354 #define BLYNK_INFO_DEVICE "Wildfire V3"
Volodymyr Shymanskyy 3:31e4b850b126 355 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 356 #define BLYNK_BUFFERS_SIZE 1024
vshymanskyy 0:58b20b438383 357 #elif defined(ARDUINO_WILDFIRE_V4)
vshymanskyy 0:58b20b438383 358 #define BLYNK_INFO_DEVICE "Wildfire V4"
Volodymyr Shymanskyy 3:31e4b850b126 359 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 360 #define BLYNK_BUFFERS_SIZE 1024
vshymanskyy 0:58b20b438383 361
vshymanskyy 0:58b20b438383 362 /* Simblee */
Volodymyr Shymanskyy 3:31e4b850b126 363 #elif defined(__Simblee__)
vshymanskyy 0:58b20b438383 364 #define BLYNK_INFO_DEVICE "Simblee"
Volodymyr Shymanskyy 3:31e4b850b126 365 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 366 #define BLYNK_BUFFERS_SIZE 512
Volodymyr Shymanskyy 9:7369ec77a3ea 367
Volodymyr Shymanskyy 9:7369ec77a3ea 368 /* RFduino */
Volodymyr Shymanskyy 9:7369ec77a3ea 369 #elif defined(__RFduino__)
Volodymyr Shymanskyy 9:7369ec77a3ea 370 #define BLYNK_INFO_DEVICE "RFduino"
Volodymyr Shymanskyy 9:7369ec77a3ea 371 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 372 #define BLYNK_BUFFERS_SIZE 512
Volodymyr Shymanskyy 9:7369ec77a3ea 373
Volodymyr Shymanskyy 9:7369ec77a3ea 374 /* Nordic NRF5x */
Volodymyr Shymanskyy 9:7369ec77a3ea 375 #elif defined(ARDUINO_ARCH_NRF5)
Volodymyr Shymanskyy 9:7369ec77a3ea 376 #define BLYNK_INFO_DEVICE "nRF5"
Volodymyr Shymanskyy 9:7369ec77a3ea 377 #define BLYNK_USE_128_VPINS
Volodymyr Shymanskyy 9:7369ec77a3ea 378 #define BLYNK_BUFFERS_SIZE 512
vshymanskyy 0:58b20b438383 379
vshymanskyy 0:58b20b438383 380 #else
Volodymyr Shymanskyy 9:7369ec77a3ea 381 #if defined(BLYNK_DEBUG_ALL)
Volodymyr Shymanskyy 9:7369ec77a3ea 382 #warning "Cannot detect board type"
Volodymyr Shymanskyy 9:7369ec77a3ea 383 #endif
vshymanskyy 0:58b20b438383 384 #define BLYNK_INFO_DEVICE "Arduino"
vshymanskyy 0:58b20b438383 385 #endif
vshymanskyy 0:58b20b438383 386
Volodymyr Shymanskyy 7:8879692d4e6c 387 #endif
Volodymyr Shymanskyy 7:8879692d4e6c 388
Volodymyr Shymanskyy 9:7369ec77a3ea 389 #if !defined(BLYNK_MAX_READBYTES) && defined(BLYNK_BUFFERS_SIZE)
Volodymyr Shymanskyy 9:7369ec77a3ea 390 #define BLYNK_MAX_READBYTES BLYNK_BUFFERS_SIZE
Volodymyr Shymanskyy 9:7369ec77a3ea 391 #endif
Volodymyr Shymanskyy 9:7369ec77a3ea 392
Volodymyr Shymanskyy 9:7369ec77a3ea 393 #if !defined(BLYNK_MAX_SENDBYTES) && defined(BLYNK_BUFFERS_SIZE)
Volodymyr Shymanskyy 9:7369ec77a3ea 394 #define BLYNK_MAX_SENDBYTES BLYNK_BUFFERS_SIZE
Volodymyr Shymanskyy 9:7369ec77a3ea 395 #endif
Volodymyr Shymanskyy 9:7369ec77a3ea 396
Volodymyr Shymanskyy 9:7369ec77a3ea 397 // Print diagnostics
Volodymyr Shymanskyy 9:7369ec77a3ea 398
Volodymyr Shymanskyy 9:7369ec77a3ea 399 #if defined(BLYNK_DEBUG_ALL)
Volodymyr Shymanskyy 9:7369ec77a3ea 400 #if defined(BLYNK_INFO_DEVICE)
Volodymyr Shymanskyy 9:7369ec77a3ea 401 #pragma message ("BLYNK_INFO_DEVICE=" BLYNK_TOSTRING(BLYNK_INFO_DEVICE))
Volodymyr Shymanskyy 9:7369ec77a3ea 402 #endif
Volodymyr Shymanskyy 9:7369ec77a3ea 403
Volodymyr Shymanskyy 9:7369ec77a3ea 404 #if defined(BLYNK_INFO_CPU)
Volodymyr Shymanskyy 9:7369ec77a3ea 405 #pragma message ("BLYNK_INFO_CPU=" BLYNK_TOSTRING(BLYNK_INFO_CPU))
Volodymyr Shymanskyy 9:7369ec77a3ea 406 #endif
Volodymyr Shymanskyy 9:7369ec77a3ea 407
Volodymyr Shymanskyy 9:7369ec77a3ea 408 #if defined(BLYNK_BUFFERS_SIZE)
Volodymyr Shymanskyy 9:7369ec77a3ea 409 #pragma message ("BLYNK_BUFFERS_SIZE=" BLYNK_TOSTRING(BLYNK_BUFFERS_SIZE))
Volodymyr Shymanskyy 9:7369ec77a3ea 410 #endif
Volodymyr Shymanskyy 7:8879692d4e6c 411 #endif
Volodymyr Shymanskyy 7:8879692d4e6c 412
vshymanskyy 0:58b20b438383 413 #endif
vshymanskyy 0:58b20b438383 414
vshymanskyy 0:58b20b438383 415 #endif