From fb89482129315069bf7551a78f76a3ea30272528 Mon Sep 17 00:00:00 2001 From: S5NC <145265251+S5NC@users.noreply.github.com> Date: Thu, 30 Nov 2023 12:39:46 +0000 Subject: [PATCH] Set default LoRa SPI pins individually on ESP32 architecture (#2971) * Each pin individually * Correction --------- Co-authored-by: Jonathan Bennett Co-authored-by: Ben Meadors --- src/platform/esp32/architecture.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/platform/esp32/architecture.h b/src/platform/esp32/architecture.h index 781d41678..0686aa59f 100644 --- a/src/platform/esp32/architecture.h +++ b/src/platform/esp32/architecture.h @@ -127,12 +127,20 @@ // LoRa SPI // ----------------------------------------------------------------------------- -// NRF52 boards will define this in variant.h +// If an SPI-related pin used by the LoRa module isn't defined, use the conventional pin number for it. +// FIXME: these pins should really be defined in each variant.h file to prevent breakages if the defaults change, currently many +// ESP32 variants don't define these pins in their variant.h file. #ifndef LORA_SCK #define LORA_SCK 5 +#endif +#ifndef LORA_MISO #define LORA_MISO 19 +#endif +#ifndef LORA_MOSI #define LORA_MOSI 27 +#endif +#ifndef LORA_CS #define LORA_CS 18 #endif -#define SERIAL0_RX_GPIO 3 // Always GPIO3 on ESP32 \ No newline at end of file +#define SERIAL0_RX_GPIO 3 // Always GPIO3 on ESP32 // FIXME: may be different on ESP32-S3, etc. \ No newline at end of file