SD card un-mount unmount when we turn off programmatically #7289
only:uaefi
This commit is contained in:
parent
96b7692867
commit
14029bc55e
|
@ -1,6 +1,7 @@
|
|||
#include "pch.h"
|
||||
#include "hellen_meta.h"
|
||||
#include "adc_subscription.h"
|
||||
#include "mmc_card.h"
|
||||
|
||||
void hellenWbo() {
|
||||
engineConfiguration->enableAemXSeries = true;
|
||||
|
@ -82,6 +83,10 @@ void hellenEnableEn(const char *msg) {
|
|||
}
|
||||
|
||||
void hellenDisableEn(const char *msg) {
|
||||
#if EFI_FILE_LOGGING && EFI_PROD_CODE
|
||||
// un-mount before turning power off SD card
|
||||
mmcUnMount();
|
||||
#endif
|
||||
efiPrintf("Turning board off [%s]", msg);
|
||||
hellenDisableEnSilently();
|
||||
}
|
||||
|
|
|
@ -103,8 +103,6 @@ static NO_CACHE FATFS MMC_FS;
|
|||
|
||||
static int fatFsErrors = 0;
|
||||
|
||||
static void mmcUnMount();
|
||||
|
||||
static void setSdCardReady(bool value) {
|
||||
fs_ready = value;
|
||||
}
|
||||
|
@ -236,7 +234,7 @@ static void removeFile(const char *pathx) {
|
|||
/*
|
||||
* MMC card un-mount.
|
||||
*/
|
||||
static void mmcUnMount() {
|
||||
void mmcUnMount() {
|
||||
if (!isSdCardAlive()) {
|
||||
efiPrintf("Error: No File system is mounted. \"mountsd\" first");
|
||||
return;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
void initEarlyMmcCard();
|
||||
void initMmcCard();
|
||||
void mmcUnMount();
|
||||
bool isSdCardAlive();
|
||||
|
||||
void onUsbConnectedNotifyMmcI(void);
|
||||
|
|
Loading…
Reference in New Issue