initial w5500 support

This commit is contained in:
technyon
2022-04-26 22:12:52 +02:00
parent 2a1f5facf9
commit 677f7e56c8
11 changed files with 314 additions and 71 deletions

View File

@@ -1,4 +1,5 @@
#include "Arduino.h"
#include "Pins.h"
#include "NukiWrapper.h"
#include "Network.h"
#include "WebCfgServer.h"
@@ -80,11 +81,16 @@ uint32_t getRandomId()
void setup()
{
pinMode(NETWORK_SELECT, INPUT_PULLUP);
Serial.begin(115200);
const NetworkDeviceType networkDevice = NetworkDeviceType::WiFi;
// const NetworkDeviceType networkDevice = digitalRead(NETWORK_SELECT) == HIGH ? NetworkDeviceType::WiFi : NetworkDeviceType::W5500;
preferences = new Preferences();
preferences->begin("nukihub", false);
network = new Network(preferences);
network = new Network(networkDevice, preferences);
network->initialize();
uint32_t deviceId = preferences->getUInt(preference_deviceId);