Add HaspNetworkClient

This commit is contained in:
fvanroie 2021-05-20 12:36:37 +02:00
parent 73fb9b8b3a
commit fa51ebc865
2 changed files with 7 additions and 1 deletions

View File

@ -176,11 +176,17 @@ static WiFiSpiClass WiFi;
#if HASP_USE_W5500 > 0
#include "sys/net/hasp_ethernet_lib.h"
#define HaspNetworkClient EthernetClient
#define HaspNetworkServer EthernetServer
#warning Using ESP32 Ethernet W5500
#else
#include <ETH.h>
#define HaspNetworkClient WiFiClient
#define HaspNetworkServer WiFiServer
#define ETH_ADDR 0
#define ETH_POWER_PIN -1
#define ETH_MDC_PIN 23

View File

@ -56,7 +56,7 @@ const char* rootCACertificate = "-----BEGIN CERTIFICATE-----\n"
"-----END CERTIFICATE-----\n";
#endif
static WiFiClient otaClient;
static HaspNetworkClient otaClient;
std::string otaUrl = "http://ota.netwize.be";
int16_t otaPort = HASP_OTA_PORT;
int8_t otaPrecentageComplete = -1;