sqlite数据库,exfat支持
This commit is contained in:
1 parent
43f2057b44
commit
855a50bfeb
8 files changed
+917
-546
No files matched your search
@@ -863,7 +863,7 @@ DSTATUS disk_status(BYTE drv)
|
||||
}
|
||||
|
||||
/* Read Sector(s) */
|
||||
DRESULT disk_read(BYTE drv, BYTE *buff, DWORD sector, UINT count)
|
||||
/*DRESULT disk_read(BYTE drv, BYTE *buff, DWORD sector, UINT count)
|
||||
{
|
||||
rt_size_t result;
|
||||
rt_device_t device = disk[drv];
|
||||
@@ -875,10 +875,22 @@ DRESULT disk_read(BYTE drv, BYTE *buff, DWORD sector, UINT count)
|
||||
}
|
||||
|
||||
return RES_ERROR;
|
||||
}
|
||||
}*/
|
||||
DRESULT disk_read(BYTE drv, BYTE *buff, LBA_t sector, UINT count)
|
||||
{
|
||||
rt_size_t result;
|
||||
rt_device_t device = disk[drv];
|
||||
|
||||
result = rt_device_read(device, sector, buff, count);
|
||||
if (result == count)
|
||||
{
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
return RES_ERROR;
|
||||
}
|
||||
/* Write Sector(s) */
|
||||
DRESULT disk_write(BYTE drv, const BYTE *buff, DWORD sector, UINT count)
|
||||
/*DRESULT disk_write(BYTE drv, const BYTE *buff, DWORD sector, UINT count)
|
||||
{
|
||||
rt_size_t result;
|
||||
rt_device_t device = disk[drv];
|
||||
@@ -890,6 +902,19 @@ DRESULT disk_write(BYTE drv, const BYTE *buff, DWORD sector, UINT count)
|
||||
}
|
||||
|
||||
return RES_ERROR;
|
||||
}*/
|
||||
DRESULT disk_write(BYTE drv, const BYTE *buff, LBA_t sector, UINT count)
|
||||
{
|
||||
rt_size_t result;
|
||||
rt_device_t device = disk[drv];
|
||||
|
||||
result = rt_device_write(device, sector, buff, count);
|
||||
if (result == count)
|
||||
{
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
return RES_ERROR;
|
||||
}
|
||||
|
||||
/* Miscellaneous Functions */
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
/ GET_SECTOR_SIZE command. */
|
||||
|
||||
|
||||
#define FF_LBA64 0
|
||||
#define FF_LBA64 1
|
||||
/* This option switches support for 64-bit LBA. (0:Disable or 1:Enable)
|
||||
/ To enable the 64-bit LBA, also exFAT needs to be enabled. (FF_FS_EXFAT == 1) */
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
/ At the tiny configuration, size of file object (FIL) is shrinked FF_MAX_SS bytes.
|
||||
/ Instead of private sector buffer eliminated from the file object, common sector
|
||||
/ buffer in the filesystem object (FATFS) is used for the file data transfer. */
|
||||
|
||||
#define RT_DFS_ELM_USE_EXFAT//exfat支持
|
||||
#ifdef RT_DFS_ELM_USE_EXFAT
|
||||
#define FF_FS_EXFAT 1
|
||||
#else
|
||||
|
||||
Reference in new issue
Block a user