diff --git a/fusee/fusee-secondary/src/fs_dev.c b/fusee/fusee-secondary/src/fs_dev.c index 3bd669370..8d185fff1 100644 --- a/fusee/fusee-secondary/src/fs_dev.c +++ b/fusee/fusee-secondary/src/fs_dev.c @@ -86,7 +86,6 @@ const char *VolumeStr[FF_VOLUMES] = { FKNAM, FKNAM, FKNAM, FKNAM, FKNAM, FKNAM, /* For diskio.c code */ device_partition_t *g_volume_to_devparts[FF_VOLUMES] = { NULL }; -#include int fsdev_mount_device(const char *name, const device_partition_t *devpart, bool initialize_immediately) { fsdev_fsdevice_t *device = NULL; FRESULT rc; diff --git a/fusee/fusee-secondary/src/lib/fatfs/diskio.c b/fusee/fusee-secondary/src/lib/fatfs/diskio.c index 98d0e7e2d..3bafa06b4 100644 --- a/fusee/fusee-secondary/src/lib/fatfs/diskio.c +++ b/fusee/fusee-secondary/src/lib/fatfs/diskio.c @@ -72,7 +72,7 @@ DRESULT disk_read ( if (devpart == NULL) { return RES_PARERR; } else if (devpart->reader != NULL) { - int rc = devpart->reader(devpart, buff, sector, count); + int rc = device_partition_read_data(devpart, buff, sector, count); return rc == 0 ? 0 : RES_ERROR; } else { return RES_ERROR; @@ -97,7 +97,7 @@ DRESULT disk_write ( if (devpart == NULL) { return RES_PARERR; } else if (devpart->writer != NULL) { - int rc = devpart->writer(devpart, buff, sector, count); + int rc = device_partition_write_data(devpart, buff, sector, count); return rc == 0 ? 0 : RES_ERROR; } else { return RES_ERROR; diff --git a/fusee/fusee-secondary/src/switch_fs.c b/fusee/fusee-secondary/src/switch_fs.c index c5ecfdcc7..59bcf5ea0 100644 --- a/fusee/fusee-secondary/src/switch_fs.c +++ b/fusee/fusee-secondary/src/switch_fs.c @@ -45,13 +45,13 @@ static int mmc_partition_initialize(device_partition_t *devpart) { int rc = sdmmc_init(mmcpart->mmc, mmcpart->controller); if (rc == 0) { sdmmc_set_write_enable(mmcpart->mmc, SDMMC_WRITE_ENABLED); - g_sd_mmc_initialized = true; + devpart->initialized = g_sd_mmc_initialized = true; } return rc; } else if (mmcpart->mmc == &g_nand_mmc && !g_nand_mmc_initialized) { int rc = sdmmc_init(mmcpart->mmc, mmcpart->controller); if (rc == 0) { - g_nand_mmc_initialized = true; + devpart->initialized = g_nand_mmc_initialized = true; } return rc; }