X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/289f6a146c0b2087607d8d8659531ea90142779a..976db69ffa80c4d499e53f6f22c26d784fdac0a1:/fatfs/documents/doc/dwrite.html diff --git a/fatfs/documents/doc/dwrite.html b/fatfs/documents/doc/dwrite.html index 51174f9..fef5106 100644 --- a/fatfs/documents/doc/dwrite.html +++ b/fatfs/documents/doc/dwrite.html @@ -13,12 +13,12 @@

disk_write

-

The disk_write function is called to write data to the sector(s) of storage device.

+

The disk_write function is called to write data to the storage device.

 DRESULT disk_write (
   BYTE pdrv,        /* [IN] Physical drive number */
   const BYTE* buff, /* [IN] Pointer to the data to be written */
-  DWORD sector,     /* [IN] Sector number to write from */
+  LBA_t sector,     /* [IN] Sector number to write from */
   UINT count        /* [IN] Number of sectors to write */
 );
 
@@ -32,7 +32,7 @@ DRESULT disk_write (
buff
Pointer to the first item of the byte array to be written. The size of data to be written is sector size * count bytes.
sector
-
Start sector number in 32-bit LBA.
+
Start sector number in LBA. The data type LBA_t is an alias of DWORD or QWORD depends on the configuration option.
count
Number of sectors to write.
@@ -60,7 +60,7 @@ DRESULT disk_write (

Description

The specified memory address is not that always aligned to word boundary because the argument is defined as BYTE*. For more information, refer to the description of disk_read function.

Generally, a multiple sector write request (count > 1) must not be split into single sector transactions to the storage device, or the file write throughput will be drastically decreased.

-

FatFs expects delayed write function of the disk control layer. The write operation to the media does not need to be completed at return from this function by what write operation is in progress or data is only stored into the write-back cache. But write data on the buff is invalid after return from this function. The write completion request is done by CTRL_SYNC command of disk_ioctl function. Therefore, if a delayed write function is implemented, the write throughput of the filesystem will be improved.

+

FatFs expects delayed write function of the disk control layer. The write operation to the media does not need to be completed when return from this function by what write operation is in progress or data is only stored into the write-back cache. But write data on the buff is invalid after return from this function. The write completion request is done by CTRL_SYNC command of disk_ioctl function. Therefore, if a delayed write function is implemented, the write throughput of the filesystem will be improved.

Remarks: Application program MUST NOT call this function, or FAT structure on the volume can be collapsed.