diff --git a/software/firmware/source/SoftRF/src/platform/RP2040.cpp b/software/firmware/source/SoftRF/src/platform/RP2040.cpp index cec73eb1e..346b743d1 100644 --- a/software/firmware/source/SoftRF/src/platform/RP2040.cpp +++ b/software/firmware/source/SoftRF/src/platform/RP2040.cpp @@ -224,7 +224,8 @@ static void RP2040_msc_flush_cb (void) } #endif /* ARDUINO_ARCH_MBED */ -#if defined(ARDUINO_RASPBERRY_PI_PICO) && !defined(EXCLUDE_WIFI) +#if defined(ARDUINO_RASPBERRY_PI_PICO) && \ + !defined(EXCLUDE_WIFI) && !defined(ESPHOSTSPI) SPIClassRP2040 SPI0(spi0, PIN_SPI0_MISO, PIN_SPI0_SS, PIN_SPI0_SCK, PIN_SPI0_MOSI); #endif /* EXCLUDE_WIFI */ @@ -283,7 +284,7 @@ static void RP2040_setup() #if defined(ARDUINO_RASPBERRY_PI_PICO) RP2040_board = RP2040_RPIPICO; -#if !defined(EXCLUDE_WIFI) +#if !defined(EXCLUDE_WIFI) && !defined(ESPHOSTSPI) WiFi.setPins(PIN_SPI0_SS, D26, D24, D20, &SPI0); #endif /* EXCLUDE_WIFI */ #elif defined(ARDUINO_RASPBERRY_PI_PICO_W) diff --git a/software/firmware/source/SoftRF/src/platform/RP2040.h b/software/firmware/source/SoftRF/src/platform/RP2040.h index fc1fb870b..db436467d 100644 --- a/software/firmware/source/SoftRF/src/platform/RP2040.h +++ b/software/firmware/source/SoftRF/src/platform/RP2040.h @@ -236,7 +236,14 @@ struct rst_info { #define ENABLE_PROL //#define ENABLE_BT_VOICE #else +#if defined(ESPHOSTSPI) +#include +#define Serial_setDebugOutput(x) ({}) +#define USE_ARDUINO_WIFI +#define EXCLUDE_OTA +#else #define EXCLUDE_WIFI +#endif /* ESPHOSTSPI */ //#define EXCLUDE_OTA //#define USE_ARDUINO_WIFI //#define USE_WIFI_NINA false diff --git a/software/firmware/source/SoftRF/src/ui/Web.cpp b/software/firmware/source/SoftRF/src/ui/Web.cpp index 9e5991e5c..e33312138 100644 --- a/software/firmware/source/SoftRF/src/ui/Web.cpp +++ b/software/firmware/source/SoftRF/src/ui/Web.cpp @@ -57,8 +57,13 @@ static uint32_t prev_rx_pkt_cnt = 0; #include "jquery_min_js.h" #endif /* EXCLUDE_OTA */ +#if defined(ESPHOSTSPI) +#include +WebServer server ( 80 ); +#else #include WiFiWebServer server ( 80 ); +#endif byte getVal(char c) { diff --git a/software/firmware/source/libraries/LibAPRS_ESP32/AX25.cpp b/software/firmware/source/libraries/LibAPRS_ESP32/AX25.cpp index 85111991d..961446c73 100644 --- a/software/firmware/source/libraries/LibAPRS_ESP32/AX25.cpp +++ b/software/firmware/source/libraries/LibAPRS_ESP32/AX25.cpp @@ -29,12 +29,16 @@ uint8_t *ctxbuffer; #define typeof(x) __typeof__(x) #define countof(a) sizeof(a) / sizeof(a[0]) + +#ifndef MIN #define MIN(a, b) ( \ { \ typeof(a) _a = (a); \ typeof(b) _b = (b); \ ((typeof(_a))((_a < _b) ? _a : _b)); \ }) +#endif + #define DECODE_CALL(buf, addr) \ for (unsigned i = 0; i < sizeof((addr)) - CALL_OVERSPACE; i++) \ { \