5 more files removed
This commit is contained in:
@@ -28,14 +28,20 @@ extern "C" {
|
||||
/ object instead of the sector buffer in the individual file object for file
|
||||
/ data transfer. This reduces memory consumption 512 bytes each file object. */
|
||||
|
||||
|
||||
#if defined(BOOT)
|
||||
#define _FS_READONLY 1 /* 0:Read/Write or 1:Read only */
|
||||
#else
|
||||
#define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */
|
||||
#endif
|
||||
/* Setting _FS_READONLY to 1 defines read only configuration. This removes
|
||||
/ writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename,
|
||||
/ f_truncate and useless f_getfree. */
|
||||
|
||||
|
||||
#if defined(BOOT)
|
||||
#define _FS_MINIMIZE 1 /* 0 to 3 */
|
||||
#else
|
||||
#define _FS_MINIMIZE 0 /* 0 to 3 */
|
||||
#endif
|
||||
/* The _FS_MINIMIZE option defines minimization level to remove some functions.
|
||||
/
|
||||
/ 0: Full function.
|
||||
@@ -45,7 +51,11 @@ extern "C" {
|
||||
/ 3: f_lseek is removed in addition to 2. */
|
||||
|
||||
|
||||
#if defined(BOOT)
|
||||
#define _USE_STRFUNC 0 /* 0:Disable or 1-2:Enable */
|
||||
#else
|
||||
#define _USE_STRFUNC 1 /* 0:Disable or 1-2:Enable */
|
||||
#endif
|
||||
/* To enable string functions, set _USE_STRFUNC to 1 or 2. */
|
||||
|
||||
|
||||
@@ -186,7 +196,7 @@ extern "C" {
|
||||
/* A header file that defines sync object types on the O/S, such as
|
||||
/ windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */
|
||||
|
||||
#if defined(CPUARM)
|
||||
#if defined(CPUARM) && !defined(BOOT)
|
||||
#define _FS_REENTRANT 1 /* 0:Disable or 1:Enable */
|
||||
#define _SYNC_t unsigned char /*OS_MutexID*/ /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */
|
||||
#else
|
||||
|
||||
@@ -180,12 +180,10 @@ static void card_power(BYTE on)
|
||||
on=on;
|
||||
}
|
||||
|
||||
#if (STM32_SD_DISK_IOCTRL == 1)
|
||||
static int chk_power(void)
|
||||
{
|
||||
return 1; /* fake powered */
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* Transmit/Receive a byte to MMC via SPI (Platform dependent) */
|
||||
@@ -503,7 +501,6 @@ BOOL rcvr_datablock (
|
||||
/* Send a data packet to MMC */
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
#if _FS_READONLY == 0
|
||||
static
|
||||
BOOL xmit_datablock (
|
||||
const BYTE *buff, /* 512 byte data block to be transmitted */
|
||||
@@ -539,8 +536,6 @@ BOOL xmit_datablock (
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif /* _READONLY */
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
@@ -731,8 +726,6 @@ DRESULT disk_read (
|
||||
/* Write Sector(s) */
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
#if _FS_READONLY == 0
|
||||
|
||||
// TODO quick & dirty
|
||||
int8_t SD_WriteSectors(uint8_t *buff, uint32_t sector, uint32_t count)
|
||||
{
|
||||
@@ -752,6 +745,8 @@ int8_t SD_WriteSectors(uint8_t *buff, uint32_t sector, uint32_t count)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if _FS_READONLY == 0
|
||||
|
||||
DRESULT disk_write (
|
||||
BYTE drv, /* Physical drive number (0) */
|
||||
const BYTE *buff, /* Pointer to the data to be written */
|
||||
@@ -793,7 +788,6 @@ DRESULT disk_write (
|
||||
/* Miscellaneous Functions */
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
#if (STM32_SD_DISK_IOCTRL == 1)
|
||||
DRESULT disk_ioctl (
|
||||
BYTE drv, /* Physical drive number (0) */
|
||||
BYTE ctrl, /* Control code */
|
||||
@@ -919,7 +913,6 @@ DRESULT disk_ioctl (
|
||||
|
||||
return res;
|
||||
}
|
||||
#endif /* _USE_IOCTL != 0 */
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user