M5Stick-Launcher patch
This commit is contained in:
parent
6a6ed1279d
commit
523581a605
5 changed files with 6 additions and 4 deletions
|
@ -347,7 +347,7 @@ start:
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
auto path = loopSD(SD_MMC);
|
auto path = loopSD(SD);
|
||||||
if (path.equals(""))
|
if (path.equals(""))
|
||||||
{
|
{
|
||||||
redraw = true;
|
redraw = true;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <FS.h>
|
#include <FS.h>
|
||||||
|
#include <SD.h>
|
||||||
#include <SD_MMC.h>
|
#include <SD_MMC.h>
|
||||||
|
|
||||||
#define MAXFILES 256
|
#define MAXFILES 256
|
||||||
|
|
|
@ -303,7 +303,7 @@ void loadFile(void *parameter)
|
||||||
}
|
}
|
||||||
else if (ext.compare(".prg") == 0)
|
else if (ext.compare(".prg") == 0)
|
||||||
{
|
{
|
||||||
uint16_t addr = sdcard.loadFile(SD_MMC, path.c_str(), ram);
|
uint16_t addr = sdcard.loadFile(SD, path.c_str(), ram);
|
||||||
if (sdcard.loadAddr == 0)
|
if (sdcard.loadAddr == 0)
|
||||||
{
|
{
|
||||||
ESP_LOGI(TAG, "error loading file");
|
ESP_LOGI(TAG, "error loading file");
|
||||||
|
|
|
@ -36,8 +36,8 @@ bool SDCard::init()
|
||||||
vTaskDelay(500 / portTICK_PERIOD_MS);
|
vTaskDelay(500 / portTICK_PERIOD_MS);
|
||||||
pinMode(PWR_EN_PIN, OUTPUT);
|
pinMode(PWR_EN_PIN, OUTPUT);
|
||||||
digitalWrite(PWR_EN_PIN, HIGH);
|
digitalWrite(PWR_EN_PIN, HIGH);
|
||||||
SD_MMC.setPins(SD_SCLK_PIN, SD_MOSI_PIN, SD_MISO_PIN);
|
SPI.begin(SD_SCLK_PIN, SD_MISO_PIN, SD_MOSI_PIN);
|
||||||
bool rlst = SD_MMC.begin("/sdcard", true);
|
bool rlst = SD.begin(PWR_EN_PIN, SPI, 4000000, "/sdcard", 5, false);
|
||||||
if (!rlst)
|
if (!rlst)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <FS.h>
|
#include <FS.h>
|
||||||
|
#include <SD.h>
|
||||||
#include <SD_MMC.h>
|
#include <SD_MMC.h>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue