From 89b7753cd46bf44c152c8db35ed9407ca882e9f0 Mon Sep 17 00:00:00 2001 From: glutesha Date: Fri, 14 Aug 2026 19:38:32 +0300 Subject: [PATCH] fix: use FSPI port number for proper SPI pins initialization on esp32-c3 based boards --- variants/tenstar_c3/target.cpp | 3 +-- variants/xiao_c3/target.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/variants/tenstar_c3/target.cpp b/variants/tenstar_c3/target.cpp index 909625edfc..4488e17304 100644 --- a/variants/tenstar_c3/target.cpp +++ b/variants/tenstar_c3/target.cpp @@ -4,7 +4,7 @@ XiaoC3Board board; #if defined(P_LORA_SCLK) - static SPIClass spi; + static SPIClass spi(FSPI); RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi); #else RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY); @@ -31,4 +31,3 @@ mesh::LocalIdentity radio_new_identity() { RadioNoiseListener rng(radio); return mesh::LocalIdentity(&rng); // create new random identity } - diff --git a/variants/xiao_c3/target.cpp b/variants/xiao_c3/target.cpp index 7f30dc8b60..d1bae8a076 100644 --- a/variants/xiao_c3/target.cpp +++ b/variants/xiao_c3/target.cpp @@ -4,7 +4,7 @@ XiaoC3Board board; #if defined(P_LORA_SCLK) - static SPIClass spi; + static SPIClass spi(FSPI); RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi); #else RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY); @@ -39,4 +39,3 @@ mesh::LocalIdentity radio_new_identity() { RadioNoiseListener rng(radio); return mesh::LocalIdentity(&rng); // create new random identity } -