SD Driver: reinit sd card on error (#2493)

* SD Driver: reinit sd card on error
* SD Driver: cleanup fatfs bindings
* Storage: optimized glue
* Storage: move fatfs initialization to appropriate subsystems, minor code cleanup
* SD Driver: minor code cleanup

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Sergey Gavrilov
2023-03-20 06:09:10 -07:00
committed by GitHub
parent 6ec62f48f9
commit f7024cff78
13 changed files with 154 additions and 418 deletions

View File

@@ -618,8 +618,10 @@ static const FS_Api fs_api = {
};
void storage_ext_init(StorageData* storage) {
fatfs_init();
SDData* sd_data = malloc(sizeof(SDData));
sd_data->fs = &USERFatFS;
sd_data->fs = &fatfs_object;
sd_data->path = "0:/";
sd_data->sd_was_present = true;