mirror of
https://github.com/meshtastic/firmware.git
synced 2026-09-17 18:45:37 -04:00
fix SPI1 instances (#10983)
This commit is contained in:
1 parent
8abae90838
commit
f52e2ea8ef
2 files changed
+12
No files matched your search
@@ -196,8 +196,16 @@ void setupNicheGraphics();
|
||||
#endif
|
||||
|
||||
#if defined(HW_SPI1_DEVICE) && defined(ARCH_ESP32)
|
||||
#if defined(HAS_SDCARD) && defined(SDCARD_USE_SPI1)
|
||||
// Reuse FSCommon's SPI_HSPI instance to avoid double-initializing SPI2_HOST in arduino-esp32 3.x.
|
||||
// Two SPIClass(HSPI) objects on the same bus cause the second spi_bus_initialize() to return
|
||||
// ESP_ERR_INVALID_STATE, leaving the LoRa device handle invalid and blocking SPI transfers.
|
||||
extern SPIClass SPI_HSPI;
|
||||
SPIClass &SPI1 = SPI_HSPI;
|
||||
#else
|
||||
SPIClass SPI1(HSPI);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using namespace concurrency;
|
||||
|
||||
|
||||
Reference in new issue
Block a user