summaryrefslogtreecommitdiff
path: root/fatfs/source/diskio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fatfs/source/diskio.c')
-rw-r--r--fatfs/source/diskio.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fatfs/source/diskio.c b/fatfs/source/diskio.c
index 25f5e53..81aaf59 100644
--- a/fatfs/source/diskio.c
+++ b/fatfs/source/diskio.c
@@ -1,5 +1,5 @@
/*-----------------------------------------------------------------------*/
-/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2016 */
+/* Low level disk I/O module SKELETON for FatFs (C)ChaN, 2019 */
/*-----------------------------------------------------------------------*/
/* If a working storage control module is available, it should be */
/* attached to the FatFs via a glue function rather than modifying it. */
@@ -7,7 +7,8 @@
/* storage control modules to the FatFs module with a defined API. */
/*-----------------------------------------------------------------------*/
-#include "diskio.h" /* FatFs lower layer API */
+#include "ff.h" /* Obtains integer types */
+#include "diskio.h" /* Declarations of disk functions */
/* Definitions of physical drive number for each drive */
#define DEV_RAM 0 /* Example: Map Ramdisk to physical drive 0 */
@@ -98,7 +99,7 @@ DSTATUS disk_initialize (
DRESULT disk_read (
BYTE pdrv, /* Physical drive nmuber to identify the drive */
BYTE *buff, /* Data buffer to store read data */
- DWORD sector, /* Start sector in LBA */
+ LBA_t sector, /* Start sector in LBA */
UINT count /* Number of sectors to read */
)
{
@@ -143,10 +144,12 @@ DRESULT disk_read (
/* Write Sector(s) */
/*-----------------------------------------------------------------------*/
+#if FF_FS_READONLY == 0
+
DRESULT disk_write (
BYTE pdrv, /* Physical drive nmuber to identify the drive */
const BYTE *buff, /* Data to be written */
- DWORD sector, /* Start sector in LBA */
+ LBA_t sector, /* Start sector in LBA */
UINT count /* Number of sectors to write */
)
{
@@ -185,6 +188,7 @@ DRESULT disk_write (
return RES_PARERR;
}
+#endif
/*-----------------------------------------------------------------------*/