Increased the SD card speed from 4 MHz to 25 MHz for faster directory reading.

This commit is contained in:
Fabian Schlenz 2019-11-17 00:35:55 +01:00
parent 5c15a7d4cb
commit 566068f7cd

View File

@ -3,6 +3,7 @@
#include <SD.h>
#include <WiFi.h>
#include <ESPmDNS.h>
#include <SPIFFS.h>
#include "config.h"
#include "controller.h"
#include "player.h"
@ -41,13 +42,16 @@ void setup() {
DEBUG("Setting up SD card...\n");
spi->select_sd();
if (SD.begin(42)) {
if (SD.begin(42, SPI, 25000000)) {
INFO("SD card initialized.\n");
} else {
ERROR("Could not initialize SD card.\n");
}
spi->select_sd(false);
DEBUG("Starting SPIFFS...\n");
SPIFFS.begin(true);
DEBUG("Initializing PlaylistManager...\n");
pm = new PlaylistManager();
DEBUG("done.\n");