mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
jsfsInit(): wait a bit after enabling SD card power (if it was turned off)
This commit is contained in:
parent
6ba4643be4
commit
d131dd29fc
@ -72,7 +72,10 @@ void jsfsReportError(const char *msg, FRESULT res) {
|
||||
|
||||
bool jsfsInit() {
|
||||
#ifdef SD_POWER_PIN
|
||||
jshPinOutput(SD_POWER_PIN, 1);
|
||||
if (jshPinGetValue(SD_POWER_PIN)==0) {
|
||||
jshPinOutput(SD_POWER_PIN, 1);
|
||||
jshDelayMicroseconds(5000);
|
||||
}
|
||||
#endif
|
||||
#ifndef LINUX
|
||||
if (!fat_initialised) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user