make network hardware selectable

This commit is contained in:
technyon
2023-02-03 20:40:21 +01:00
parent 13e7643b0d
commit bdb1cff935
7 changed files with 59 additions and 24 deletions

View File

@@ -6,10 +6,16 @@
#include <Ethernet.h>
#include <Preferences.h>
enum class W5500Variant
{
Generic = 1,
M5StackAtomPoe = 2
};
class W5500Device : public NetworkDevice
{
public:
explicit W5500Device(const String& hostname, Preferences* _preferences);
explicit W5500Device(const String& hostname, Preferences* _preferences, int variant);
~W5500Device();
virtual void initialize();
@@ -61,6 +67,7 @@ private:
int _maintainResult = 0;
bool _hasDHCPAddress = false;
char* _path;
W5500Variant _variant;
byte _mac[6];
};