/*-----------------------------------------------------------------------*/\r
-/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2016 */\r
+/* Low level disk I/O module SKELETON for FatFs (C)ChaN, 2019 */\r
/*-----------------------------------------------------------------------*/\r
/* If a working storage control module is available, it should be */\r
/* attached to the FatFs via a glue function rather than modifying it. */\r
/* storage control modules to the FatFs module with a defined API. */\r
/*-----------------------------------------------------------------------*/\r
\r
-#include "diskio.h" /* FatFs lower layer API */\r
+#include "ff.h" /* Obtains integer types */\r
+#include "diskio.h" /* Declarations of disk functions */\r
\r
/* Definitions of physical drive number for each drive */\r
#define DEV_RAM 0 /* Example: Map Ramdisk to physical drive 0 */\r
DRESULT disk_read (\r
BYTE pdrv, /* Physical drive nmuber to identify the drive */\r
BYTE *buff, /* Data buffer to store read data */\r
- DWORD sector, /* Start sector in LBA */\r
+ LBA_t sector, /* Start sector in LBA */\r
UINT count /* Number of sectors to read */\r
)\r
{\r
/* Write Sector(s) */\r
/*-----------------------------------------------------------------------*/\r
\r
+#if FF_FS_READONLY == 0\r
+\r
DRESULT disk_write (\r
BYTE pdrv, /* Physical drive nmuber to identify the drive */\r
const BYTE *buff, /* Data to be written */\r
- DWORD sector, /* Start sector in LBA */\r
+ LBA_t sector, /* Start sector in LBA */\r
UINT count /* Number of sectors to write */\r
)\r
{\r
return RES_PARERR;\r
}\r
\r
+#endif\r
\r
\r
/*-----------------------------------------------------------------------*/\r