OK I think I have your solution…
Remove the
#define USE_HSPI_PORT 1
The you need to bring this code into your code. I located the pin numbers for the SD card reader.
#include "FS.h"
#include "SD.h"
#include "SPI.h"
#define SD_CS = 5
#define SD_MOSI = 23
#define SD_CLK = 18
#define SD_MISO = 19
SPIClass * sd_spi = NULL;
sd_spi = new SPIClass(HSPI);
void setup() {
Serial.begin(115200);
Serial.println("Serial communication started.");
sd_spi->begin(SD_CLK, SD_MISO, SD_MOSI, SD_CS);
pinMode(sd_spi->pinSS(), OUTPUT);
if (!SD.begin(SD_CS, sd_spi, 80000000)) {
Serial.println("SD Initialization failed!");
}
}