From 5cdf3ca380c27795020c45636d240703d8968163 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Sun, 22 Nov 2020 17:20:37 +0100 Subject: [PATCH] Rename hasp_ethernet driver for stm32 --- include/hasp_conf.h | 16 ++++++---------- ...hasp_ethernet.cpp => hasp_ethernet_stm32.cpp} | 0 src/{hasp_ethernet.h => hasp_ethernet_stm32.h} | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-) rename src/{hasp_ethernet.cpp => hasp_ethernet_stm32.cpp} (100%) rename src/{hasp_ethernet.h => hasp_ethernet_stm32.h} (78%) diff --git a/include/hasp_conf.h b/include/hasp_conf.h index 0bcad137..8d739b66 100644 --- a/include/hasp_conf.h +++ b/include/hasp_conf.h @@ -122,7 +122,12 @@ #if HASP_USE_WIFI > 0 #include "hasp_wifi.h" + +#if defined(STM32F4xx) +#include "WiFiSpi.h" +static WiFiSpiClass WiFi; #endif +#endif // HASP_USE_WIFI #if HASP_USE_ETHERNET > 0 #if defined(ARDUINO_ARCH_ESP32) @@ -152,7 +157,7 @@ #include "Ethernet.h" #warning Use W5x00 Ethernet shield #endif -#include "hasp_ethernet.h" +#include "hasp_ethernet_stm32.h" #endif #endif @@ -195,15 +200,6 @@ #include "hasp_slave.h" #endif -#if HASP_USE_ETHERNET > 0 -#include "hasp_ethernet.h" -#endif - -#if HASP_USE_WIFI > 0 && defined(STM32F4xx) -#include "WiFiSpi.h" -static WiFiSpiClass WiFi; -#endif - #ifndef FPSTR #define FPSTR(pstr_pointer) (reinterpret_cast(pstr_pointer)) #endif diff --git a/src/hasp_ethernet.cpp b/src/hasp_ethernet_stm32.cpp similarity index 100% rename from src/hasp_ethernet.cpp rename to src/hasp_ethernet_stm32.cpp diff --git a/src/hasp_ethernet.h b/src/hasp_ethernet_stm32.h similarity index 78% rename from src/hasp_ethernet.h rename to src/hasp_ethernet_stm32.h index a35bf4dc..bfa1b432 100644 --- a/src/hasp_ethernet.h +++ b/src/hasp_ethernet_stm32.h @@ -1,8 +1,8 @@ /* MIT License - Copyright (c) 2020 Francis Van Roie For full license information read the LICENSE file in the project folder */ -#ifndef HASP_ETHERNET_H -#define HASP_ETHERNET_H +#ifndef HASP_ETHERNET_STM32_H +#define HASP_ETHERNET_STM32_H void ethernetSetup(); void ethernetLoop(void);