Add support for WifiEsp library

pull/103/head
Timothy Johnson 5 years ago
parent 0b64aae1b0
commit f53a95b1da

@ -20,6 +20,9 @@
#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#elif defined(EZTIME_WIFIESP)
#include <WifiEsp.h>
#include <WifiEspUdp.h>
#else
#include <WiFi.h>
#include <WiFiUdp.h>
@ -416,7 +419,11 @@ namespace ezt {
#ifndef EZTIME_ETHERNET
if (WiFi.status() != WL_CONNECTED) { triggerError(NO_NETWORK); return false; }
#ifndef EZTIME_WIFIESP
WiFiUDP udp;
#else
WiFiEspUDP udp;
#endif
#else
EthernetUDP udp;
#endif
@ -799,7 +806,11 @@ String Timezone::getPosix() { return _posix; }
#ifndef EZTIME_ETHERNET
if (WiFi.status() != WL_CONNECTED) { triggerError(NO_NETWORK); return false; }
#ifndef EZTIME_WIFIESP
WiFiUDP udp;
#else
WiFiEspUDP udp;
#endif
#else
EthernetUDP udp;
#endif

@ -13,6 +13,9 @@
// Arduino Ethernet shields
// #define EZTIME_ETHERNET
// Arduino board with ESP8266 shield
// #define EZTIME_WIFIESP
// Uncomment one of the below to only put only messages up to a certain level in the compiled code
// (You still need to turn them on with setDebug(someLevel) to see them)
// #define EZTIME_MAX_DEBUGLEVEL_NONE

Loading…
Cancel
Save