From 3061ecca3d0fdfb87dabbf5f63c9e06c2a30f53a Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 23 Aug 2018 17:08:59 +0200 Subject: o Initial import. --- .../external/fatfs/doc/en/fdisk.html | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 thirdparty/nRF5_SDK_15.0.0_a53641a/external/fatfs/doc/en/fdisk.html (limited to 'thirdparty/nRF5_SDK_15.0.0_a53641a/external/fatfs/doc/en/fdisk.html') diff --git a/thirdparty/nRF5_SDK_15.0.0_a53641a/external/fatfs/doc/en/fdisk.html b/thirdparty/nRF5_SDK_15.0.0_a53641a/external/fatfs/doc/en/fdisk.html new file mode 100644 index 0000000..7a272ff --- /dev/null +++ b/thirdparty/nRF5_SDK_15.0.0_a53641a/external/fatfs/doc/en/fdisk.html @@ -0,0 +1,92 @@ + + + + + + + + +FatFs - f_fdisk + + + + +
+

f_fdisk

+

The f_fdisk fucntion divides a physical drive.

+
+FRESULT f_fdisk (
+  BYTE  pdrv,        /* [IN] Physical drive number */
+  const DWORD* szt,  /* [IN] Partition map table */
+  void* work         /* [IN] Work area */
+);
+
+
+ +
+

Parameters

+
+
pdrv
+
Specifies the physical drive to be divided. This is not the logical drive number but the drive identifier passed to the low level disk functions.
+
szt
+
Pointer to the first item of the partition map table.
+
work
+
Pointer to the function work area. The size must be at least _MAX_SS bytes.
+
+
+ +
+

Return Values

+

+FR_OK, +FR_DISK_ERR, +FR_NOT_READY, +FR_WRITE_PROTECTED, +FR_INVALID_PARAMETER +

+
+ +
+

Description

+

The f_fdisk function creates partitions on the physical drive. The partitioning format is in generic FDISK format, so that it can create upto four primary partitions. Logical volumes in the extended partition is not supported. The partition map table with four items specifies how to divide the physical drive. The first item specifies the size of first primary partition and fourth item specifies the fourth primary partition. If the value is less than or equal to 100, it specifies the partition size in percentage of the entire drive space. If it is larger than 100, it specifies the partition size in unit of sector. The partitions are located on the drive in order of from first item.

+
+ +
+

QuickInfo

+

Available when _FS_READOLNY == 0, _USE_MKFS == 1 and _MULTI_PARTITION == 1.

+
+ +
+

Example

+
+    /* Volume management table defined by user (required when _MULTI_PARTITION == 1) */
+
+    PARTITION VolToPart[] = {
+        {0, 1},    /* Logical drive 0 ==> Physical drive 0, 1st partition */
+        {0, 2},    /* Logical drive 1 ==> Physical drive 0, 2nd partition */
+        {1, 0}     /* Logical drive 2 ==> Physical drive 1, auto detection */
+    };
+
+
+    /* Initialize a brand-new disk drive mapped to physical drive 0 */
+
+    FATFS fs;
+    DWORD plist[] = {50, 50, 0, 0};  /* Divide drive into two partitions */
+    BYTE work[_MAX_SS];
+
+    f_fdisk(0, plist, work);                     /* Divide physical drive 0 */
+
+    f_mkfs("0:", FMT_ANY, work, sizeof work);    /* Create FAT volume on the logical drive 0 */
+    f_mkfs("1:", FMT_ANY, work, sizeof work);    /* Create FAT volume on the logical drive 1 */
+
+
+
+ +
+

See Also

+

Volume management, f_mkfs

+
+ +

Return

+ + -- cgit v1.2.3