From efa13a879df590ce0043a5b4f97597484bf264e1 Mon Sep 17 00:00:00 2001 From: inmarket Date: Wed, 13 Aug 2014 15:48:16 +1000 Subject: Move 3rd Party source to a new directory. Rationalise Fatfs code and fix a couple of configuration issues. --- 3rdparty/fatfs-0.10b/doc/en/dread.html | 71 ++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 3rdparty/fatfs-0.10b/doc/en/dread.html (limited to '3rdparty/fatfs-0.10b/doc/en/dread.html') diff --git a/3rdparty/fatfs-0.10b/doc/en/dread.html b/3rdparty/fatfs-0.10b/doc/en/dread.html new file mode 100644 index 00000000..3f9bc039 --- /dev/null +++ b/3rdparty/fatfs-0.10b/doc/en/dread.html @@ -0,0 +1,71 @@ + + + + + + + + +FatFs - disk_read + + + + +
+

disk_read

+

The disk_read function reads sector(s) from the storage device.

+
+DRESULT disk_read (
+  BYTE pdrv,     /* [IN] Physical drive number */
+  BYTE* buff,    /* [OUT] Pointer to the read data buffer */
+  DWORD sector,  /* [IN] Start sector number */
+  UINT count     /* [IN] Number of sectros to read */
+);
+
+
+ +
+

Parameters

+
+
pdrv
+
Physical drive number to identify the target device.
+
buff
+
Pointer to the byte array to store the read data.
+
sector
+
Start sector number in logical block address (LBA).
+
count
+
Number of sectors to read. FatFs specifis it in range of from 1 to 128.
+
+
+ + +
+

Return Value

+
+
RES_OK (0)
+
The function succeeded.
+
RES_ERROR
+
Any hard error occured during the read operation and could not recover it.
+
RES_PARERR
+
Invalid parameter.
+
RES_NOTRDY
+
The device has not been initialized.
+
+
+ + +
+

Description

+

The memory address specified by buff is not that always aligned to word boundary because the type of argument is defined as BYTE*. The misaligned read/write request can occure at direct transfer. If the bus architecture, especially DMA controller, does not allow misaligned memory access, it should be solved in this function. There are some workarounds described below to avoid this issue.

+ +

Generally, a multiple sector transfer request must not be split into single sector transactions to the storage device, or you will not get good read throughput.

+
+ + +

Return

+ + -- cgit v1.2.3