原子哥,我下载了最新版的FATFS,移植到例程里,f_fkms文件的参数由3个变成了5个,这个需要怎么修改?

2019-07-21 06:46发布

例程上的函数名
FRESULT f_mkfs (
        const TCHAR* path,        /* Logical drive number */
        BYTE sfd,                        /* Partitioning rule 0:FDISK, 1:SFD */
        UINT au                                /* Allocation unit [bytes] */
)
网站上最新版的变成了这个样子
FRESULT f_mkfs (
        const TCHAR* path,        /* Logical drive number */
        BYTE opt,                        /* Format option */
        DWORD au,                        /* Size of allocation unit [byte] */
        void* work,                        /* Pointer to working buffer */
        UINT len                        /* Size of working buffer */

)
函数很长就不粘过来了,需要移植的话怎么修改呢?

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
5条回答
ysq7120
2019-07-21 07:32
path
Pointer to the null-terminated string specifies the logical drive to be formatted. If there is no drive number in it, it means the default drive. The logical drive may or may not be mounted for the format process.
opt
Specifies the format option in combination of FM_FAT, FM_FAT32, FM_EXFAT and bitwise-or of these three, FM_ANY. FM_EXFAT is ignored when exFAT is not enabled. These flags specify which FAT type to be created on the volume. If two or more types are specified, one out of them will be selected depends on the volume size. The flag FM_SFD specifies to place the volume on the drive in SFD format.
au
Specifies size of the allocation unit (cluter) in unit of byte. The valid value is N times the sector size. N is power of 2 from 1 to 128 for FAT volume and upto 16MiB for exFAT volume. If zero is given, the default allocation unit size is selected depends on the volume size.
work
Pointer to the working buffer used for the format process.
len
Size of the working buffer in unit of byte. It needs to be the sector size at least. Plenty of working buffer reduces number of write transaction to the device and the format process will be finished quickly.

一周热门 更多>