From 26a03b5ccf905294a105a34859ebab20ac5826d7 Mon Sep 17 00:00:00 2001 From: Rick Watson Date: Sun, 11 Nov 2018 16:44:29 +0000 Subject: [PATCH] preprocessor includes for esp8266 and esp32 environments --- src/APStatus.h | 10 ++++++++-- src/NTPStatus.h | 10 ++++++++-- src/SettingsService.h | 11 +++++++++-- src/SimpleService.h | 10 ++++++++-- src/WiFiScanner.h | 10 ++++++++-- src/WiFiStatus.h | 10 ++++++++-- src/main.cpp | 12 +++++++++--- 7 files changed, 58 insertions(+), 15 deletions(-) diff --git a/src/APStatus.h b/src/APStatus.h index 72bea98..044173d 100644 --- a/src/APStatus.h +++ b/src/APStatus.h @@ -1,8 +1,14 @@ #ifndef APStatus_h #define APStatus_h -#include -#include +#if defined(ESP8266) + #include + #include +#elif defined(ESP_PLATFORM) + #include + #include +#endif + #include #include #include diff --git a/src/NTPStatus.h b/src/NTPStatus.h index b9dfa00..5451efd 100644 --- a/src/NTPStatus.h +++ b/src/NTPStatus.h @@ -1,8 +1,14 @@ #ifndef NTPStatus_h #define NTPStatus_h -#include -#include +#if defined(ESP8266) + #include + #include +#elif defined(ESP_PLATFORM) + #include + #include +#endif + #include #include #include diff --git a/src/SettingsService.h b/src/SettingsService.h index 4be1ff2..182082d 100644 --- a/src/SettingsService.h +++ b/src/SettingsService.h @@ -1,8 +1,15 @@ #ifndef SettingsService_h #define SettingsService_h -#include -#include +#if defined(ESP8266) + #include + #include +#elif defined(ESP_PLATFORM) + #include + #include + #include +#endif + #include #include #include diff --git a/src/SimpleService.h b/src/SimpleService.h index 4bf0ded..4f2daec 100644 --- a/src/SimpleService.h +++ b/src/SimpleService.h @@ -1,8 +1,14 @@ #ifndef Service_h #define Service_h -#include -#include +#if defined(ESP8266) + #include + #include +#elif defined(ESP_PLATFORM) + #include + #include +#endif + #include #include #include diff --git a/src/WiFiScanner.h b/src/WiFiScanner.h index b94784b..646786f 100644 --- a/src/WiFiScanner.h +++ b/src/WiFiScanner.h @@ -1,8 +1,14 @@ #ifndef WiFiScanner_h #define WiFiScanner_h -#include -#include +#if defined(ESP8266) + #include + #include +#elif defined(ESP_PLATFORM) + #include + #include +#endif + #include #include #include diff --git a/src/WiFiStatus.h b/src/WiFiStatus.h index 15fed19..d600abf 100644 --- a/src/WiFiStatus.h +++ b/src/WiFiStatus.h @@ -1,8 +1,14 @@ #ifndef WiFiStatus_h #define WiFiStatus_h -#include -#include +#if defined(ESP8266) + #include + #include +#elif defined(ESP_PLATFORM) + #include + #include +#endif + #include #include #include diff --git a/src/main.cpp b/src/main.cpp index 7134a7b..61634ef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,9 +1,15 @@ #include -#include -#include -#include +#if defined(ESP8266) + #include + #include +#elif defined(ESP_PLATFORM) + #include + #include + #include +#endif +#include #include #include #include