storage: Add primitive BIS support

This commit is contained in:
CTCaer
2020-04-30 15:04:20 +03:00
parent a2bb576c03
commit b6933013be
5 changed files with 224 additions and 2 deletions

View File

@@ -11,6 +11,7 @@
#include "diskio.h" /* FatFs lower layer API */
#include "../../../../common/memory_map.h"
#include "../../storage/nx_emmc_bis.h"
#include "../../storage/nx_sd.h"
#include "../../storage/ramdisk.h"
#include "../../storage/sdmmc.h"
@@ -51,6 +52,10 @@ DRESULT disk_read (
return sdmmc_storage_read(&sd_storage, sector, count, (void *)buff) ? RES_OK : RES_ERROR;
case DRIVE_RAM:
return ram_disk_read(sector, count, (void *)buff);
case DRIVE_EMMC:
return sdmmc_storage_read(&emmc_storage, sector, count, (void *)buff) ? RES_OK : RES_ERROR;
case DRIVE_BIS:
return nx_emmc_bis_read(sector, count, (void *)buff);
}
return RES_ERROR;
@@ -72,6 +77,9 @@ DRESULT disk_write (
return sdmmc_storage_write(&sd_storage, sector, count, (void *)buff) ? RES_OK : RES_ERROR;
case DRIVE_RAM:
return ram_disk_write(sector, count, (void *)buff);
case DRIVE_EMMC:
case DRIVE_BIS:
return RES_WRPRT;
}
return RES_ERROR;