23 lines
327 B
C
23 lines
327 B
C
|
#ifdef ESP8266
|
||
|
#include <ESP8266WiFi.h>
|
||
|
#else // ESP32
|
||
|
#include <WiFi.h>
|
||
|
#include <ETH.h>
|
||
|
#endif
|
||
|
|
||
|
#ifndef Network_h
|
||
|
#define Network_h
|
||
|
|
||
|
class NetworkClass
|
||
|
{
|
||
|
public:
|
||
|
IPAddress localIP();
|
||
|
IPAddress subnetMask();
|
||
|
IPAddress gatewayIP();
|
||
|
bool isConnected();
|
||
|
bool isEthernet();
|
||
|
};
|
||
|
|
||
|
extern NetworkClass Network;
|
||
|
|
||
|
#endif
|