-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdependencies.h
149 lines (112 loc) · 3.99 KB
/
dependencies.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/*
* ******************************************************************************
* Copyright (c) 2013-2014 CriativaSoft (www.criativasoft.com.br)
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ricardo JL Rufino - Initial API and Implementation
* *****************************************************************************
*/
#ifndef LIBRARIES_OPENDEVICE_DEPENDENCIES_H_
#define LIBRARIES_OPENDEVICE_DEPENDENCIES_H_
// *******************************************************************************************
// Configure dependencies used in your project (Please comment unused dependencies)
// *******************************************************************************************
// ===========================================================
// Automatic Detection of Connections
// ===========================================================
#ifdef ESP8266
#include <ESP8266WiFi.h>
#endif
// #if defined(ethernet_h) || defined (UIPETHERNET_H)
// #ifdef PubSubClient_h
// #include "MQTTConnection.h"
// #else
// #include "EthernetServerConnection.h"
// #endif
//
// #endif
// MQTT + ESP8266
#if defined(PubSubClient_h) && defined(ESP8266)
#include "connections/MQTTWifiConnection.h"
#endif
// MQTT + Ethernet Shield / Arduino YUN
#if defined(PubSubClient_h) && ( defined(ethernet_h) || defined(_YUN_CLIENT_H_))
#include <PubSubClient.h>
#include "connections/MQTTEthConnection.h"
#endif
// Arduino YUN Wifi/Ethernet Server
#if defined(_YUN_SERVER_H_) && !defined(PubSubClient_h)
#include "connections/YunServerConnection.h"
#endif
// ESP8266 AT Command library
#if defined(__ESP8266AT_H__)
#include <connections/WifiConnetionEspAT.h>
#endif
#if defined(_EL_CLIENT_H_)
#include <connections/EspLinkConnection.cpp>
#endif
// ESP8266 as TCP Server
#if defined(ESP8266) && !defined(PubSubClient_h)
#include "stdlib_noniso.h"
#include <ESP8266WiFi.h>
#include <connections/WifiConnection.h>
#endif
//================================================
// Features
//================================================
#include "utility/TaskScheduler.h" // Enable support for Task Schedule (Cooperative multitasking)
// Enable OTA Updates - loading the firmware to ESP module using Wi-Fi connection
// Disable to reduce flash size or for security reasons
// SEE: https://opendevice.atlassian.net/wiki/pages/viewpage.action?pageId=37519365
#ifdef __ARDUINO_OTA_H
#include <ArduinoOTA.h>
#endif
#if defined(__ARDUINO_OTA_H) && defined(ESP8266) // Enable OTA Updates
#include <ESP8266httpUpdate.h>
#endif
#include "utility/RemoteUpdate.h"
// Enable integration with Alexa (from config.h)
#if defined(ENABLE_ALEXA_PROTOCOL) && defined(ESP8266)
#include <protocol/AlexaProtocol.h>
#include <protocol/AlexaDevice.h>
#endif
//================================================
// Boards and Connections
//================================================
// #include <ESP8266WiFi.h> // ESP8266 - Standalone
// #include <ESP8266AT.h> // ESP8266 - AT Firmwware
//#include <YunClient.h>
// #include <PubSubClient.h> // Enable MQTT
//#if defined(EnableInterrupt_h)
//#define EI_ARDUINO_INTERRUPTED_PIN
//#define LIBCALL_ENABLEINTERRUPT
//#include <EnableInterrupt.h>
//#endif
//================================================
// Devices
//================================================
#if defined(MFRC522_h)
#include <devices/RFIDSensor.cpp>
#endif
#if defined(_RCSwitch_h)
#include <devices/RFSensor.cpp>
#endif
#if defined(IRremote_h) || defined(IRREMOTEESP8266_H_)
#include <devices/IRSensor.cpp>
#include <devices/IRDevice.cpp>
#endif
#if defined(_ADAFRUIT_SENSOR_H)
#include <devices/AdafruitSensor.cpp>
#endif
// --- IR DEVICE
//#if defined(ESP8266)
//#include "IRremoteESP8266.h"
//#else
//#include "IRremote.h"
//#endif
// -- END
#endif /* LIBRARIES_OPENDEVICE_SRC_DEPENDENCIES_H_ */