forked from blynkkk/blynk-library
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBlynkSimpleSerial.h
39 lines (32 loc) · 1.13 KB
/
BlynkSimpleSerial.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* @file BlynkSimpleSerial.h
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Jan 2015
* @brief
*
*/
#ifndef BlynkSimpleSerial_h
#define BlynkSimpleSerial_h
#include <Adapters/BlynkSerial.h>
#warning BlynkSimpleSerial is now deprecated. It will be removed soon. Check the latest USB/Serial examples.
#if defined(__SAMD21G18A__)
// For Arduino Zero (M0)
typedef BlynkTransportSerialChecked<Uart> ArduinoHwSerial;
#elif defined(__SAM3X8E__)
// For Arduino Due
typedef BlynkTransportSerialChecked<UARTClass> ArduinoHwSerial;
#elif defined(TEENSYDUINO)
typedef BlynkTransportSerialChecked<usb_serial_class> ArduinoHwSerial;
#elif defined(USBCON)
// For versions with hw USB, like Micro
typedef BlynkTransportSerialChecked<Serial_> ArduinoHwSerial;
#else
// For versions with UART
typedef BlynkTransportSerial<HardwareSerial> ArduinoHwSerial;
#endif
static ArduinoHwSerial _blynkTransport(Serial);
BlynkSerial<ArduinoHwSerial> Blynk(_blynkTransport);
#include <BlynkWidgets.h>
#endif