diff --git a/src/FSCommon.cpp b/src/FSCommon.cpp index cfb47970d..48406ad05 100644 --- a/src/FSCommon.cpp +++ b/src/FSCommon.cpp @@ -26,11 +26,11 @@ SPIClass SDHandler = SPIClass(VSPI); #endif #elif defined(ARCH_NRF52) #if defined(SDCARD_USE_SPI1) -#define SDHandler SPI1 // only used for esp32, SPI selection for NRF52 happens in variant.h (for now) +#define SDHandler SPI1 #elif defined(SDCARD_USE_SPI) -#define SDHandler SPI // only used for esp32 -#endif // NRF52 SPI or SPI1 -#endif // ESP32/NRF52 +#define SDHandler SPI +#endif // NRF52 SPI or SPI1 +#endif // ESP32/NRF52 #ifndef SD_SPI_FREQUENCY #define SD_SPI_FREQUENCY 4000000U #endif @@ -344,9 +344,9 @@ void setupSDCard() uint64_t cardSize = SD.cardSize() / (1024 * 1024); LOG_DEBUG("SD Card Size: %lu MB", (uint32_t)cardSize); LOG_DEBUG("Total space: %lu MB", (uint32_t)(SD.totalBytes() / (1024 * 1024))); - LOG_INFO("Now scanning free clusters on SD card"); - delay(100); // let serial print the above statement properly - LOG_DEBUG("Used space: %lu MB", (uint32_t)(SD.usedBytes() / (1024 * 1024))); + LOG_INFO("Now scanning free clusters on SD card, this may take some time..."); + delay(100); // let serial print the above statement properly + LOG_DEBUG("Used space: %lu MB", (uint32_t)(SD.usedBytes() / (1024 * 1024))); // This might take some time during boot #endif #endif diff --git a/variants/rak4631/variant.h b/variants/rak4631/variant.h index 67551bfcc..f2087c2a5 100644 --- a/variants/rak4631/variant.h +++ b/variants/rak4631/variant.h @@ -130,12 +130,6 @@ static const uint8_t SCK = PIN_SPI_SCK; #define HAS_SDCARD 1 #define SDCARD_USE_SPI1 1 -#ifdef SDCARD_USE_SPI1 -#define SDCARD_SPI SPI1 -#endif -#define SPI_MOSI PIN_SPI1_MOSI -#define SPI_SCK PIN_SPI1_SCK -#define SPI_MISO PIN_SPI1_MISO #define SDCARD_CS (26) // Some settings for the SdFat library to optimize flash usage