Merge pull request #139 from DavidLin1577/patch-4

Update fatfs_drv.c
This commit is contained in:
Arthur
2020-04-18 09:53:45 +08:00
committed by GitHub

View File

@@ -8,6 +8,7 @@
#define SPI_FLASH_SECTOR_SIZE (4 * 1024) #define SPI_FLASH_SECTOR_SIZE (4 * 1024)
#define SPI_FLASH_PAGE_SIZE 256 #define SPI_FLASH_PAGE_SIZE 256
DSTATUS w25q64_fatfs_status(BYTE lun) DSTATUS w25q64_fatfs_status(BYTE lun)
{ {
DSTATUS status = STA_NOINIT; DSTATUS status = STA_NOINIT;
@@ -51,8 +52,6 @@ DRESULT w25q64_fatfs_write(BYTE lun, const BYTE *buff, DWORD sector, UINT count)
DRESULT w25q64_fatfs_ioctl(BYTE lun, BYTE cmd, void *buff) DRESULT w25q64_fatfs_ioctl(BYTE lun, BYTE cmd, void *buff)
{ {
DRESULT res = RES_PARERR;
switch (cmd) switch (cmd)
{ {
case GET_SECTOR_COUNT: case GET_SECTOR_COUNT:
@@ -64,14 +63,12 @@ DRESULT w25q64_fatfs_write(BYTE lun, const BYTE *buff, DWORD sector, UINT count)
case GET_BLOCK_SIZE: case GET_BLOCK_SIZE:
*(DWORD *)buff = 1; *(DWORD *)buff = 1;
break; break;
} default:
res = RES_OK; return RES_PARERR;
return res; }
return RES_OK;
} }
DWORD get_fattime (void) DWORD get_fattime (void)
{ {
return 0; return 0;