mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-05 19:46:38 +08:00
Add SDIIO Pins customization as suggested by @liqijian101
Fixes https://github.com/luc-github/ESP3D/issues/808
This commit is contained in:
parent
70fa36837a
commit
d699b035ba
@ -386,6 +386,31 @@
|
||||
//Pins for the support of SD Card Reader
|
||||
//-1 means use default pins of your board defined core
|
||||
//this are overwrited if defined in configuration.h or myconfig.h
|
||||
|
||||
#ifndef ESP_SDIO_CLK_PIN
|
||||
#define ESP_SDIO_CLK_PIN -1
|
||||
#endif // ESP_SDIO_CLK_PIN
|
||||
|
||||
#ifndef ESP_SDIO_CMD_PIN
|
||||
#define ESP_SDIO_CMD_PIN -1
|
||||
#endif // ESP_SDIO_CMD_PIN
|
||||
|
||||
#ifndef ESP_SDIO_D0_PIN
|
||||
#define ESP_SDIO_D0_PIN -1
|
||||
#endif //ESP_SDIO_D0_PIN
|
||||
|
||||
#ifndef ESP_SDIO_D1_PIN
|
||||
#define ESP_SDIO_D1_PIN -1
|
||||
#endif //ESP_SDIO_D1_PIN
|
||||
|
||||
#ifndef ESP_SDIO_D2_PIN
|
||||
#define ESP_SDIO_D2_PIN -1
|
||||
#endif //ESP_SDIO_D2_PIN
|
||||
|
||||
#ifndef ESP_SDIO_D3_PIN
|
||||
#define ESP_SDIO_D3_PIN -1
|
||||
#endif //ESP_SDIO_D3_PIN
|
||||
|
||||
#ifndef ESP_SD_CS_PIN
|
||||
#define ESP_SD_CS_PIN -1
|
||||
#endif //ESP_SD_CS_PIN
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define _VERSION_ESP3D_H
|
||||
|
||||
//version and sources location
|
||||
#define FW_VERSION "3.0.0.a213"
|
||||
#define FW_VERSION "3.0.0.a214"
|
||||
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
|
||||
|
||||
#endif //_VERSION_ESP3D_H
|
||||
|
@ -101,6 +101,9 @@ uint8_t ESP_SD::getState(bool refresh)
|
||||
|
||||
bool ESP_SD::begin()
|
||||
{
|
||||
#if (ESP_SDIO_CLK_PIN != -1) || (ESP_SDIO_CMD_PIN != -1) || (ESP_SDIO_D0_PIN != -1) || (ESP_SDIO_D1_PIN != -1) || (ESP_SDIO_D2_PIN != -1) || (ESP_SDIO_D3_PIN != -1)
|
||||
SD_MMC.setPins(ESP_SDIO_CLK_PIN, ESP_SDIO_CMD_PIN, ESP_SDIO_D0_PIN, ESP_SDIO_D1_PIN, ESP_SDIO_D2_PIN, ESP_SDIO_D3_PIN)
|
||||
#endif //(ESP_SDIO_CLK_PIN != -1)
|
||||
log_esp3d("Begin SDIO");
|
||||
_started = true;
|
||||
#ifdef SDMMC_FORCE_BEGIN
|
||||
|
Loading…
x
Reference in New Issue
Block a user