Clean up unused macros and outdated comments (#6520)

* Updating comments and removing residue

* Some more unused macros
This commit is contained in:
Woutvstk 2025-04-08 15:27:47 +02:00 committed by GitHub
parent aca9ceebfa
commit 6d8bedb027
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 13 deletions

View File

@ -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

View File

@ -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