From 20236a8a990cae729bca1f7a4e0d619e92a5e37d Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 20 Dec 2014 21:15:16 +0000 Subject: stmhal: Upgrade to latest fatfs driver. --- stmhal/fatfs/doc/00index_e.html | 118 ---------------- stmhal/fatfs/doc/00index_j.html | 116 ---------------- stmhal/fatfs/doc/css_e.css | 60 -------- stmhal/fatfs/doc/css_j.css | 63 --------- stmhal/fatfs/doc/en/appnote.html | 271 ------------------------------------ stmhal/fatfs/doc/en/chdir.html | 81 ----------- stmhal/fatfs/doc/en/chdrive.html | 60 -------- stmhal/fatfs/doc/en/chmod.html | 89 ------------ stmhal/fatfs/doc/en/close.html | 66 --------- stmhal/fatfs/doc/en/closedir.html | 64 --------- stmhal/fatfs/doc/en/dinit.html | 46 ------ stmhal/fatfs/doc/en/dioctl.html | 69 --------- stmhal/fatfs/doc/en/dread.html | 70 ---------- stmhal/fatfs/doc/en/dstat.html | 48 ------- stmhal/fatfs/doc/en/dwrite.html | 68 --------- stmhal/fatfs/doc/en/eof.html | 62 --------- stmhal/fatfs/doc/en/error.html | 62 --------- stmhal/fatfs/doc/en/fattime.html | 51 ------- stmhal/fatfs/doc/en/fdisk.html | 97 ------------- stmhal/fatfs/doc/en/filename.html | 76 ---------- stmhal/fatfs/doc/en/forward.html | 139 ------------------- stmhal/fatfs/doc/en/getcwd.html | 70 ---------- stmhal/fatfs/doc/en/getfree.html | 95 ------------- stmhal/fatfs/doc/en/getlabel.html | 82 ----------- stmhal/fatfs/doc/en/gets.html | 65 --------- stmhal/fatfs/doc/en/lseek.html | 129 ----------------- stmhal/fatfs/doc/en/mkdir.html | 80 ----------- stmhal/fatfs/doc/en/mkfs.html | 73 ---------- stmhal/fatfs/doc/en/mount.html | 83 ----------- stmhal/fatfs/doc/en/open.html | 173 ----------------------- stmhal/fatfs/doc/en/opendir.html | 74 ---------- stmhal/fatfs/doc/en/printf.html | 90 ------------ stmhal/fatfs/doc/en/putc.html | 62 --------- stmhal/fatfs/doc/en/puts.html | 62 --------- stmhal/fatfs/doc/en/rc.html | 87 ------------ stmhal/fatfs/doc/en/read.html | 74 ---------- stmhal/fatfs/doc/en/readdir.html | 125 ----------------- stmhal/fatfs/doc/en/rename.html | 85 ------------ stmhal/fatfs/doc/en/sdir.html | 40 ------ stmhal/fatfs/doc/en/setlabel.html | 89 ------------ stmhal/fatfs/doc/en/sfatfs.html | 54 ------- stmhal/fatfs/doc/en/sfile.html | 49 ------- stmhal/fatfs/doc/en/sfileinfo.html | 70 ---------- stmhal/fatfs/doc/en/size.html | 62 --------- stmhal/fatfs/doc/en/stat.html | 74 ---------- stmhal/fatfs/doc/en/sync.html | 66 --------- stmhal/fatfs/doc/en/tell.html | 62 --------- stmhal/fatfs/doc/en/truncate.html | 66 --------- stmhal/fatfs/doc/en/unlink.html | 75 ---------- stmhal/fatfs/doc/en/utime.html | 99 ------------- stmhal/fatfs/doc/en/write.html | 74 ---------- stmhal/fatfs/doc/img/app1.c | 43 ------ stmhal/fatfs/doc/img/app2.c | 70 ---------- stmhal/fatfs/doc/img/app3.c | 106 -------------- stmhal/fatfs/doc/img/f1.png | Bin 1414 -> 0 bytes stmhal/fatfs/doc/img/f2.png | Bin 1458 -> 0 bytes stmhal/fatfs/doc/img/f3.png | Bin 1039 -> 0 bytes stmhal/fatfs/doc/img/f4.png | Bin 2335 -> 0 bytes stmhal/fatfs/doc/img/f5.png | Bin 2479 -> 0 bytes stmhal/fatfs/doc/img/f6.png | Bin 1436 -> 0 bytes stmhal/fatfs/doc/img/f7.png | Bin 11388 -> 0 bytes stmhal/fatfs/doc/img/layers.png | Bin 2401 -> 0 bytes stmhal/fatfs/doc/img/layers3.png | Bin 2379 -> 0 bytes stmhal/fatfs/doc/img/modules.png | Bin 8624 -> 0 bytes stmhal/fatfs/doc/img/rwtest.png | Bin 19068 -> 0 bytes stmhal/fatfs/doc/img/rwtest2.png | Bin 8153 -> 0 bytes stmhal/fatfs/doc/img/rwtest3.png | Bin 3011 -> 0 bytes stmhal/fatfs/doc/ja/appnote.html | 278 ------------------------------------- stmhal/fatfs/doc/ja/chdir.html | 81 ----------- stmhal/fatfs/doc/ja/chdrive.html | 61 -------- stmhal/fatfs/doc/ja/chmod.html | 83 ----------- stmhal/fatfs/doc/ja/close.html | 66 --------- stmhal/fatfs/doc/ja/closedir.html | 64 --------- stmhal/fatfs/doc/ja/dinit.html | 46 ------ stmhal/fatfs/doc/ja/dioctl.html | 68 --------- stmhal/fatfs/doc/ja/dread.html | 69 --------- stmhal/fatfs/doc/ja/dstat.html | 48 ------- stmhal/fatfs/doc/ja/dwrite.html | 68 --------- stmhal/fatfs/doc/ja/eof.html | 62 --------- stmhal/fatfs/doc/ja/error.html | 62 --------- stmhal/fatfs/doc/ja/fattime.html | 51 ------- stmhal/fatfs/doc/ja/fdisk.html | 97 ------------- stmhal/fatfs/doc/ja/filename.html | 74 ---------- stmhal/fatfs/doc/ja/forward.html | 140 ------------------- stmhal/fatfs/doc/ja/getcwd.html | 70 ---------- stmhal/fatfs/doc/ja/getfree.html | 95 ------------- stmhal/fatfs/doc/ja/getlabel.html | 82 ----------- stmhal/fatfs/doc/ja/gets.html | 65 --------- stmhal/fatfs/doc/ja/lseek.html | 129 ----------------- stmhal/fatfs/doc/ja/mkdir.html | 80 ----------- stmhal/fatfs/doc/ja/mkfs.html | 73 ---------- stmhal/fatfs/doc/ja/mount.html | 82 ----------- stmhal/fatfs/doc/ja/open.html | 171 ----------------------- stmhal/fatfs/doc/ja/opendir.html | 74 ---------- stmhal/fatfs/doc/ja/printf.html | 90 ------------ stmhal/fatfs/doc/ja/putc.html | 62 --------- stmhal/fatfs/doc/ja/puts.html | 62 --------- stmhal/fatfs/doc/ja/rc.html | 87 ------------ stmhal/fatfs/doc/ja/read.html | 75 ---------- stmhal/fatfs/doc/ja/readdir.html | 125 ----------------- stmhal/fatfs/doc/ja/rename.html | 82 ----------- stmhal/fatfs/doc/ja/sdir.html | 40 ------ stmhal/fatfs/doc/ja/setlabel.html | 89 ------------ stmhal/fatfs/doc/ja/sfatfs.html | 55 -------- stmhal/fatfs/doc/ja/sfile.html | 48 ------- stmhal/fatfs/doc/ja/sfileinfo.html | 70 ---------- stmhal/fatfs/doc/ja/size.html | 62 --------- stmhal/fatfs/doc/ja/stat.html | 74 ---------- stmhal/fatfs/doc/ja/sync.html | 66 --------- stmhal/fatfs/doc/ja/tell.html | 62 --------- stmhal/fatfs/doc/ja/truncate.html | 67 --------- stmhal/fatfs/doc/ja/unlink.html | 74 ---------- stmhal/fatfs/doc/ja/utime.html | 99 ------------- stmhal/fatfs/doc/ja/write.html | 75 ---------- stmhal/fatfs/doc/updates.txt | 133 ------------------ 115 files changed, 8320 deletions(-) delete mode 100644 stmhal/fatfs/doc/00index_e.html delete mode 100644 stmhal/fatfs/doc/00index_j.html delete mode 100644 stmhal/fatfs/doc/css_e.css delete mode 100644 stmhal/fatfs/doc/css_j.css delete mode 100644 stmhal/fatfs/doc/en/appnote.html delete mode 100644 stmhal/fatfs/doc/en/chdir.html delete mode 100644 stmhal/fatfs/doc/en/chdrive.html delete mode 100644 stmhal/fatfs/doc/en/chmod.html delete mode 100644 stmhal/fatfs/doc/en/close.html delete mode 100644 stmhal/fatfs/doc/en/closedir.html delete mode 100644 stmhal/fatfs/doc/en/dinit.html delete mode 100644 stmhal/fatfs/doc/en/dioctl.html delete mode 100644 stmhal/fatfs/doc/en/dread.html delete mode 100644 stmhal/fatfs/doc/en/dstat.html delete mode 100644 stmhal/fatfs/doc/en/dwrite.html delete mode 100644 stmhal/fatfs/doc/en/eof.html delete mode 100644 stmhal/fatfs/doc/en/error.html delete mode 100644 stmhal/fatfs/doc/en/fattime.html delete mode 100644 stmhal/fatfs/doc/en/fdisk.html delete mode 100644 stmhal/fatfs/doc/en/filename.html delete mode 100644 stmhal/fatfs/doc/en/forward.html delete mode 100644 stmhal/fatfs/doc/en/getcwd.html delete mode 100644 stmhal/fatfs/doc/en/getfree.html delete mode 100644 stmhal/fatfs/doc/en/getlabel.html delete mode 100644 stmhal/fatfs/doc/en/gets.html delete mode 100644 stmhal/fatfs/doc/en/lseek.html delete mode 100644 stmhal/fatfs/doc/en/mkdir.html delete mode 100644 stmhal/fatfs/doc/en/mkfs.html delete mode 100644 stmhal/fatfs/doc/en/mount.html delete mode 100644 stmhal/fatfs/doc/en/open.html delete mode 100644 stmhal/fatfs/doc/en/opendir.html delete mode 100644 stmhal/fatfs/doc/en/printf.html delete mode 100644 stmhal/fatfs/doc/en/putc.html delete mode 100644 stmhal/fatfs/doc/en/puts.html delete mode 100644 stmhal/fatfs/doc/en/rc.html delete mode 100644 stmhal/fatfs/doc/en/read.html delete mode 100644 stmhal/fatfs/doc/en/readdir.html delete mode 100644 stmhal/fatfs/doc/en/rename.html delete mode 100644 stmhal/fatfs/doc/en/sdir.html delete mode 100644 stmhal/fatfs/doc/en/setlabel.html delete mode 100644 stmhal/fatfs/doc/en/sfatfs.html delete mode 100644 stmhal/fatfs/doc/en/sfile.html delete mode 100644 stmhal/fatfs/doc/en/sfileinfo.html delete mode 100644 stmhal/fatfs/doc/en/size.html delete mode 100644 stmhal/fatfs/doc/en/stat.html delete mode 100644 stmhal/fatfs/doc/en/sync.html delete mode 100644 stmhal/fatfs/doc/en/tell.html delete mode 100644 stmhal/fatfs/doc/en/truncate.html delete mode 100644 stmhal/fatfs/doc/en/unlink.html delete mode 100644 stmhal/fatfs/doc/en/utime.html delete mode 100644 stmhal/fatfs/doc/en/write.html delete mode 100644 stmhal/fatfs/doc/img/app1.c delete mode 100644 stmhal/fatfs/doc/img/app2.c delete mode 100644 stmhal/fatfs/doc/img/app3.c delete mode 100644 stmhal/fatfs/doc/img/f1.png delete mode 100644 stmhal/fatfs/doc/img/f2.png delete mode 100644 stmhal/fatfs/doc/img/f3.png delete mode 100644 stmhal/fatfs/doc/img/f4.png delete mode 100644 stmhal/fatfs/doc/img/f5.png delete mode 100644 stmhal/fatfs/doc/img/f6.png delete mode 100644 stmhal/fatfs/doc/img/f7.png delete mode 100644 stmhal/fatfs/doc/img/layers.png delete mode 100644 stmhal/fatfs/doc/img/layers3.png delete mode 100644 stmhal/fatfs/doc/img/modules.png delete mode 100644 stmhal/fatfs/doc/img/rwtest.png delete mode 100644 stmhal/fatfs/doc/img/rwtest2.png delete mode 100644 stmhal/fatfs/doc/img/rwtest3.png delete mode 100644 stmhal/fatfs/doc/ja/appnote.html delete mode 100644 stmhal/fatfs/doc/ja/chdir.html delete mode 100644 stmhal/fatfs/doc/ja/chdrive.html delete mode 100644 stmhal/fatfs/doc/ja/chmod.html delete mode 100644 stmhal/fatfs/doc/ja/close.html delete mode 100644 stmhal/fatfs/doc/ja/closedir.html delete mode 100644 stmhal/fatfs/doc/ja/dinit.html delete mode 100644 stmhal/fatfs/doc/ja/dioctl.html delete mode 100644 stmhal/fatfs/doc/ja/dread.html delete mode 100644 stmhal/fatfs/doc/ja/dstat.html delete mode 100644 stmhal/fatfs/doc/ja/dwrite.html delete mode 100644 stmhal/fatfs/doc/ja/eof.html delete mode 100644 stmhal/fatfs/doc/ja/error.html delete mode 100644 stmhal/fatfs/doc/ja/fattime.html delete mode 100644 stmhal/fatfs/doc/ja/fdisk.html delete mode 100644 stmhal/fatfs/doc/ja/filename.html delete mode 100644 stmhal/fatfs/doc/ja/forward.html delete mode 100644 stmhal/fatfs/doc/ja/getcwd.html delete mode 100644 stmhal/fatfs/doc/ja/getfree.html delete mode 100644 stmhal/fatfs/doc/ja/getlabel.html delete mode 100644 stmhal/fatfs/doc/ja/gets.html delete mode 100644 stmhal/fatfs/doc/ja/lseek.html delete mode 100644 stmhal/fatfs/doc/ja/mkdir.html delete mode 100644 stmhal/fatfs/doc/ja/mkfs.html delete mode 100644 stmhal/fatfs/doc/ja/mount.html delete mode 100644 stmhal/fatfs/doc/ja/open.html delete mode 100644 stmhal/fatfs/doc/ja/opendir.html delete mode 100644 stmhal/fatfs/doc/ja/printf.html delete mode 100644 stmhal/fatfs/doc/ja/putc.html delete mode 100644 stmhal/fatfs/doc/ja/puts.html delete mode 100644 stmhal/fatfs/doc/ja/rc.html delete mode 100644 stmhal/fatfs/doc/ja/read.html delete mode 100644 stmhal/fatfs/doc/ja/readdir.html delete mode 100644 stmhal/fatfs/doc/ja/rename.html delete mode 100644 stmhal/fatfs/doc/ja/sdir.html delete mode 100644 stmhal/fatfs/doc/ja/setlabel.html delete mode 100644 stmhal/fatfs/doc/ja/sfatfs.html delete mode 100644 stmhal/fatfs/doc/ja/sfile.html delete mode 100644 stmhal/fatfs/doc/ja/sfileinfo.html delete mode 100644 stmhal/fatfs/doc/ja/size.html delete mode 100644 stmhal/fatfs/doc/ja/stat.html delete mode 100644 stmhal/fatfs/doc/ja/sync.html delete mode 100644 stmhal/fatfs/doc/ja/tell.html delete mode 100644 stmhal/fatfs/doc/ja/truncate.html delete mode 100644 stmhal/fatfs/doc/ja/unlink.html delete mode 100644 stmhal/fatfs/doc/ja/utime.html delete mode 100644 stmhal/fatfs/doc/ja/write.html delete mode 100644 stmhal/fatfs/doc/updates.txt (limited to 'stmhal/fatfs/doc') diff --git a/stmhal/fatfs/doc/00index_e.html b/stmhal/fatfs/doc/00index_e.html deleted file mode 100644 index 27e85cc48..000000000 --- a/stmhal/fatfs/doc/00index_e.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - -FatFs - Generic FAT File System Module - - - -

FatFs - Generic FAT File System Module

-
- -
-layer -

FatFs is a generic FAT file system module for small embedded systems. The FatFs is written in compliance with ANSI C and completely separated from the disk I/O layer. Therefore it is independent of hardware architecture. It can be incorporated into low cost microcontrollers, such as AVR, 8051, PIC, ARM, Z80, 68k and etc..., without any change. Petit FatFs module is also available here.

- -

Features

- -
- - -
-

Application Interface

-

FatFs module provides following functions to the applications. In other words, this list describes what FatFs can do to access the FAT volumes.

- -
- - -
-

Disk I/O Interface

-

Since the FatFs module is completely separated from disk I/O layer, it requires following functions to access the physical media. When O/S related feature is enabled, it will require process/memory functions in addition. However the low level disk I/O module is not a part of FatFs module, so that it must be provided by user. The sample implementations are also available in the downloads.

- -
- - -
-

Resources

-

The FatFs module is a free software opened for education, research and development. You can use, modify and/or redistribute it for personal projects or commercial products without any restriction under your responsibility. For further information, refer to the application note.

- -
- - -
-

Return

- - diff --git a/stmhal/fatfs/doc/00index_j.html b/stmhal/fatfs/doc/00index_j.html deleted file mode 100644 index 2f565ff33..000000000 --- a/stmhal/fatfs/doc/00index_j.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - -FatFs 汎用FATファイルシステム・モジュール - - - -

FatFs 汎用FATファイルシステム・モジュール

-
- -
-layer -

FatFsは小規模な組み込みシステム向けの汎用FATファイルシステム・モジュールです。ANSI C準拠でハードウェア・アーキテクチャには依存しないので、必要なワーク・エリアが確保できれば、8051, PIC, AVR, SH, Z80, 68k, H8, ARMなど安価なマイコンでも使用可能です。FatFsをシュリンクしたぷちFatFsもあります。

-

FatFsモジュールの特徴

- -
- - -
-

上位レイヤ・インターフェース

-

FatFsモジュールは、アプリケーション・レイヤに対し、次のファイル操作関数(API)を提供します。つまり、このリストはFatFsにできることをシンプルに示しています。

- -
- - -
-

下位レイヤ・インターフェース

-

FatFsモジュールは、単なるファイル・システム・レイヤなので、メディア制御レイヤは含まれません。使用するメディアに対応した制御関数は、ユーザによって提供される必要があります。FatFsモジュールは、下位レイヤに対し少なくとも次のインターフェースを要求します。OS関連機能を有効にしたときは、加えてプロセス/メモリ関連関数も必要になります。サンプル・プロジェクトに下位レイヤの実装例を示します。

- -
- - -
-

資料

-

FatFsモジュールはフリー・ソフトウェアとして教育・研究・開発用に公開しています。どのような利用目的(個人利用から商用まで)でも使用・改変・配布について一切の制限はありませんが、全て利用者の責任の下での利用とします。詳しくはアプリケーション・ノートを参照してください。

- -
- - -
-

戻る

- - diff --git a/stmhal/fatfs/doc/css_e.css b/stmhal/fatfs/doc/css_e.css deleted file mode 100644 index 873511e41..000000000 --- a/stmhal/fatfs/doc/css_e.css +++ /dev/null @@ -1,60 +0,0 @@ -* {margin: 0; padding: 0; border-width: 0;} -body {margin: 8px; background-color: #e0ffff; font-color: black; font-family: serif; line-height: 133%; max-width: 1024px;} -a:link {color: blue;} -a:visited {color: darkmagenta;} -a:hover {background-color: #a0ffff;} -a:active {color: darkmagenta; overflow: hidden; outline:none; position: relative; top: 1px; left: 1px;} -abbr {border-width: 1px;} - -p {margin: 0 0 0.3em 1em;} -em {font-style: normal; font-weight: bold; margin: 0 0.1em;} -strong {} -pre {border: 1px dashed gray; margin: 0.5em 1em; padding: 0.5em; line-height: 1.2em; font-size: 85%; font-family: "Consolas", "Courier New", monospace; background-color: white;} -pre span.c {color: green;} -pre span.k {color: blue;} -pre span.arg {font-style: italic;} -tt {margin: 0 0.2em; font-size: 0.85em; font-family: "Consolas", "Courier New", monospace; } -tt.arg {font-style: italic;} -ol {margin: 0.5em 2.5em;} -ul {margin: 0.5em 2em;} -dl {margin: 0.5em 1em;} -dd {margin: 0 2em;} -dt {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace;} -dl.par dt {margin: 0.5em 0 0 0 ; font-style: italic; } -dl.ret dt {margin: 0.5em 0 0 0 ; font-size: 0.85em; font-family: "Consolas", "Courier New", monospace;} -hr {border-width: 1px; margin: 1em;} -div.abst {font-family: sans-serif;} -div.para {clear: both; font-family: serif;} -div.ret a {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace; } -.equ {text-indent: 0; margin: 1em 2em 1em;} -.indent {margin-left: 2em;} -.rset {float: right; margin: 0 0 0.5em 0.5em;} -.lset {float: left; margin: 0 0.5em 0.5em 0.5em;} -ul.flat li {list-style-type: none; margin: 0;} -a.imglnk img {border: 1px solid;} -.iequ {white-space: nowrap; font-weight: bold;} -.clr {clear: both;} -.it {font-style: italic;} -.mfd {font-size: 0.7em; padding: 0 1px; border: 1px solid; white-space : nowrap} - -h1 {line-height: 1em; font-size: 2em; font-family: sans-serif; padding: 0.3em 0 0.3em;} -p.hdd {float: right; text-align: right; margin-top: 0.5em;} -hr.hds {clear: both; margin-bottom: 1em;} - -h2 {font-size: 2em; font-family: sans-serif; background-color: #d8d8FF; padding: 0.5em 0.5em; margin: 0 0 0.5em;} -h3 {font-size: 1.5em; font-family: sans-serif; margin: 1.5em 0 0.5em;} -h4 {font-size: 1.2em; font-family: sans-serif; margin: 1em 0 0.2em;} -h5 {font-size: 1em; font-family: sans-serif; margin: 0.5em 0 0em;} -small {font-size: 80%;} -.indent {margin-left: 2em;} - -/* Tables */ -table {margin: 0.5em 1em; border-collapse: collapse; border: 2px solid black; } -th {background-color: white; border-style: solid; border-width: 1px 1px 2px; border-color: black; padding: 0 3px; vertical-align: top; white-space: nowrap;} -td {background-color: white; border: 1px solid black; padding: 0 3px; vertical-align: top; line-height: 1.3em;} -table.lst td:first-child {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace;} -table.lst2 td {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace;} -table caption {font-family: sans-serif; font-weight: bold;} -tr.lst3 td { border-width: 2px 1px 1px; } - -p.foot {clear: both; text-indent: 0; margin: 1em 0.5em 1em;} diff --git a/stmhal/fatfs/doc/css_j.css b/stmhal/fatfs/doc/css_j.css deleted file mode 100644 index 18f195d29..000000000 --- a/stmhal/fatfs/doc/css_j.css +++ /dev/null @@ -1,63 +0,0 @@ -@charset "Shift_JIS"; -/* Common style sheet for Tech Notes */ - -* {margin: 0; padding: 0; border-width: 0;} -body {margin: 8px; background-color: #e0ffff; font-color: black; font-family:"MS P明朝", serif; line-height: 150%; letter-spacing: 1px; max-width: 1024px;} -a:link {color: blue;} -a:visited {color: darkmagenta;} -a:hover {background-color: #a0ffff;} -a:active {color: darkmagenta; overflow: hidden; outline:none; position: relative; top: 1px; left: 1px;} -abbr {border-width: 1px;} - -p {text-indent: 1em; margin: 0 0 0.3em 0.5em;} -em {font-style: normal; font-weight: bold; margin: 0 0.1em;} -strong {} -pre {border: 1px dashed gray; margin: 0.5em 1em; padding: 0.5em; line-height: 1.2em; letter-spacing: 0; font-size: 0.85em; font-family: "Consolas", "Courier New", "MS ゴシック", monospace; background-color: white;} -pre span.c {color: green;} -pre span.k {color: blue;} -pre span.arg {font-style: italic;} -tt {margin: 0 0.2em; letter-spacing: 0; font-size: 0.85em; font-family: "Consolas", "Courier New", "MS ゴシック", monospace;} -tt.arg {font-style: italic;} -ol {margin: 0.5em 2.5em;} -ul {margin: 0.5em 2em;} -dl {margin: 0.5em 1em;} -dd {margin: 0em 2em;} -dt {font-size: 0.85em; font-family: "Consolas", "Courier New", "MS ゴシック", monospace;} -dl.par dt {margin: 0.5em 0 0 0 ; font-style: italic; letter-spacing: 0;} -dl.ret dt {margin: 0.5em 0 0 0 ; font-size: 0.85em; font-family: "Consolas", "Courier New", "MS ゴシック", monospace; letter-spacing: 0; } -hr {border-width: 1px; margin: 1em;} -div.abst {font-family: "MS Pゴシック",sans-serif;} -div.para {clear: both; font-family: "MS P明朝",serif;} -div.ret a {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace; } -.equ {text-indent: 0; margin: 1em 2em 1em;} -.indent {margin-left: 2em;} -.rset {float: right; margin: 0 0 0.5em 0.5em;} -.lset {float: left; margin: 0 0.5em 0.5em 0.5em;} -ul.flat li {list-style-type: none; margin: 0;} -a.imglnk img {border: 1px solid;} -.iequ {white-space: nowrap; font-weight: bold;} -.clr {clear: both;} -.it {font-style: italic;} -.mfd {font-size: 0.7em; padding: 0 1px; border: 1px solid; white-space : nowrap} - -h1 {line-height: 1em; font-size: 2em; font-family: sans-serif; padding: 0.3em 0 0.3em;} -p.hdd {float: right; text-align: right; margin-top: 0.5em;} -hr.hds {clear: both; margin-bottom: 1em;} - -h2 {font-size: 2em; font-family: "MS Pゴシック",sans-serif; background-color: #d8d8FF; padding: 0.5em 0.5em; margin: 0 0 0.5em;} -h3 {font-size: 1.5em; font-family: "MS Pゴシック",sans-serif; margin: 1.5em 0 0.5em;} -h4 {font-size: 1.2em; font-family: "MS Pゴシック",sans-serif; margin: 1em 0 0.2em;} -h5 {font-size: 1em; font-family: "MS Pゴシック",sans-serif; margin: 0.5em 0 0em;} -small {font-size: 80%;} -.indent {margin-left: 2em;} - -/* Tables */ -table {margin: 0.5em 1em; border-collapse: collapse; border: 2px solid black; letter-spacing: 0;} -th {background-color: white; border-style: solid; border-width: 1px 1px 2px; border-color: black; padding: 0 3px; vertical-align: top;} -td {background-color: white; border: 1px solid black; padding: 0 3px; vertical-align: top; line-height: 1.3em;} -table.lst td:first-child {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace; white-space: nowrap;} -table.lst2 td {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace; white-space: nowrap;} -table caption {font-family: sans-serif; font-weight: bold;} -tr.lst3 td {border-width: 2px 1px 1px; } - -p.foot {clear: both; text-indent: 0; margin: 1em 0.5em 1em;} diff --git a/stmhal/fatfs/doc/en/appnote.html b/stmhal/fatfs/doc/en/appnote.html deleted file mode 100644 index 457ccbbc3..000000000 --- a/stmhal/fatfs/doc/en/appnote.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - - -FatFs Module Application Note - - - -

FatFs Module Application Note

-
    -
  1. How to Port
  2. -
  3. Limits
  4. -
  5. Memory Usage
  6. -
  7. Module Size Reduction
  8. -
  9. Long File Name
  10. -
  11. Unicode API
  12. -
  13. Re-entrancy
  14. -
  15. Duplicated File Access
  16. -
  17. Performance Effective File Access
  18. -
  19. Considerations on Flash Memory Media
  20. -
  21. Critical Section
  22. -
  23. Extended Use of APIs
  24. -
  25. About FatFs License
  26. -
-
- -
-

How to Port

- -

Basic considerations

-

The FatFs module is assuming following conditions on portability.

- - -

System organizations

-

The dependency diagram shown below is a typical configuration of the embedded system with FatFs module.

-

dependency diagram

- -

Which function is required?

-

You need to provide only low level disk I/O functions that required by FatFs module and nothing else. If a working disk module for the target is already existing, you need to write only glue functions to attach it to the FatFs module. If not, you need to port any other disk module or write it from scratch. Most of defined functions are not that always required. For example, disk write function is not required in read-only configuration. Following table shows which function is required depends on configuration options.

- - - - - - - - - - -
FunctionRequired when:Note
disk_initialize
disk_status
disk_read
AlwaysDisk I/O functions.
Samples available in ffsample.zip.
There are many implementations on the web.
disk_write
get_fattime
disk_ioctl (CTRL_SYNC)
_FS_READONLY == 0
disk_ioctl (GET_SECTOR_COUNT)
disk_ioctl (GET_BLOCK_SIZE)
_USE_MKFS == 1
disk_ioctl (GET_SECTOR_SIZE)_MAX_SS > 512
disk_ioctl (CTRL_ERASE_SECTOR)_USE_ERASE == 1
ff_convert
ff_wtoupper
_USE_LFN >= 1Unicode support functions.
Available in option/cc*.c.
ff_cre_syncobj
ff_del_syncobj
ff_req_grant
ff_rel_grant
_FS_REENTRANT == 1O/S dependent functions.
Samples available in option/syscall.c.
ff_mem_alloc
ff_mem_free
_USE_LFN == 3
-
- -
-

Limits

- -
- -
-

Memory Usage

- - - - - - - - - - - - -
ARM7
32bit
ARM7
Thumb
CM3
Thumb-2
AVRH8/300HPIC24RL78V850ESSH-2ARX600IA-32
CompilerGCCGCCGCCGCCCH38C30CC78K0RCA850SHCRXCVC6
_WORD_ACCESS00010001011
text (Full, R/W)1059171196565132401086411619131928031896059777856
text (Min, R/W) 667145954293 8512 7232 7674 90335235576839235129
text (Full, R/O) 469531212861 6218 5162 5466 64183799396428473687
text (Min, R/O) 352324632275 4558 4058 4212 49482959309621992857
bssV*4 + 2V*4 + 2V*4 + 2V*2 + 2V*4 + 2V*2 + 2V*2 + 2V*4 + 2V*4 + 2V*4 + 2V*4 + 2
Work area
(_FS_TINY == 0)
V*560 +
F*550
V*560 +
F*550
V*560 +
F*550
V*560 +
F*544
V*560 +
F*550
V*560 +
F*544
V*560 +
F*544
V*560 +
F*544
V*560 +
F*550
V*560 +
F*550
V*560 +
F*550
Work area
(_FS_TINY == 1)
V*560 +
F*36
V*560 +
F*36
V*560 +
F*36
V*560 +
F*32
V*560 +
F*36
V*560 +
F*32
V*560 +
F*32
V*560 +
F*36
V*560 +
F*36
V*560 +
F*36
V*560 +
F*36
-

These are the memory usage on some target systems with following condition. The memory sizes are in unit of byte, V denotes number of volumes and F denotes number of open files. All samples are optimezed in code size.

-
-FatFs R0.10 options:
-_FS_READONLY     0 (R/W), 1 (R/O)
-_FS_MINIMIZE     0 (Full function), 3 (Minimized function)
-_USE_STRFUNC     0 (Disable string functions)
-_USE_MKFS        0 (Disable f_mkfs function)
-_USE_FORWARD     0 (Disable f_forward function)
-_USE_FASTSEEK    0 (Disable fast seek feature)
-_CODE_PAGE       932 (Japanese Shift-JIS)
-_USE_LFN         0 (Disable LFN)
-_MAX_SS          512 (Fixed sector size)
-_FS_RPATH        0 (Disable relative path feature)
-_FS_LABEL        0 (Disable volume label functions)
-_VOLUMES         V (Number of logical drives to be used)
-_MULTI_PARTITION 0 (Single partition per drive)
-_FS_REENTRANT    0 (Disable reentrancy)
-_FS_LOCK         0 (Disable file lock control)
-
-
- -
-

Module Size Reduction

-

Follwing table shows which API function is removed by configuration options for the module size reduction.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Function_FS_MINIMIZE_FS_READONLY_USE_STRFUNC_FS_RPATH_FS_LABEL_USE_MKFS_USE_FORWARD_MULTI_PARTITION
0123010  1/201201010101
f_mount
f_open
f_close
f_read
f_writex
f_syncx
f_lseekx
f_opendirxx
f_closedirxx
f_readdirxx
f_statxxx
f_getfreexxxx
f_truncatexxxx
f_unlinkxxxx
f_mkdirxxxx
f_chmodxxxx
f_utimexxxx
f_renamexxxx
f_chdirx
f_chdrivex
f_getcwdxx
f_getlabelx
f_setlabelxx
f_forwardx
f_mkfsxx
f_fdiskxxx
f_putcxx
f_putsxx
f_printfxx
f_getsx
-
- -
-

Long File Name

-

The FatFs module has started to support long file name (LFN) at revision 0.07. The two different file names, SFN and LFN, of a file is transparent in the file functions except for f_readdir function. To enable LFN feature, set _USE_LFN to 1, 2 or 3, and add a Unicode code conversion function ff_convert() and ff_wtoupper() to the project. The LFN feature requiers a certain working buffer in addition. The buffer size can be configured by _MAX_LFN corresponding to the available memory size. The size of long file name will reach up to 255 characters, so that the _MAX_LFN should be set to 255 for full featured LFN operation. If the size of working buffer is insufficient for the given file name, the file function fails with FR_INVALID_NAME. When enable the LFN feature with re-entrant feature, _USE_LFN must be set to 2 or 3. In this case, the file function allocates the working buffer on the stack or heap. The working buffer occupies (_MAX_LFN + 1) * 2 bytes.

- - - - - - - - -
LFN cfg on ARM7TDMI
Code pageProgram size
SBCS+3.7K
932(Shift-JIS)+62K
936(GBK)+177K
949(Korean)+139K
950(Big5)+111K
-

When the LFN feature is enabled, the module size will be increased depends on the selected code page. Right table shows how many bytes increased when LFN feature is enabled with some code pages. Especially, in the CJK region, tens of thousands of characters are being used. Unfortunately, it requires a huge OEM-Unicode bidirectional conversion table and the module size will be drastically increased that shown in the table. As the result, the FatFs with LFN feature with those code pages will not able to be implemented to most 8-bit microcontrollers.

-

Note that the LFN feature on the FAT file system is a patent of Microsoft Corporation. This is not the case on FAT32 but most FAT32 drivers come with the LFN feature. FatFs can swich the LFN feature off by configuration option. When enable LFN feature on the commercial products, a license from Microsoft may be required depends on the final destination.

-
- -
-

Unicode API

-

By default, FatFs uses ANSI/OEM code set on the API under LFN configuration. FatFs can also switch the character encoding to Unicode on the API (_LFN_UNICODE). This means the FatFs supports the True-LFN feature. For more information, refer to the description in the file name.

-
- -
-

Re-entrancy

-

The file operations to the different volume is always re-entrant and can work simultaneously. The file operations to the same volume is not re-entrant but it can also be configured to thread-safe with _FS_REENTRANT option. In this case, also the OS dependent synchronization object control functions, ff_cre_syncobj(), ff_del_syncobj(), ff_req_grant() and ff_rel_grant() must be added to the project.

-

When a file function is called while the volume is in use by any other task, the file function is suspended until that task leaves file function. If wait time exceeded a period defined by _TIMEOUT, the file function will abort with FR_TIMEOUT. The timeout feature might not be supported by some RTOS.

-

There is an exception for f_mount(), f_mkfs(), f_fdisk() function. These functions are not re-entrant to the same volume or corresponding physical drive. When use these functions, all other tasks must unmount the volume and avoid to access the volume.

-

Note that this section describes on the re-entrancy of the FatFs module itself but also the low level disk I/O layer will need to be re-entrant.

-
- -
-

Duplicated File Access

-

FatFs module does not support the shareing controls of duplicated file access in default. It is permitted when open method to a file is only read mode. The duplicated open in write mode to a file is always prohibited and open file must not be renamed, deleted, or the FAT structure on the volume can be collapted.

-

The file shareing control can also be available when _FS_LOCK is set to 1 or grater. The value specifies the number of files to manage simultaneously. In this case, if any open, rename or remove that violating the file shareing rule that described above is attempted, the file function will fail with FR_LOCKED. If number of open objects gets larger than _FS_LOCK, the f_open()/f_opendir() function will fail with FR_TOO_MANY_OPEN_FILES.

-
- -
-

Performance Effective File Access

-

For good performance to read/write files on the small embedded system, application programmer should consider what process is done in the FatFs module. The file data on the volume is transferred in following sequence by f_read() function.

-

Figure 1. Sector miss-aligned read (short)
- -

-

Figure 2. Sector miss-aligned read (long)
- -

-

Figure 3. Sector aligned read
- -

-

The file I/O buffer is a sector buffer to read/write a partial data on the sector. The sector buffer is either file private sector buffer on each file object or shared sector buffer in the file system object. The buffer configuration option _FS_TINY determins which sector buffer is used for the file data transfer. When tiny buffer (1) is selected, data memory consumption is reduced 512 bytes each file object. In this case, FatFs module uses only a sector buffer in the file system object for file data transfer and FAT/directory access. The disadvantage of the tiny buffer configuration is: the FAT data cached in the sector buffer will be lost by file data transfer and it must be reloaded at every cluster boundary. However it will be suitable for most application from view point of the decent performance and low memory comsumption.

-

Figure 1 shows that a partial sector, sector mis-aligned part of the file, is transferred via the file I/O buffer. On long data transfer shown in Figure 2, middle of transfer data that covers one or more sector is transferred to the application buffer directly. Figure 3 shows that the case of entier transfer data is aligned to the sector boundary. In this case, file I/O buffer is not used. On the direct transfer, the maximum extent of sectors are read with disk_read() function at a time but the multiple sector transfer never across the cluster boundary even if it is contiguous.

-

Therefore taking effort to sector aligned read/write accesss avoids buffered data transfer and the read/write performance will be improved. Besides the effect, cached FAT data will not be flushed by file data transfer at the tiny configuration, so that it can achieve same performance as non-tiny configuration with small memory footprint.

-
- -
-

Considerations on Flash Memory Media

-

To maximize the write performance of flash memory media, such as SDC and CFC, it must be controlled in consideration of its characteristitcs.

-

Using Mutiple-Sector Write

-
-Figure 6. Comparison between Multiple/Single Sector Write
-fig.6 -
-

The write throughput of the flash memory media becomes the worst at single sector write and it increases proportional to the number of sectors per a write transaction. This effect more appers at more fast bus clock and its ratio often becomes grater than ten. The number of write transaction also affects the life time of the media. Therefore the application program should write the data in large block as possible. The ideal block size is cluster size or power of 2 bytes and the byte offset should be aligned to the block. Of course all layers between the application and the media must support multiple sector write feature, however most of open-source disk drivers lack it. Do not split a multiple sector write request into single sector writes or the write throughput gets poor. Note that FatFs module and its sample disk drivers supprt multiple sector read/write feature.

-

Forcing Memory Erase

-

When remove a file with f_remove() function, the data clusters occupied by the file are marked 'free' on the FAT. But the data sectors containing the file data are not that applied any process, so that the file data left occupies a part of the flash memory array as 'live block'. If the file data is forced erased on removing the file, the number of free blocks on the flash memory will be increased. This may skip internal block erase operation to the data block on next write. As the result the write performance might be improved. To enable this feature, set _USE_ERASE to 1. Note that this is a feature with expectation of internal process of the flash memory media. It may not always effective and f_remove() function will take a time to remove a large file. Most applications will not need this feature.

-
- -
-

Critical Section

-

If a write operation to the FAT volume is interrupted due to any accidental failure, such as sudden blackout, incorrect disk removal and unrecoverable disk error, the FAT structure on the volume can be collapted. Following images shows the critical section of the FatFs module.

-
-Figure 4. Long critical section
-fig.4 -
-
-Figure 5. Minimized critical section
-fig.5 -
-
-

An interruption in the red section can cause a cross link; as a result, the object being changed can be lost. If an interruption in the yellow section is occured, there is one or more possibility listed below.

- -

Each case does not affect the files that not opened in write mode. To minimize risk of data loss, the critical section can be minimized by minimizing the time that file is opened in write mode or using f_sync() function as shown in Figure 5.

-
- -
-

Extended Use of APIs

-

These are examples of extended use of FatFs APIs. New item will be added whenever a useful code is found.

-
    -
  1. Open or create a file for append
  2. -
  3. Empty a directory
  4. -
  5. Allocate contiguous area to the file
  6. -
-
- -
-

About FatFs License

-

This is a copy of the FatFs license document that included in the source codes.

-
/*----------------------------------------------------------------------------/
-/  FatFs - FAT file system module  R0.10                     (C)ChaN, 2013
-/-----------------------------------------------------------------------------/
-/ FatFs module is a generic FAT file system module for small embedded systems.
-/ This is a free software that opened for education, research and commercial
-/ developments under license policy of following trems.
-/
-/  Copyright (C) 2013, ChaN, all right reserved.
-/
-/ * The FatFs module is a free software and there is NO WARRANTY.
-/ * No restriction on use. You can use, modify and redistribute it for
-/   personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
-/ * Redistributions of source code must retain the above copyright notice.
-/
-/-----------------------------------------------------------------------------/
-

Therefore FatFs license is one of the BSD-style license but there is a significant feature. Because FatFs is for embedded projects, the conditions for redistributions in binary form, such as embedded code, hex file and binary library, are not specified to increase its usability. The documentation of the distributions need not include about FatFs and its license document, and it may also. This is equivalent to the BSD 1-Clause License. Of course FatFs is compatible with the projects under GNU GPL. When redistribute the FatFs with any modification, the license can also be changed to GNU GPL or BSD-style license.

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/chdir.html b/stmhal/fatfs/doc/en/chdir.html deleted file mode 100644 index 063b8f561..000000000 --- a/stmhal/fatfs/doc/en/chdir.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - -FatFs - f_chdir - - - - -
-

f_chdir

-

The f_chdir function changes the current directory of a drive.

-
-FRESULT f_chdir (
-  const TCHAR* path /* [IN] Path name */
-);
-
-
- -
-

Parameters

-
-
path
-
Pointer to the null-terminated string that specifies a directory to go.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NO_PATH, -FR_INVALID_NAME, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT, -FR_NOT_ENOUGH_CORE -

-
- - -
-

Description

-

The f_chdir() function changes the current directory of the logical drive. The current directory of a drive is initialized to the root directory when the drive is auto-mounted. Note that the current directory is retained in the each file system object so that it also affects other tasks that using the volume.

-
- - -
-

QuickInfo

-

Available when _FS_RPATH >= 1.

-
- - -
-

Example

-
-    /* Change current direcoty of the current drive (dir1 under root dir) */
-    f_chdir("/dir1");
-
-    /* Change current direcoty of drive 2 (parent dir) */
-    f_chdir("2:..");
-
-
- -
-

See Also

-

f_chdrive, f_getcwd

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/chdrive.html b/stmhal/fatfs/doc/en/chdrive.html deleted file mode 100644 index 665e5430d..000000000 --- a/stmhal/fatfs/doc/en/chdrive.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - -FatFs - f_chdrive - - - - -
-

f_chdrive

-

The f_chdrive function changes the current drive.

-
-FRESULT f_chdrive (
-  const TCHAR* path  /* [IN] Logical drive number */
-);
-
-
- -
-

Parameters

-
-
path
-
Specifies the logical drive number to be set as the current drive.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_INVALID_DRIVE -

-
- - -
-

Description

-

The f_chdrive() function changes the current drive. The initial value of the current drive number is 0. Note that the current drive is retained in a static variable so that it also affects other tasks that using the file functions.

-
- -
-

QuickInfo

-

Available when _FS_RPATH >= 1 and _VOLUMES >= 2.

-
- - -
-

See Also

-

f_chdir, f_getcwd

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/chmod.html b/stmhal/fatfs/doc/en/chmod.html deleted file mode 100644 index 6f18847df..000000000 --- a/stmhal/fatfs/doc/en/chmod.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - -FatFs - f_chmod - - - - -
-

f_chmod

-

The f_chmod function changes the attribute of a file or sub-directory.

-
-FRESULT f_chmod (
-  const TCHAR* path, /* [IN] Object name */
-  BYTE attr,         /* [IN] Attribute flags */
-  BYTE mask          /* [IN] Attribute masks */
-);
-
-
- -
-

Parameters

-
-
path
-
Pointer to the null-terminated string that specifies an object to be changed
-
attr
-
Attribute flags to be set in one or more combination of the following flags. The specified flags are set and others are cleard.
- - - - - - -
AttributeDescription
AM_RDORead only
AM_ARCArchive
AM_SYSSystem
AM_HIDHidden
-
-
mask
-
Attribute mask that specifies which attribute is changed. The specified aattributes are set or cleard.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NO_FILE, -FR_NO_PATH, -FR_INVALID_NAME, -FR_WRITE_PROTECTED, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT, -FR_NOT_ENOUGH_CORE -

-
- - -
-

Description

-

The f_chmod() function changes the attribute of a file or sub-directory.

-
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0 and _FS_MINIMIZE == 0.

-
- - -
-

Example

-
-    /* Set read-only flag, clear archive flag and others are retained. */
-    f_chmod("file.txt", AR_RDO, AR_RDO | AR_ARC);
-
-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/close.html b/stmhal/fatfs/doc/en/close.html deleted file mode 100644 index 159ce545e..000000000 --- a/stmhal/fatfs/doc/en/close.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - -FatFs - f_close - - - - -
-

f_close

-

The f_close function closes an open file.

-
-FRESULT f_close (
-  FIL* fp     /* [IN] Pointer to the file object */
-);
-
-
- -
-

Parameter

-
-
fp
-
Pointer to the open file object structure to be closed.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_OBJECT, -FR_TIMEOUT -

-
- - -
-

Description

-

The f_close() function closes an open file object. If any data has been written to the file, the cached information of the file is written back to the volume. After the function succeeded, the file object is no longer valid and it can be discarded.

-

Note that if the file object is in read-only mode and _FS_LOCK option is not enabled, the file object can also be discarded without this process. However it is not recommended for future compatibility.

-
- - -
-

QuickInfo

-

Always available.

-
- - -
-

See Also

-

f_open, f_read, f_write, f_sync, FIL, FATFS

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/closedir.html b/stmhal/fatfs/doc/en/closedir.html deleted file mode 100644 index cd82a2a20..000000000 --- a/stmhal/fatfs/doc/en/closedir.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - -FatFs - f_closedir - - - - -
-

f_closedir

-

The f_closedir function closes an open directory.

-
-FRESULT f_closedir (
-  DIR* dp     /* [IN] Pointer to the directory object */
-);
-
-
- -
-

Parameter

-
-
dp
-
Pointer to the open directory object structure to be closed.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_INT_ERR, -FR_INVALID_OBJECT, -FR_TIMEOUT -

-
- - -
-

Description

-

The f_closedir() function closes an open directory object. After the function succeeded, the file object is no longer valid and it can be discarded.

-

Note that the directory object can also be discarded without this process unless _FS_LOCK option is not enabled. However it is not recommended for future compatibility.

-
- - -
-

QuickInfo

-

Available when _FS_MINIMIZE <= 1.

-
- - -
-

See Also

-

f_opendir, f_readdir, DIR

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/dinit.html b/stmhal/fatfs/doc/en/dinit.html deleted file mode 100644 index 291ae7834..000000000 --- a/stmhal/fatfs/doc/en/dinit.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - -FatFs - disk_initialize - - - - -
-

disk_initialize

-

The disk_initialize function initializes the disk drive.

-
-DSTATUS disk_initialize (
-  BYTE pdrv           /* [IN] Physical drive number */
-);
-
-
- -
-

Parameter

-
-
pdrv
-
Specifies the physical drive number to initialize.
-
-
- - -
-

Return Values

-

This function returns a disk status as the result. For details of the disk status, refer to the disk_status() function.

-
- -
-

Description

-

This function initializes a physical drive and put it ready to generic read/write data. When the function succeeded, STA_NOINIT flag in the return value is cleared.

-

Application program MUST NOT call this function while FatFs is in use, or FAT structure on the volume can be corrapted. To re-initialize the file system, use f_mount() function instead. This function is called on volume mount process by FatFs module to manage the media change.

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/dioctl.html b/stmhal/fatfs/doc/en/dioctl.html deleted file mode 100644 index f6e8b7bd1..000000000 --- a/stmhal/fatfs/doc/en/dioctl.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - -FatFs - disk_ioctl - - - - -
-

disk_ioctl

-

The disk_ioctl function cntrols device specific features and miscellaneous functions other than generic read/write.

-
-DRESULT disk_ioctl (
-  BYTE pdrv,     /* [IN] Drive number */
-  BYTE cmd,      /* [IN] Control command code */
-  void* buff     /* [I/O] Parameter and data buffer */
-);
-
-
- -
-

Parameters

-
-
pdrv
-
Specifies the drive number (0-9).
-
cmd
-
Specifies the command code.
-
buff
-
Pointer to the parameter buffer depends on the command code. Set NULL if not used.
-
-
- - -
-

Return Value

-
-
RES_OK (0)
-
The function succeeded.
-
RES_ERROR
-
Any error occured.
-
RES_PARERR
-
Invalid command code or parameter.
-
RES_NOTRDY
-
The disk drive has not been initialized.
-
-
- - -
-

Description

-

The FatFs module uses only device independent commands described below. Any device dependent function is not used.

- - - - - - - -
CommandDescription
CTRL_SYNCMake sure that the disk drive has finished pending write process. When the disk I/O module has a write back cache, flush the dirty sector immediately. This command is not used in read-only configuration.
GET_SECTOR_SIZEReturns sector size of the drive into the WORD variable pointed by buff. This command is not used in fixed sector size configuration, _MAX_SS is 512.
GET_SECTOR_COUNTReturns number of available sectors on the drive into the DWORD variable pointed by buff. This command is used by only f_mkfs() function to determine the volume size to be created.
GET_BLOCK_SIZEReturns erase block size of the flash memory in unit of sector into the DWORD variable pointed by buff. The allowable value is 1 to 32768 in power of 2. Return 1 if the erase block size is unknown or disk devices. This command is used by only f_mkfs() function and it attempts to align data area to the erase block boundary.
CTRL_ERASE_SECTORErases a part of the flash memory specified by a DWORD array {<start sector>, <end sector>} pointed by buff. This is similar command to Trim command of ATA command set. When this feature is not supported or not a flash memory media, this command has no effect. The FatFs does not check the result code and the file function is not affected even if the sectors are not erased well. This command is called on removing a cluster chain when _USE_ERASE is 1.
-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/dread.html b/stmhal/fatfs/doc/en/dread.html deleted file mode 100644 index b686bdfbc..000000000 --- a/stmhal/fatfs/doc/en/dread.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - -FatFs - disk_read - - - - -
-

disk_read

-

The disk_read function reads sector(s) from the disk drive.

-
-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
-
Specifies the physical drive number.
-
buff
-
Pointer to the byte array to store the read data. The size of buffer must be in sector size * sector count.
-
sector
-
Specifies the start sector number in logical block address (LBA).
-
count
-
Specifies number of sectors to read. FatFs specifis with 1 to 128. Generally, a multiple sector transfer request must not be split into single sector transactions to the device, or you may not get good read performance.
-
-
- - -
-

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 disk drive 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.

- -
- - -

Return

- - diff --git a/stmhal/fatfs/doc/en/dstat.html b/stmhal/fatfs/doc/en/dstat.html deleted file mode 100644 index 2bdfb33e6..000000000 --- a/stmhal/fatfs/doc/en/dstat.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - -FatFs - disk_status - - - - -
-

disk_status

-

The disk_status function returns the current disk status.

-
-DSTATUS disk_status (
-  BYTE pdrv     /* [IN] Physical drive number */
-);
-
-
- -
-

Parameter

-
-
pdrv
-
Specifies the physical drive number to be confirmed.
-
-
- - -
-

Return Values

-

The disk status is returned in combination of following flags. FatFs refers only STA_NOINIT and STA_PROTECTED.

-
-
STA_NOINIT
-
Indicates that the disk drive is not initialized. This flag is set on system reset, media removal or failure of disk_initialize() function. It is cleared on disk_initialize() function succeeded. Media change that occurs asynchronously must be captured and reflect it to the status flags, or auto-mount feature will not work correctly. When media change detection feature is not supported, application program needs to de-initialize the file system object with f_mount() function after the media change.
-
STA_NODISK
-
Indicates that no medium in the drive. This is always cleared on fixed disk drive. Note that FatFs does not refer this flag.
-
STA_PROTECTED
-
Indicates that the medium is write protected. This is always cleared on the drive that does not support write protect notch. Not valid while no medium in the drive.
-
-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/dwrite.html b/stmhal/fatfs/doc/en/dwrite.html deleted file mode 100644 index af1ae805f..000000000 --- a/stmhal/fatfs/doc/en/dwrite.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - -FatFs - disk_write - - - - -
-

disk_write

-

The disk_write writes sector(s) to the disk.

-
-DRESULT disk_write (
-  BYTE drv,         /* [IN] Physical drive number */
-  const BYTE* buff, /* [IN] Write data (may be non aligned) */
-  DWORD sector,     /* [IN] Sector number to write */
-  UINT count        /* [IN] Number of sectors to write */
-);
-
-
- -
-

Parameters

-
-
pdrv
-
Specifies the physical drive number.
-
buff
-
Pointer to the byte array to be written.
-
sector
-
Specifies the start sector number in logical block address (LBA).
-
count
-
Specifies the number of sectors to write. FatFs specifis 1 to 128. Generally, a multiple sector transfer request must not be split into single sector transactions to the device, or you will never get good write performance.
-
-
- - -
-

Return Values

-
-
RES_OK (0)
-
The function succeeded.
-
RES_ERROR
-
Any hard error occured during the write operation and could not recover it.
-
RES_WRPRT
-
The medium is write protected.
-
RES_PARERR
-
Invalid parameter.
-
RES_NOTRDY
-
The disk drive has not been initialized.
-
-
- - -
-

Description

-

This function is not required in read only configuration. The specified memory address is not that always aligned to word boundary because the type of pointer is defined as BYTE. For more information, read description in disk_read function.

-

Application program MUST NOT call this function while FatFs is in use, or FAT structure on the volume can be corrapted.

-
- - -

Return

- - diff --git a/stmhal/fatfs/doc/en/eof.html b/stmhal/fatfs/doc/en/eof.html deleted file mode 100644 index 384c8d883..000000000 --- a/stmhal/fatfs/doc/en/eof.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_eof - - - - -
-

f_eof

-

The f_eof function tests for end-of-file on a file.

-
-int f_eof (
-  FIL* fp   /* [IN] File object */
-);
-
-
- - -
-

Parameters

-
-
fp
-
Pointer to the open file object structure.
-
-
- - -
-

Return Values

-

The f_eof() function returns a non-zero value if the read/write pointer has reached end of the file; otherwise it returns a zero.

-
- - -
-

Description

-

In this revision, this function is implemented as a macro.

-
-#define f_eof(fp) (((fp)->fptr) == ((fp)->fsize) ? 1 : 0)
-
-
- - -
-

QuickInfo

-

Always available.

-
- - -
-

See Also

-

f_open, f_lseek, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/error.html b/stmhal/fatfs/doc/en/error.html deleted file mode 100644 index 7405d9e0e..000000000 --- a/stmhal/fatfs/doc/en/error.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_error - - - - -
-

f_error

-

The f_error tests for an error on a file.

-
-int f_error (
-  FIL* fp   /* [IN] File object */
-);
-
-
- - -
-

Parameters

-
-
fp
-
Pointer to the open file object structure.
-
-
- - -
-

Return Values

-

Returns a non-zero value if a hard error has occured; otherwise it returns a zero.

-
- - -
-

Description

-

In this revision, this function is implemented as a macro.

-
-#define f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0)
-
-
- - -
-

QuickInfo

-

Always available.

-
- - -
-

See Also

-

f_open, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/fattime.html b/stmhal/fatfs/doc/en/fattime.html deleted file mode 100644 index c42cd5d36..000000000 --- a/stmhal/fatfs/doc/en/fattime.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - -FatFs - get_fattime - - - - -
-

get_fattime

-

The get_fattime function gets current time.

-
-DWORD get_fattime (void);
-
-
- - -
-

Return Value

-

Currnet time is returned with packed into a DWORD value. The bit field is as follows:

-
-
bit31:25
-
Year from 1980 (0..127)
-
bit24:21
-
Month (1..12)
-
bit20:16
-
Day in month(1..31)
-
bit15:11
-
Hour (0..23)
-
bit10:5
-
Minute (0..59)
-
bit4:0
-
Second / 2 (0..29)
-
-
- - -
-

Description

-

The get_fattime() function must return any valid time even if the system does not support a real time clock. If a zero is returned, the file will not have a valid time. This fucntion is not required in read only configuration.

-
- - -

Return

- - diff --git a/stmhal/fatfs/doc/en/fdisk.html b/stmhal/fatfs/doc/en/fdisk.html deleted file mode 100644 index d9dfbe190..000000000 --- a/stmhal/fatfs/doc/en/fdisk.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - -FatFs - f_fdisk - - - - -
-

f_fdisk

-

The f_fdisk fucntion divides a physical drive.

-
-FRESULT f_fdisk (
-  BYTE  pdrv,         /* [IN] Physical drive number */
-  const DWORD part[], /* [IN] Partition size */
-  void* work          /* [IN] Work area */
-);
-
-
- -
-

Parameters

-
-
pdrv
-
Specifies the physical drive to be divided.
-
part[]
-
Partition map table. It must have four items.
-
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 a partition table into the MBR of the physical drive. The partitioning rule is in generic FDISK format, so that it can create upto four primary partitions. Extended partition is not supported. The part[] array 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 means percentage of the partition in the entire disk space. If it is larger than 100, it means partition size in unit of sector.

-
- -
-

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_mount(&fs, "0:", 0);  /* Register work area to the logical drive 0 */
-    f_mkfs("0:", 0, 0);         /* Create FAT volume on the logical drive 0. 2nd argument is ignored. */
-    f_mount(0, "0:", 0);        /* Unregister work area from the logical drive 0 */
-
-    f_mount(&fs, "1:", 0);  /* Give a work area to the logical drive 1 */
-    f_mkfs("1:", 0, 0);         /* Create FAT volume on the logical drive 1. 2nd argument is ignored. */
-    f_mount(0, "1:", 0);        /* Unregister work area from the logical drive 1 */
-
-
-
- -
-

See Also

-

Volume management, f_mkfs

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/filename.html b/stmhal/fatfs/doc/en/filename.html deleted file mode 100644 index de20f056c..000000000 --- a/stmhal/fatfs/doc/en/filename.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - -FatFs - Path Names - - - -

Path Names

- -
-

Format of the path names

-

The format of path name on the FatFs module is similer to the filename specs of DOS/Windos as follows:

-
"[drive#:][/]directory/file"
-

The FatFs module supports long file name (LFN) and 8.3 format file name (SFN). The LFN can be used when LFN feature is enabled (_USE_LFN > 0). The sub directories are separated with a \ or / in the same way as DOS/Windows API. Duplicated separators are skipped and ignored. Only a difference is that the logical drive is specified in a numeral with a colon. When the drive number is omitted, it is assumed as default drive (drive 0 or current drive).

-

Control characters ('\0' to '\x1F') are recognized as end of the path name. Leading/embedded spaces in the path name are valid as a part of the name at LFN configuration but they are recognized as end of the path name at non-LFN configuration. Trailing spaces and dots are ignored.

-

In default configuration (_FS_RPATH == 0), it does not have a concept of current directory like OS oriented file system. All objects on the volume are always specified in full path name that follows from the root directory. Dot directory names are not allowed. Heading separator is ignored and it can be exist or omitted. The default drive number is fixed to 0.

-

When relative path feature is enabled (_FS_RPATH == 1), specified path is followed from the root directory if a heading separator is exist. If not, it is followed from the current directory set with f_chdir function. Dot names are also allowed for the path name. The default drive is the current drive set with f_chdrive function.

- - - - - - - - - - - - - - -
Path name_FS_RPATH == 0_FS_RPATH == 1
file.txtA file in the root directory of the drive 0A file in the current directory of the current drive
/file.txtA file in the root directory of the drive 0A file in the root directory of the current drive
The root directory of the drive 0The current directory of the current drive
/The root directory of the drive 0The root directory of the current drive
2:The root directory of the drive 2The current directory of the drive 2
2:/The root directory of the drive 2The root directory of the drive 2
2:file.txtA file in the root directory of the drive 2A file in the current directory of the drive 2
../file.txtInvalid nameA file in the parent directory
.Invalid nameThis directory
..Invalid nameParent directory of the current directory
dir1/..Invalid nameThe current directory
/..Invalid nameThe root directory (sticks the top level)
-
- -


-
-

Unicode API

-

The path names are input/output in either ANSI/OEM code (SBCS/DBCS) or Unicode depends on the configuration options. The type of arguments which specify the file names are defined as TCHAR. It is an alias of char in default. The code set used to the file name string is ANSI/OEM specifid by _CODE_PAGE. When _LFN_UNICODE is set to 1, the type of the TCHAR is switched to WCHAR to support Unicode (UTF-16 encoding). In this case, the LFN feature is fully supported and the Unicode specific characters, such as 笨昶亂笨。笘ク笘ュ, can also be used for the path name. It also affects data types and encoding of the string I/O functions. To define literal strings, _T(s) and _TEXT(s) macro are available to select either ANSI/OEM or Unicode automatically. The code shown below is an example to define the literal strings.

-
- f_open(fp, "filename.txt", FA_READ);      /* ANSI/OEM string */
- f_open(fp, L"filename.txt", FA_READ);     /* Unicode string */
- f_open(fp, _T("filename.txt"), FA_READ);  /* Changed by configuration */
-
-
- -


-
-

Volume Management

-

The FatFs module needs dynamic work area called file system object for each volume (logical drive). It is registered to the FatFs module by f_mount() function. By default, each logical drive is bound to the physical drive with the same drive number and an FAT volume on the drive is serched by auto detect feature. It loads boot sectors and checks it if it is an FAT boot sector in order of sector 0 as SFD format, 1st partition, 2nd partition, 3rd partition and 4th partition as FDISK format.

-

When _MULTI_PARTITION == 1 is specified by configuration option, each individual logical drive is bound to the partition on the physical drive specified by volume management table. The volume management table must be defined by user to resolve relationship between logical drives and partitions. Following code is an example of a volume management table.

-
-Example: Logical drive 0-2 are tied to three pri-partitions on the physical drive 0 (fixed disk)
-         Logical drive 3 is tied to an FAT volume on the physical drive 1 (removable disk)
-
-PARTITION VolToPart[] = {
-    {0, 1},     /* Logical drive 0 ==> Physical drive 0, 1st partition */
-    {0, 2},     /* Logical drive 1 ==> Physical drive 0, 2nd partition */
-    {0, 3},     /* Logical drive 2 ==> Physical drive 0, 3rd partition */
-    {1, 0}      /* Logical drive 3 ==> Physical drive 1 (auto detection) */
-};
-
-relationship between logical drive and physical drive -

There are some considerations on using _MULTI_PARTITION configuration.

- -
- - - diff --git a/stmhal/fatfs/doc/en/forward.html b/stmhal/fatfs/doc/en/forward.html deleted file mode 100644 index 714c48d15..000000000 --- a/stmhal/fatfs/doc/en/forward.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - -FatFs - f_forward - - - - -
-

f_forward

-

The f_forward function reads the file data and forward it to the data streaming device.

-
-FRESULT f_forward (
-  FIL* fp,                        /* [IN] File object */
-  UINT (*func)(const BYTE*,UINT), /* [IN] Data streaming function */
-  UINT btf,                       /* [IN] Number of bytes to forward */
-  UINT* bf                        /* [OUT] Number of bytes forwarded */
-);
-
-
- -
-

Parameters

-
-
fp
-
Pointer to the open file object.
-
func
-
Pointer to the user-defined data streaming function. For details, refer to the sample code.
-
btf
-
Number of bytes to forward in range of UINT.
-
bf
-
Pointer to the UINT variable to return number of bytes forwarded.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_OBJECT, -FR_TIMEOUT -

-
- - -
-

Description

-

The f_forward() function reads the data from the file and forward it to the outgoing stream without data buffer. This is suitable for small memory system because it does not require any data buffer at application module. The file pointer of the file object increases in number of bytes forwarded. In case of *bf is less than btf without error, it means the requested bytes could not be transferred due to end of file or stream goes busy during data transfer.

-
- - -
-

QuickInfo

-

Available when _USE_FORWARD == 1 and _FS_TINY == 1.

-
- - -
-

Example (Audio playback)

-
-/*------------------------------------------------------------------------*/
-/* Sample code of data transfer function to be called back from f_forward */
-/*------------------------------------------------------------------------*/
-
-UINT out_stream (   /* Returns number of bytes sent or stream status */
-    const BYTE *p,  /* Pointer to the data block to be sent */
-    UINT btf        /* >0: Transfer call (Number of bytes to be sent). 0: Sense call */
-)
-{
-    UINT cnt = 0;
-
-
-    if (btf == 0) {     /* Sense call */
-        /* Return stream status (0: Busy, 1: Ready) */
-        /* When once it returned ready to sense call, it must accept a byte at least */
-        /* at subsequent transfer call, or f_forward will fail with FR_INT_ERR. */
-        if (FIFO_READY) cnt = 1;
-    }
-    else {              /* Transfer call */
-        do {    /* Repeat while there is any data to be sent and the stream is ready */
-            FIFO_PORT = *p++;
-            cnt++;
-        } while (cnt < btf && FIFO_READY);
-    }
-
-    return cnt;
-}
-
-
-/*------------------------------------------------------------------------*/
-/* Sample code using f_forward function                                   */
-/*------------------------------------------------------------------------*/
-
-FRESULT play_file (
-    char *fn        /* Pointer to the audio file name to be played */
-)
-{
-    FRESULT rc;
-    FIL fil;
-    UINT dmy;
-
-    /* Open the audio file in read only mode */
-    rc = f_open(&fil, fn, FA_READ);
-    if (rc) return rc;
-
-    /* Repeat until the file pointer reaches end of the file */
-    while (rc == FR_OK && fil.fptr < fil.fsize) {
-
-        /* any other processes... */
-
-        /* Fill output stream periodicaly or on-demand */
-        rc = f_forward(&fil, out_stream, 1000, &dmy);
-    }
-
-    /* Close the file and return */
-    f_close(&fil);
-    return rc;
-}
-
-
- - -
-

See Also

-

f_open, fgets, f_write, f_close, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/getcwd.html b/stmhal/fatfs/doc/en/getcwd.html deleted file mode 100644 index df84287e3..000000000 --- a/stmhal/fatfs/doc/en/getcwd.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - -FatFs - f_getcwd - - - - -
-

f_getcwd

-

The f_getcwd function retrieves the current directory.

-
-FRESULT f_getcwd (
-  TCHAR* buff, /* [OUT] Buffer to return path name */
-  UINT len     /* [IN] The length of the buffer */
-);
-
-
- -
-

Parameters

-
-
buff
-
Pointer to the buffer to receive the current directory string.
-
len
-
Size of the buffer in unit of TCHAR.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT, -FR_NOT_ENOUGH_CORE -

-
- - -
-

Description

-

The f_getcwd() function retrieves full path name of the current directory of the current drive. When _VOLUMES is larger than 1, a logical drive number is added to top of the path name.

-
- - -
-

QuickInfo

-

Available when _FS_RPATH == 2.

-
- - -
-

See Also

-

f_chdrive, f_chdir

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/getfree.html b/stmhal/fatfs/doc/en/getfree.html deleted file mode 100644 index 060b2683d..000000000 --- a/stmhal/fatfs/doc/en/getfree.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - -FatFs - f_getfree - - - - -
-

f_getfree

-

The f_getfree function gets number of the free clusters.

-
-FRESULT f_getfree (
-  const TCHAR* path,  /* [IN] Logical drive number */
-  DWORD* nclst,       /* [OUT] Number of free clusters */
-  FATFS** fatfs       /* [OUT] Corresponding file system object */
-);
-
-
- -
-

Parameters

-
-
path
-
Pinter to the null-terminated string that specifies the logical drive. A null-string means the default drive.
-
nclst
-
Pointer to the DWORD variable to store number of free clusters.
-
fatfs
-
Pointer to pointer that to store a pointer to the corresponding file system object.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT -

-
- - -
-

Descriptions

-

The f_getfree() function gets number of free clusters on the volume. The member csize in the file system object indicates number of sectors per cluster, so that the free space in unit of sector can be calcurated with this information. When FSINFO structure on the FAT32 volume is not in sync, this function can return an incorrect free cluster count. To avoid this problem, FatFs can be forced full FAT scan by _FS_NOFSINFO option.

-
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0 and _FS_MINIMIZE == 0.

-
- - -
-

Example

-
-    FATFS *fs;
-    DWORD fre_clust, fre_sect, tot_sect;
-
-
-    /* Get volume information and free clusters of drive 1 */
-    res = f_getfree("1:", &fre_clust, &fs);
-    if (res) die(res);
-
-    /* Get total sectors and free sectors */
-    tot_sect = (fs->n_fatent - 2) * fs->csize;
-    fre_sect = fre_clust * fs->csize;
-
-    /* Print the free space (assuming 512 bytes/sector) */
-    printf("%10lu KiB total drive space.\n%10lu KiB available.\n",
-           tot_sect / 2, fre_sect / 2);
-
-
- - -
-

See Also

-

FATFS

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/getlabel.html b/stmhal/fatfs/doc/en/getlabel.html deleted file mode 100644 index 5db579adc..000000000 --- a/stmhal/fatfs/doc/en/getlabel.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - -FatFs - f_getlabel - - - - -
-

f_getlabel

-

The f_getlabel function returns volume label and volume serial number of a drive.

-
-FRESULT f_getlabel (
-  const TCHAR* path,  /* [IN] Drive number */
-  TCHAR* buff,        /* [OUT] Volume label */
-  DWORD* sn           /* [OUT] Volume serial number */
-);
-
-
- -
-

Parameters

-
-
path
-
Pointer to the null-terminated string that specifies the logical drive. Null-string specifies the default drive.
-
buff
-
Pointer to the buffer to store the volume label. The buffer size must be at least 12 items. If the volume has no label, a null-string will be returned. Set null pointer if this information is not needed.
-
sn
-
Pointer to the DWORD variable to store the volume serial number. Set null pointer if this information is not needed.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT -

-
- - -
-

QuickInfo

-

Available when _USE_LABEL == 1.

-
- - -
-

Example

-
-    char str[12];
-
-    /* Get volume label of the default drive */
-    f_getlabel("", str, 0);
-
-    /* Get volume label of the drive 2 */
-    f_getlabel("2:", str, 0);
-
-
- - -
-

See Also

-f_setlabel -
- - -

Return

- - diff --git a/stmhal/fatfs/doc/en/gets.html b/stmhal/fatfs/doc/en/gets.html deleted file mode 100644 index c84395237..000000000 --- a/stmhal/fatfs/doc/en/gets.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - -FatFs - f_gets - - - - -
-

f_gets

-

The f_gets reads a string from the file.

-
-TCHAR* f_gets (
-  TCHAR* buff, /* [OUT] Read buffer */
-  int len,     /* [IN] Size of the read buffer */
-  FIL* fp      /* [IN] File object */
-);
-
-
- -
-

Parameters

-
-
buff
-
Pointer to read buffer to store the read string.
-
len
-
Size of the read buffer in unit of character.
-
fp
-
Pointer to the open file object structure.
-
-
- - -
-

Return Values

-

When the function succeeded, buff will be returuned.

-
- - -
-

Description

-

The f_gets() function is a wrapper function of f_read() function. The read operation continues until a '\n' is stored, reached end of the file or the buffer is filled with len - 1 characters. The read string is terminated with a '\0'. When no character to read or any error occured during read operation, it returns a null pointer. The status of EOF and error can be examined with f_eof() and f_error() macros.

-

When FatFs is configured to Unicode API (_LFN_UNICODE == 1), data types on the srting fuctions, f_putc(), f_puts(), f_printf() and f_gets(), is also switched to Unicode. The character encoding on the file to be read/written via those functions is selected by _STRF_ENCODE option.

-
- - -
-

QuickInfo

-

Available when _USE_STRFUNC is 1 or 2. When it is set to 2, '\r's contained in the file are stripped out.

-
- - -
-

See Also

-

f_open, f_read, f_putc, f_puts, f_printf, f_close, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/lseek.html b/stmhal/fatfs/doc/en/lseek.html deleted file mode 100644 index 2fbece2d3..000000000 --- a/stmhal/fatfs/doc/en/lseek.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - -FatFs - f_lseek - - - - -
-

f_lseek

-

The f_lseek function moves the file read/write pointer of an open file object. It can also be used to expand the file size (cluster pre-allocation).

- -
-FRESULT f_lseek (
-  FIL* fp,   /* [IN] File object */
-  DWORD ofs  /* [IN] File read/write pointer */
-);
-
-
- -
-

Parameters

-
-
fp
-
Pointer to the open file object.
-
ofs
-
Byte offset from top of the file.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_OBJECT, -FR_TIMEOUT -

-
- - -
-

Description

-

The f_lseek() function moves the file read/write pointer of an open file. The offset can be specified in only origin from top of the file. When an offset beyond the file size is specified in write mode, the file size is expanded to the specified offset. The file data in the expanded area is undefined because no data is written to the file. This is suitable to pre-allocate a cluster chain quickly, for fast write operation. After the f_lseek() function succeeded, the current read/write pointer should be checked in order to make sure the read/write pointer has been moved correctry. In case of the current read/write pointer is not the expected value, either of followings has been occured.

- -

Fast seek feature is enabled when _USE_FASTSEEK is set to 1 and the member cltbl in the file object is not NULL. This feature enables fast backward/long seek operations without FAT access by using cluster link map table (CLMT). It is also applied to f_read()/f_write() function. In this mode, the file cannot be expanded by f_write()/f_lseek() function.

-

The CLMT must be created in the user defined DWORD array prior to use the fast seek feature. To create the CLMT, set address of the DWORD array to the member cltbl in the file object, set the array size in unit of items into the first item and call the f_lseek() function with ofs = CREATE_LINKMAP. After the function succeeded and CLMT is created, no FAT access is occured in subsequent f_read()/f_write()/f_lseek() function to the file. If the function failed with FR_NOT_ENOUGH_CORE, the given array size is insufficient for the file and number of items required is returned into the first item of the array. The required array size is (number of fragments + 1) * 2 items. For example, when the file is fragmented in 5, 12 items will be required for the CLMT.

-
- - -
-

QuickInfo

-

Available when _FS_MINIMIZE <= 2.

-
- - -
-

Example

-
-    /* Open file */
-    fp = malloc(sizeof (FIL));
-    res = f_open(fp, "file.dat", FA_READ|FA_WRITE);
-    if (res) ...
-
-    /* Move to offset of 5000 from top of the file */
-    res = f_lseek(fp, 5000);
-
-    /* Move to end of the file to append data */
-    res = f_lseek(fp, f_size(fp));
-
-    /* Forward 3000 bytes */
-    res = f_lseek(fp, f_tell(fp) + 3000);
-
-    /* Rewind 2000 bytes (take care on wraparound) */
-    res = f_lseek(fp, f_tell(fp) - 2000);
-
-
-/* Cluster pre-allocation (to prevent buffer overrun on streaming write) */
-
-    res = f_open(fp, recfile, FA_CREATE_NEW | FA_WRITE);   /* Create a file */
-
-    res = f_lseek(fp, PRE_SIZE);             /* Expand file size (cluster pre-allocation) */
-    if (res || f_tell(fp) != PRE_SIZE) ...   /* Check if the file has been expanded */
-
-    res = f_lseek(fp, DATA_START);           /* Record data stream WITHOUT cluster allocation delay */
-    ...                                      /* DATA_START and write block size should be aligned to sector boundary */
-
-    res = f_truncate(fp);                    /* Truncate unused area */
-    res = f_lseek(fp, 0);                    /* Put file header */
-    ...
-
-    res = f_close(fp);
-
-
-/* Using fast seek feature */
-
-    DWORD clmt[SZ_TBL];                    /* Cluster link map table buffer */
-
-    res = f_lseek(fp, ofs1);               /* This is normal seek (cltbl member is nulled on file open) */
-
-    fp->cltbl = clmt;                      /* Enable fast seek feature */
-    clmt[0] = SZ_TBL;                      /* Set table size */
-    res = f_lseek(fp, CREATE_LINKMAP);     /* Create CLMT */
-    ...
-
-    res = f_lseek(fp, ofs2);               /* This is fast seek */
-
-
- - -
-

See Also

-

f_open, f_truncate, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/mkdir.html b/stmhal/fatfs/doc/en/mkdir.html deleted file mode 100644 index c2c1f4db5..000000000 --- a/stmhal/fatfs/doc/en/mkdir.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - -FatFs - f_mkdir - - - - -
-

f_mkdir

-

The f_mkdir function creates a new directory.

-
-FRESULT f_mkdir (
-  const TCHAR* path /* [IN] Directory name */
-);
-
-
- -
-

Parameter

-
-
path
-
Pointer to the null-terminated string that specifies the directory name to create.
-
-
- - -
-

Return Value

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NO_PATH, -FR_INVALID_NAME, -FR_DENIED, -FR_EXIST, -FR_WRITE_PROTECTED, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT, -FR_NOT_ENOUGH_CORE -

-
- - -
-

Description

-

This function creates a new directory.

-
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0 and _FS_MINIMIZE == 0.

-
- - -
-

Example

-
-    res = f_mkdir("sub1");
-    if (res) die(res);
-    res = f_mkdir("sub1/sub2");
-    if (res) die(res);
-    res = f_mkdir("sub1/sub2/sub3");
-    if (res) die(res);
-
-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/mkfs.html b/stmhal/fatfs/doc/en/mkfs.html deleted file mode 100644 index 573bdd790..000000000 --- a/stmhal/fatfs/doc/en/mkfs.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - -FatFs - f_mkfs - - - - -
-

f_mkfs

-

The f_mkfs fucntion creates an FAT file system on the logical drive.

-
-FRESULT f_mkfs (
-  const TCHAR* path,  /* [IN] Logical drive number */
-  BYTE  sfd,          /* [IN] Partitioning rule */
-  UINT  au            /* [IN] Size of the allocation unit */
-);
-
-
- -
-

Parameters

-
-
path
-
Pinter to the null-terminated string that specifies the logical drive to be formatted. If there is no drive number, it means the default drive.
-
sfd
-
Specifies partitioning rule (FDISK(0) or SFD(1)). This argument will be ignored on some case.
-
au
-
Specifies size of the allocation unit (cluter) in unit of byte. The value must be sector size * n (n is 1 to 128 and power of 2). When a zero is given, the cluster size is determined depends on the volume size.
-
-
- -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_NOT_READY, -FR_WRITE_PROTECTED, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_MKFS_ABORTED, -FR_INVALID_PARAMETER -

-
- -
-

Description

-

The f_mkfs() function creates an FAT volume on the logical drive. When FDISK format is specified, a primary partition occupies the entire disk space is created and then an FAT volume is created on the partition. When SFD format is specified, the FAT volume starts from the first sector of the physical drive.

-

If the logical drive has been bound to any partition (1-4) by multiple partition feature (_MULTI_PARTITION), the FAT volume is created into the specified partition. In this case, the second argument sfd is ignored. The physical drive must have been partitioned with f_fdisk() function or any other partitioning tool prior to use this function.

-

Note that there are two partitioning rules, FDISK and SFD. The FDISK partitioning is usually used for harddisk, MMC, SDC, CFC and U Disk. It can divide a physical drive into one or more partitions with a partition table on the MBR. However Windows does not support multiple partition on the removable media. The SFD is non-partitioned method. The FAT volume starts from the first sector on the physical drive without partition table. It is usually used for floppy disk, Microdrive, optical disk and super-floppy media.

-

The FAT sub-type, FAT12/FAT16/FAT32, is determined by number of clusters on the volume and nothing else, according to the FAT specification issued by Microsoft. Thus which FAT sub-type is selected, is depends on the volume size and the specified cluster size. The cluster size affects performance of the file system and large cluster increases the performance.

-

When the number of clusters gets near the FAT sub-type boundaries, the function can fail with FR_MKFS_ABORTED.

-
- -
-

QuickInfo

-

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

-
- -
-

See Also

-

Volume management, f_fdisk

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/mount.html b/stmhal/fatfs/doc/en/mount.html deleted file mode 100644 index 5fc1eb647..000000000 --- a/stmhal/fatfs/doc/en/mount.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - -FatFs - f_mount - - - - -
-

f_mount

-

The f_mount fucntion registers/unregisters file system object (work area) to the FatFs module.

-
-FRESULT f_mount (
-  FATFS*       fatfs, /* [IN] File system object */
-  const TCHAR* path,  /* [IN] Logical drive number */
-  BYTE         opt    /* [IN] Initialization option */
-);
-
-
- -
-

Parameters

-
-
fatfs
-
Pointer to the file system object to be registered. Null pointer unregisters the registered file system object.
-
path
-
Pointer to the null-terminated string that specifies the logical drive. If there is no drive number, it means the default drive.
-
opt
-
Initialization option. 0: Do not mount now (to be mounted later), 1: Force mounted the volume to check if the volume is available.
-
-
- -
-

Return Values

-

-FR_OK, -FR_INVALID_DRIVE, -FR_DISK_ERR, -FR_NOT_READY, -FR_NO_FILESYSTEM -

-
- - -
-

Description

-

The f_mount() function registers/unregisters a file system object used for the logical drive to the FatFs module as follows:

-
    -
  1. Determines the logical drive which specified by path.
  2. -
  3. Clears and unregisters the regsitered work area of the drive.
  4. -
  5. Clears and registers the work area to the drive if fatfs is not NULL.
  6. -
  7. Performs volume mount process to the drive if forced mount is specified.
  8. -
-

The file system object is the work area needed for each logical drive. It must be given to the logical drive with this function prior to use any other file functions. To unregister a work area, specify a NULL to the fatfs, and then the work area can be discarded.

-

If forced mount is not specified, this function always succeeds regardless of the physical drive status due to delayed mount feature. It only clears (de-initializes) the given work area and registers its address to the internal table. No activity of the physical drive in this function. It can also be used to force de-initialized the registered work area of a logical drive. The volume mount processes, initialize the corresponding physical drive, find the FAT volume in it and initialize the work area, is performed in the subsequent file access functions when either or both of following condition is true.

- -

If the function with forced mount failed, it means that the file system object is registered but the volume is currently not available. Mount process will also be attempted in subsequent file access functions.

-

If implementation of the disk I/O layer lacks media change detection, application program needs to perform a f_mount() after media change to force cleared the file system object.

-
- - -
-

QuickInfo

-

Always available.

-
- - -
-

See Also

-

f_open, FATFS

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/open.html b/stmhal/fatfs/doc/en/open.html deleted file mode 100644 index c46aeb52a..000000000 --- a/stmhal/fatfs/doc/en/open.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - -FatFs - f_open - - - - -
-

f_open

-

The f_open function creates a file object to be used to access the file.

-
-FRESULT f_open (
-  FIL* fp,           /* [OUT] Pointer to the file object structure */
-  const TCHAR* path, /* [IN] File name */
-  BYTE mode          /* [IN] Mode flags */
-);
-
-
- -
-

Parameters

-
-
fp
-
Pointer to the blank file object structure to be created.
-
path
-
Pointer to a null-terminated string that specifies the file name to create or open.
-
mode
-
Specifies the type of access and open method for the file. It is specified by a combination of following flags.
- - - - - - - - -
ValueDescription
FA_READSpecifies read access to the object. Data can be read from the file. Combine with FA_WRITE for read-write access.
FA_WRITESpecifies write access to the object. Data can be written to the file. Combine with FA_READ for read-write access.
FA_OPEN_EXISTINGOpens the file. The function fails if the file is not existing. (Default)
FA_OPEN_ALWAYSOpens the file if it is existing. If not, a new file is created.
-To append data to the file, use f_lseek() function after file open in this method.
FA_CREATE_NEWCreates a new file. The function fails with FR_EXIST if the file is existing.
FA_CREATE_ALWAYSCreates a new file. If the file is existing, it is truncated and overwritten.
-
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NO_FILE, -FR_NO_PATH, -FR_INVALID_NAME, -FR_DENIED, -FR_EXIST, -FR_INVALID_OBJECT, -FR_WRITE_PROTECTED, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT, -FR_LOCKED, -FR_NOT_ENOUGH_CORE, -FR_TOO_MANY_OPEN_FILES -

-
- - -
-

Description

-

After f_open() function succeeded, the file object is valid. The file object is used for subsequent read/write functions to identify the file. To close an open file, use f_close() function. If the file is modified and not closed properly, the file data will be collapted.

-

If duplicated file open is needed, read here carefully. However duplicated open of a file with write mode flag is always prohibited.

-

Before using any file function, a work area (file system object) must be registered to the logical drive with f_mount() function. All API functions except for f_fdisk() function can work after this procedure.

-
- - -
-

QuickInfo

-

Always available. The mode flags, FA_WRITE, FA_CREATE_ALWAYS, FA_CREATE_NEW and FA_OPEN_ALWAYS, are not available when _FS_READONLY == 1.

-
- - -
-

Example

-
-/* Read a text file and display it */
-
-FATFS FatFs;   /* Work area (file system object) for logical drive */
-
-int main (void)
-{
-    FIL fil;       /* File object */
-    char line[82]; /* Line buffer */
-    FRESULT fr;    /* FatFs return code */
-
-
-    /* Register work area to the default drive */
-    f_mount(&FatFs, "", 0);
-
-    /* Open a text file */
-    fr = f_open(&fil, "message.txt", FA_READ);
-    if (fr) return (int)fr;
-
-    /* Read all lines and display it */
-    while (f_gets(line, sizeof line, &fil))
-        printf(line);
-
-    /* Close the file */
-    f_close(&fil);
-
-    return 0;
-}
-
-
-/* Copy a file "file.bin" on the drive 1 to drive 0 */
-
-int main (void)
-{
-    FATFS fs[2];         /* Work area (file system object) for logical drives */
-    FIL fsrc, fdst;      /* File objects */
-    BYTE buffer[4096];   /* File copy buffer */
-    FRESULT fr;          /* FatFs function common result code */
-    UINT br, bw;         /* File read/write count */
-
-
-    /* Register work area for each logical drive */
-    f_mount(&fs[0], "0:", 0);
-    f_mount(&fs[1], "1:", 0);
-
-    /* Open source file on the drive 1 */
-    fr = f_open(&fsrc, "1:file.bin", FA_OPEN_EXISTING | FA_READ);
-    if (fr) return (int)fr;
-
-    /* Create destination file on the drive 0 */
-    fr = f_open(&fdst, "0:file.bin", FA_CREATE_ALWAYS | FA_WRITE);
-    if (fr) return (int)fr;
-
-    /* Copy source to destination */
-    for (;;) {
-        fr = f_read(&fsrc, buffer, sizeof buffer, &br);  /* Read a chunk of source file */
-        if (fr || br == 0) break; /* error or eof */
-        fr = f_write(&fdst, buffer, br, &bw);            /* Write it to the destination file */
-        if (fr || bw < br) break; /* error or disk full */
-    }
-
-    /* Close open files */
-    f_close(&fsrc);
-    f_close(&fdst);
-
-    /* Unregister work area prior to discard it */
-    f_mount(NULL, "0:", 0);
-    f_mount(NULL, "1:", 0);
-
-    return (int)fr;
-}
-
-
- - -
-

See Also

-

f_read, f_write, f_close, FIL, FATFS

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/opendir.html b/stmhal/fatfs/doc/en/opendir.html deleted file mode 100644 index a673aaf3f..000000000 --- a/stmhal/fatfs/doc/en/opendir.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - -FatFs - f_opendir - - - - -
-

f_opendir

-

The f_opendir function opens a directory.

-
-FRESULT f_opendir (
-  DIR* dp,           /* [OUT] Pointer to the directory object structure */
-  const TCHAR* path  /* [IN] Directory name */
-);
-
-
- -
-

Parameters

-
-
dp
-
Pointer to the blank directory object to be created.
-
path
-
Pinter to the null-terminated string that specifies the directory name to be opened.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NO_PATH, -FR_INVALID_NAME, -FR_INVALID_OBJECT, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT, -FR_NOT_ENOUGH_CORE -

-
- - -
-

Description

-

The f_opendir() function opens an exsisting directory and creates the directory object for subsequent calls.

-
- - -
-

QuickInfo

-

Available when _FS_MINIMIZE <= 1.

-
- - -
-

See Also

-

f_readdir, f_closedir, DIR

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/printf.html b/stmhal/fatfs/doc/en/printf.html deleted file mode 100644 index c86e75c6b..000000000 --- a/stmhal/fatfs/doc/en/printf.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - -FatFs - f_printf - - - - -
-

f_printf

-

The f_printf function writes formatted string to the file.

-
-int f_printf (
-  FIL* fp,          /* [IN] File object */
-  const TCHAR* fmt, /* [IN] Format stirng */
-  ...
-);
-
-
- -
-

Parameters

-
-
fp
-
Pointer to the open file object structure.
-
fmt
-
Pointer to the null terminated format string.
-
...
-
Optional arguments.
- -
-
- - -
-

Return Values

-

When the function succeeded, it returns number of characters written. When the function failed due to disk full or any error, an EOF (-1) will be returned.

-
- - -
-

Description

-

The f_printf() is a wrapper function of f_write(). The format control directive is a sub-set of standard library shown as follos:

- -
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0 and _USE_STRFUNC is 1 or 2. When it is set to 2, '\n's contained in the output are converted to "\r\n".

-

When FatFs is configured to Unicode API (_LFN_UNICODE == 1), data types on the srting fuctions, f_putc(), f_puts(), f_printf() and f_gets(), is also switched to Unicode. The character encoding on the file to be read/written via those functions is selected by _STRF_ENCODE option.

-
- - -
-

Example

-
-    f_printf(&fil, "%d", 1234);            /* "1234" */
-    f_printf(&fil, "%6d,%3d%%", -200, 5);  /* "  -200,  5%" */
-    f_printf(&fil, "%-6u", 100);           /* "100   " */
-    f_printf(&fil, "%ld", 12345678L);      /* "12345678" */
-    f_printf(&fil, "%04x", 0xAB);          /* "00ab" */
-    f_printf(&fil, "%08LX", 0x123ABCL);    /* "00123ABC" */
-    f_printf(&fil, "%016b", 0x550F);       /* "0101010100001111" */
-    f_printf(&fil, "%s", "String");        /* "String" */
-    f_printf(&fil, "%5s", "abc");          /* "  abc" */
-    f_printf(&fil, "%-5s", "abc");         /* "abc  " */
-    f_printf(&fil, "%c", 'a');             /* "a" */
-    f_printf(&fil, "%f", 10.0);            /* f_printf lacks floating point support */
-
-
- - -
-

See Also

-

f_open, f_putc, f_puts, f_gets, f_close, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/putc.html b/stmhal/fatfs/doc/en/putc.html deleted file mode 100644 index d64e116f6..000000000 --- a/stmhal/fatfs/doc/en/putc.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_putc - - - - -
-

f_putc

-

The f_putc funciton puts a character to the file.

-
-int f_putc (
-  TCHAR chr,  /* [IN] A character to put */
-  FIL* fp     /* [IN] File object */
-);
-
-
- -
-

Parameters

-
-
chr
-
A character to be put.
-
fp
-
Pointer to the open file object structuer.
-
-
- - -
-

Return Values

-

When the character was written successfuly, it returns number of characters written. When the function failed due to disk full or any error, an EOF (-1) will be returned.

-

When FatFs is configured to Unicode API (_LFN_UNICODE == 1), character encoding on the string fuctions, f_putc(), f_puts(), f_printf() and f_gets(), is also switched to Unicode. The character encoding on the file to be read/written via those functions is selected by _STRF_ENCODE option.

-
- - -
-

Description

-

The f_putc() function is a wrapper function of f_write() function.

-
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0 and _USE_STRFUNC is 1 or 2. When it is set to 2, a '\n' is converted to "\r\n".

-
- - -
-

See Also

-

f_open, f_puts, f_printf, f_gets, f_close, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/puts.html b/stmhal/fatfs/doc/en/puts.html deleted file mode 100644 index 1f3a75149..000000000 --- a/stmhal/fatfs/doc/en/puts.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_puts - - - - -
-

f_puts

-

The f_puts function writes a string to the file.

-
-int f_puts (
-  const TCHAR* str, /* [IN] String */
-  FIL* fp           /* [IN] File object */
-);
-
-
- -
-

Parameters

-
-
str
-
Pointer to the null terminated string to be written. The null character will not be written.
-
fp
-
Pointer to the open file object structure.
-
-
- - -
-

Return Value

-

When the function succeeded, it returns number of characters written. When the write operation is aborted due to disk full or any error, an EOF (-1) will be returned.

-

When FatFs is configured to Unicode API (_LFN_UNICODE == 1), character encoding on the srting fuctions, f_putc(), f_puts(), f_printf() and f_gets(), is also switched to Unicode. The character encoding on the file to be read/written via those functions is selected by _STRF_ENCODE option.

-
- - -
-

Description

-

The f_puts() function is a wrapper function of f_write() function.

-
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0 and _USE_STRFUNC is 1 or 2. When it is set to 2, '\n's contained in the string are converted to "\r\n".

-
- - -
-

See Also

-

f_open, f_putc, f_printf, f_gets, f_close, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/rc.html b/stmhal/fatfs/doc/en/rc.html deleted file mode 100644 index 4fc119088..000000000 --- a/stmhal/fatfs/doc/en/rc.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - -FatFs - Return Codes - - - -

Return Code of the File Functions

-

On the FatFs API, most of file functions return common result code as enum type FRESULT. When a function succeeded, it returns zero, otherwise returns non-zero value that indicates type of error.

- -
-
FR_OK (0)
-
The function succeeded.
-
FR_DISK_ERR
-
An unrecoverable error occured in the lower layer, disk_read(), disk_write() or disk_ioctl() function.
-
FR_INT_ERR
-
Assertion failed. An insanity is detected in the internal process. One of the following possibilities are suspected. -
    -
  • There is any error of the FAT structure on the volume.
  • -
  • Work area (file system object, file object or etc...) is broken by stack overflow or any other application. This is the reason in most case.
  • -
  • An FR_DISK_ERR has occured on the file object.
  • -
-
-
FR_NOT_READY
-
The disk drive cannot work due to incorrect medium removal or disk_initialize() function failed.
-
FR_NO_FILE
-
Could not find the file.
-
FR_NO_PATH
-
Could not find the path.
-
FR_INVALID_NAME
-
The given string is invalid as the path name.
-
FR_DENIED
-
The required access was denied due to one of the following reasons: -
    -
  • Write mode open against the read-only file.
  • -
  • Deleting the read-only file or directory.
  • -
  • Deleting the non-empty directory or current directory.
  • -
  • Reading the file opened without FA_READ flag.
  • -
  • Any modification to the file opened without FA_WRITE flag.
  • -
  • Could not create the file or directory due to the directory table is full.
  • -
  • Could not create the directory due to the volume is full.
  • -
-
-
FR_EXIST
-
Any file or directory that has the same name is already existing.
-
FR_INVALID_OBJECT
-
The file/directory object is invalid or a null pointer is given.
-
FR_WRITE_PROTECTED
-
Any write mode action against the write-protected media.
-
FR_INVALID_DRIVE
-
Invalid drive number is specified in the path name. (Related option: _VOLUMES)
-
FR_NOT_ENABLED
-
Work area for the logical drive has not been registered by f_mount() function.
-
FR_NO_FILESYSTEM
-
There is no valid FAT volume on the drive.
-
FR_MKFS_ABORTED
-
The f_mkfs() function aborted before start in format due to a reason as follows: -
    -
  • The disk size is too small.
  • -
  • Not allowable cluster size for this disk. This can occure when number of clusters gets near the 0xFF7 and 0xFFF7.
  • -
  • There is no partition related to the logical drive. (Related option: _MULTI_PARTITION)
  • -
-
-
FR_TIMEOUT
-
The function canceled due to a timeout of thread-safe control. (Related option: _TIMEOUT)
-
FR_LOCKED
-
The file access is rejected by file sharing control. (Related option: _FS_LOCK)
-
FR_NOT_ENOUGH_CORE
-
Not enough memory for the operation. There is one of the following reasons: -
    -
  • Could not allocate a memory for LFN working buffer. (Related option: _USE_LFN)
  • -
  • Given CLMT is insufficient size for the required size.
  • -
-
-
FR_TOO_MANY_OPEN_FILES
-
Number of open files has been reached maximum value and no more file can be opened. (Related option: _FS_LOCK)
-
FR_INVALID_PARAMETER
-
The given parameter is invalid or there is any inconsistent.
-
- - - diff --git a/stmhal/fatfs/doc/en/read.html b/stmhal/fatfs/doc/en/read.html deleted file mode 100644 index 5acf85a8b..000000000 --- a/stmhal/fatfs/doc/en/read.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - -FatFs - f_read - - - - -
-

f_read

-

The f_read function reads data from a file.

-
-FRESULT f_read (
-  FIL* fp,     /* [IN] File object */
-  void* buff,  /* [OUT] Buffer to store read data */
-  UINT btr,    /* [IN] Number of bytes to read */
-  UINT* br     /* [OUT] Number of bytes read */
-);
-
-
- -
-

Parameters

-
-
fp
-
Pointer to the open file object.
-
buff
-
Pointer to the buffer to store read data
-
btr
-
Number of bytes to read in range of UINT type.
-
br
-
Pointer to the UINT variable to return number of bytes read. The value is always valid after the function call regardless of the result.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_OBJECT, -FR_TIMEOUT -

-
- - -
-

Description

-

The file read/write pointer of the file object advances number of bytes read. After the function succeeded, *br should be checked to detect the end of file. In case of *br is less than btr, it means the read/write pointer reached end of the file during read operation.

-
- - -
-

QuickInfo

-

Always available.

-
- - -
-

See Also

-

f_open, fgets, f_write, f_close, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/readdir.html b/stmhal/fatfs/doc/en/readdir.html deleted file mode 100644 index 51c494e3f..000000000 --- a/stmhal/fatfs/doc/en/readdir.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - -FatFs - f_readdir - - - - -
-

f_readdir

-

The f_readdir function reads directory entries.

-
-FRESULT f_readdir (
-  DIR* dp,      /* [IN] Directory object */
-  FILINFO* fno  /* [OUT] File information structure */
-);
-
-
- -
-

Parameters

-
-
dp
-
Pointer to the open directory object.
-
fno
-
Pointer to the file information structure to store the read item.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_OBJECT, -FR_TIMEOUT, -FR_NOT_ENOUGH_CORE -

-
- - -
-

Description

-

The f_readdir() function reads directory items, file and directory, in sequence. All items in the directory can be read by calling f_readdir() function repeatedly. When relative path feature is enabled (_FS_RPATH >= 1), dot entries ("." and "..") are not filtered out and they will appear in the read items. When all directory items have been read and no item to read, a null string is returned into the fname[] without any error. When a null pointer is given to the fno, the read index of the directory object is rewinded.

-

When LFN feature is enabled, lfname and lfsize in the file information structure must be initialized with valid value prior to use it. The lfname is a pointer to the LFN read buffer. The lfsize is size of the LFN read buffer in unit of TCHAR. If the LFN is not needed, set a null pointer to the lfname and the LFN is not returned. A null string will be returned into the LFN read buffer in case of following conditions.

- -

When the directory item has no LFN information, lower case characters can be contained in the fname[].

-
- - -
-

QuickInfo

-

Available when _FS_MINIMIZE <= 1.

-
- - -
-

Sample Code

-
-FRESULT scan_files (
-    char* path        /* Start node to be scanned (also used as work area) */
-)
-{
-    FRESULT res;
-    FILINFO fno;
-    DIR dir;
-    int i;
-    char *fn;   /* This function is assuming non-Unicode cfg. */
-#if _USE_LFN
-    static char lfn[_MAX_LFN + 1];   /* Buffer to store the LFN */
-    fno.lfname = lfn;
-    fno.lfsize = sizeof lfn;
-#endif
-
-
-    res = f_opendir(&dir, path);                       /* Open the directory */
-    if (res == FR_OK) {
-        i = strlen(path);
-        for (;;) {
-            res = f_readdir(&dir, &fno);                   /* Read a directory item */
-            if (res != FR_OK || fno.fname[0] == 0) break;  /* Break on error or end of dir */
-            if (fno.fname[0] == '.') continue;             /* Ignore dot entry */
-#if _USE_LFN
-            fn = *fno.lfname ? fno.lfname : fno.fname;
-#else
-            fn = fno.fname;
-#endif
-            if (fno.fattrib & AM_DIR) {                    /* It is a directory */
-                sprintf(&path[i], "/%s", fn);
-                res = scan_files(path);
-                if (res != FR_OK) break;
-                path[i] = 0;
-            } else {                                       /* It is a file. */
-                printf("%s/%s\n", path, fn);
-            }
-        }
-        f_closedir(&dir)
-    }
-
-    return res;
-}
-
-
- - -
-

See Also

-

f_opendir, f_closedir, f_stat, FILINFO, DIR

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/rename.html b/stmhal/fatfs/doc/en/rename.html deleted file mode 100644 index 17dd04795..000000000 --- a/stmhal/fatfs/doc/en/rename.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - -FatFs - f_rename - - - - -
-

f_rename

-

Renames a file or sub-directory.

-
-FRESULT f_rename (
-  const TCHAR* old_name, /* [IN] Old object name */
-  const TCHAR* new_name  /* [IN] New object name */
-);
-
-
- -
-

Parameters

-
-
old_name
-
Pointer to a null-terminated string that specifies the old object name to be renamed.
-
new_name
-
Pointer to a null-terminated string tha specifies the new object name without drive number.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NO_FILE, -FR_NO_PATH, -FR_INVALID_NAME, -FR_DENIED, -FR_EXIST, -FR_WRITE_PROTECTED, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT, -FR_LOCKED, -FR_NOT_ENOUGH_CORE -

-
- - -
-

Description

-

Renames a file or sub-directory and can also move it to other directory. The logical drive number is determined by old name, new name must not contain a logical drive number. Do not rename open objects or directry table can be collapted.

-
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0 and _FS_MINIMIZE == 0.

-
- - -
-

Example

-
-    /* Rename an object */
-    f_rename("oldname.txt", "newname.txt");
-
-    /* Rename and move an object to other directory */
-    f_rename("oldname.txt", "dir1/newname.txt");
-
-
- - -

Return

- - diff --git a/stmhal/fatfs/doc/en/sdir.html b/stmhal/fatfs/doc/en/sdir.html deleted file mode 100644 index 2785b0d3c..000000000 --- a/stmhal/fatfs/doc/en/sdir.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - -FatFs - DIR - - - - -
-

DIR

-

The DIR structure is used for the work area to read a directory by f_oepndir()/f_readdir() function. Application program must not modify any member in this structure.

-
-typedef struct {
-    FATFS*  fs;         /* Pointer to the owner file system object */
-    WORD    id;         /* Owner file system mount ID */
-    WORD    index;      /* Index of directory entry to start to search next */
-    DWORD   sclust;     /* Table start cluster (0:Root directory) */
-    DWORD   clust;      /* Current cluster */
-    DWORD   sect;       /* Current sector */
-    BYTE*   dir;        /* Pointer to the current SFN entry in the win[] */
-    BYTE*   fn;         /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */
-#if _FS_LOCK
-    UINT    lockid;     /* Sub-directory lock ID (0:Root directory) */
-#endif
-#if _USE_LFN
-    WCHAR*  lfn;        /* Pointer to the LFN working buffer */
-    WORD    lfn_idx;    /* Index of top of last matched LFN entris (0xFFFF:No LFN) */
-#endif
-} DIR;
-
-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/setlabel.html b/stmhal/fatfs/doc/en/setlabel.html deleted file mode 100644 index f689717bb..000000000 --- a/stmhal/fatfs/doc/en/setlabel.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - -FatFs - f_setlabel - - - - -
-

f_setlabel

-

The f_setlabel function sets/removes the label of a volume.

-
-FRESULT f_setlabel (
-  const TCHAR* name  /* [IN] Volume label to be set */
-);
-
-
- -
-

Parameters

-
-
name
-
Pointer to the null-terminated string that specifies the volume label to be set.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_NAME, -FR_WRITE_PROTECTED, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT -

-
- - -
-

Description

-

When the string has a drive number, the volume label will be set to the volume specified by the drive number. If the volume label is a null-string, the volume label on the volume will be removed. The format of the volume label is similar to the SFN but there are some differences shown below:

- -
- -
-

QuickInfo

-

Available when _FS_READONLY == 0 and _USE_LABEL == 1.

-
- - -
-

Example

-
-    /* Set volume label to the default drive */
-    f_setlabel("DATA DISK");
-
-    /* Set volume label to the drive 2 */
-    f_setlabel("2:DISK 3 OF 4");
-
-    /* Remove volume label of the drive 2 */
-    f_setlabel("2:");
-
-
- - -
-

See Also

-f_getlabel -
- - -

Return

- - diff --git a/stmhal/fatfs/doc/en/sfatfs.html b/stmhal/fatfs/doc/en/sfatfs.html deleted file mode 100644 index c6307896a..000000000 --- a/stmhal/fatfs/doc/en/sfatfs.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - -FatFs - FATFS - - - - -
-

FATFS

-

The FATFS structure (file system object) holds dynamic work area of individual logical drives. It is given by application program and registerd/unregisterd to the FatFs module with f_mount() function. Initialization is done on first API call after f_mount() function or media change. Application program must not modify any member in this structure.

-
-typedef struct {
-    BYTE    fs_type;      /* FAT sub-type (0:Not mounted) */
-    BYTE    drv;          /* Physical drive number */
-    BYTE    csize;        /* Sectors per cluster (1,2,4,...,128) */
-    BYTE    n_fats;       /* Number of FAT copies (1,2) */
-    BYTE    wflag;        /* win[] flag (b0:win[] is dirty) */
-    BYTE    fsi_flag;     /* FSINFO flags (b7:Disabled, b0:Dirty) */
-    WORD    id;           /* File system mount ID */
-    WORD    n_rootdir;    /* Number of root directory entries (FAT12/16) */
-#if _MAX_SS != 512
-    WORD    ssize;        /* Sector size (512,1024,2048 or 4096) */
-#endif
-#if _FS_REENTRANT
-    _SYNC_t sobj;         /* Identifier of sync object */
-#endif
-#if !_FS_READONLY
-    DWORD   last_clust;   /* FSINFO: Last allocated cluster */
-    DWORD   free_clust;   /* FSINFO: Number of free clusters */
-#endif
-#if _FS_RPATH
-    DWORD   cdir;         /* Current directory start cluster (0:root) */
-#endif
-    DWORD   n_fatent;     /* Number of FAT entries (== Number of clusters + 2) */
-    DWORD   fsize;        /* Sectors per FAT */
-    DWORD   volbase;      /* Volume start sector */
-    DWORD   fatbase;      /* FAT area start sector */
-    DWORD   dirbase;      /* Root directory area start sector (FAT32: Cluster#) */
-    DWORD   database;     /* Data area start sector */
-    DWORD   winsect;      /* Current sector appearing in the win[] */
-    BYTE    win[_MAX_SS]; /* Disk access window for directory, FAT (and file data at tiny cfg) */
-} FATFS;
-
-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/sfile.html b/stmhal/fatfs/doc/en/sfile.html deleted file mode 100644 index e6edf702a..000000000 --- a/stmhal/fatfs/doc/en/sfile.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - -FatFs - FIL - - - - -
-

FIL

-

The FIL structure (file object) holds state of an open file. It is created by f_open() function and discarded by f_close() function. Application program must not modify any member in this structure except for cltbl. Note that a sector buffer is defined in this structure at non-tiny configuration, so that the FIL structures should not be defined as auto variable.

- -
-typedef struct {
-    FATFS*  fs;           /* Pointer to the owner file system object */
-    WORD    id;           /* Owner file system mount ID */
-    BYTE    flag;         /* File object status flags */
-    BYTE    err;          /* Abort flag (error code) */
-    DWORD   fptr;         /* File read/write pointer (Byte offset origin from top of the file) */
-    DWORD   fsize;        /* File size in unit of byte */
-    DWORD   sclust;       /* File start cluster */
-    DWORD   clust;        /* Current cluster */
-    DWORD   dsect;        /* Current data sector */
-#if !_FS_READONLY
-    DWORD   dir_sect;     /* Sector containing the directory entry */
-    BYTE*   dir_ptr;      /* Ponter to the directory entry in the window */
-#endif
-#if _USE_FASTSEEK
-    DWORD*  cltbl;        /* Pointer to the cluster link map table (Nulled on file open) */
-#endif
-#if _FS_LOCK
-    UINT    lockid;       /* Fle lock ID */
-#endif
-#if !_FS_TINY
-    BYTE    buf[_MAX_SS]; /* File private data transfer buffer */
-#endif
-} FIL;
-
- -
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/sfileinfo.html b/stmhal/fatfs/doc/en/sfileinfo.html deleted file mode 100644 index 7a16a4de3..000000000 --- a/stmhal/fatfs/doc/en/sfileinfo.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - -FatFs - FILINFO - - - - -
-

FILINFO

-

The FILINFO structure holds a file information returned by f_readdir() and f_stat() function.

-
-typedef struct {
-    DWORD fsize;      /* File size */
-    WORD  fdate;      /* Last modified date */
-    WORD  ftime;      /* Last modified time */
-    BYTE  fattrib;    /* Attribute */
-    TCHAR fname[13];  /* Short file name (8.3 format) */
-#if _USE_LFN
-    TCHAR* lfname;    /* Pointer to the LFN buffer */
-    int   lfsize;     /* Size of the LFN buffer in unit of TCHAR */
-#endif
-} FILINFO;
-
-
- -

Members

-
-
fsize
-
Indicates size of the file in unit of byte. Always zero for directories.
-
fdate
-
Indicates the date that the file was modified or the directory was created.
-
-
bit15:9
-
Year origin from 1980 (0..127)
-
bit8:5
-
Month (1..12)
-
bit4:0
-
Day (1..31)
-
-
-
ftime
-
Indicates the time that the file was modified or the directory was created.
-
-
bit15:11
-
Hour (0..23)
-
bit10:5
-
Minute (0..59)
-
bit4:0
-
Second / 2 (0..29)
-
-
-
fattrib
-
Indicates the file/directory attribute in combination of AM_DIR, AM_RDO, AM_HID, AM_SYS and AM_ARC.
-
fname[]
-
Indicates the file/directory name in 8.3 format null-terminated string. It is always returnd with upper case in non-LFN configuration but it can be returned with lower case in LFN configuration.
-
lfname
-
Pointer to the LFN buffer to store the read LFN. This member must be initialized by application prior to use this structure. Not available in non-LFN configuration.
-
lfsize
-
Size of the LFN buffer in unit of TCHAR. This member must be initialized by application prior to use this structure. Not available in non-LFN configuration.
-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/size.html b/stmhal/fatfs/doc/en/size.html deleted file mode 100644 index bb786c612..000000000 --- a/stmhal/fatfs/doc/en/size.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_size - - - - -
-

f_size

-

The f_size function gets the size of a file.

-
-DWORD f_size (
-  FIL* fp   /* [IN] File object */
-);
-
-
- - -
-

Parameters

-
-
fp
-
Pointer to the open file object structure.
-
-
- - -
-

Return Values

-

Returns the size of the file in unit of byte.

-
- - -
-

Description

-

In this revision, the f_size() function is implemented as a macro.

-
-#define f_size(fp) ((fp)->fsize)
-
-
- - -
-

QuickInfo

-

Always available.

-
- - -
-

See Also

-

f_open, f_lseek, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/stat.html b/stmhal/fatfs/doc/en/stat.html deleted file mode 100644 index 161b791e7..000000000 --- a/stmhal/fatfs/doc/en/stat.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - -FatFs - f_stat - - - - -
-

f_stat

-

The f_stat function checks the existence of a file or sub-directory.

-
-FRESULT f_stat (
-  const TCHAR* path,  /* [IN] Object name */
-  FILINFO* fno        /* [OUT] FILINFO structure */
-);
-
-
- -
-

Parameters

-
-
path
-
Pointer to the null-terminated string that specifies the object to get its information.
-
fno
-
Pointer to the blank FILINFO structure to store the information of the object. Set null pointer if it is not needed.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NO_FILE, -FR_NO_PATH, -FR_INVALID_NAME, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT, -FR_NOT_ENOUGH_CORE -

-
- - -
-

Description

-

The f_stat() function checks the existence of a file or sub-directory. If exist, the function returns with FR_OK and the information of the object is stored to the file information structure. If not exist, the function returns with FR_NO_FILE. For details, refer to the FILINFO structure and f_readdir() function.

-
- - -
-

QuickInfo

-

Available when _FS_MINIMIZE == 0.

-
- - -
-

References

-

f_opendir, f_readdir, FILINFO

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/sync.html b/stmhal/fatfs/doc/en/sync.html deleted file mode 100644 index 4c819b818..000000000 --- a/stmhal/fatfs/doc/en/sync.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - -FatFs - f_sync - - - - -
-

f_sync

-

The f_sync function flushes the cached information of a writing file.

-
-FRESULT f_sync (
-  FIL* fp     /* [IN] File object */
-);
-
-
- -
-

Parameter

-
-
fp
-
Pointer to the open file object to be flushed.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_OBJECT, -FR_TIMEOUT -

-
- - -
-

Description

-

The f_sync() function performs the same process as f_close() function but the file is left opened and can continue read/write/seek operations to the file. This is suitable for the applications that open files for a long time in write mode, such as data logger. Performing f_sync() function of periodic or immediataly after f_write() function can minimize the risk of data loss due to a sudden blackout or an unintentional media removal. For more information, refer to application note.

-

However the f_sync() function immediataly before f_close() function has no advantage because it performs f_sync() function in it. In other words, the differnce between those functions is that the file object is invalidated or not.

-
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0.

-
- - -
-

See Also

-

f_close

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/tell.html b/stmhal/fatfs/doc/en/tell.html deleted file mode 100644 index 93d03c915..000000000 --- a/stmhal/fatfs/doc/en/tell.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_tell - - - - -
-

f_tell

-

The f_tell function gets the current read/write pointer of a file.

-
-DWORD f_tell (
-  FIL* fp   /* [IN] File object */
-);
-
-
- - -
-

Parameters

-
-
fp
-
Pointer to the open file object structure.
-
-
- - -
-

Return Values

-

Returns current read/write pointer of the file.

-
- - -
-

Description

-

In this revision, the f_tell() function is implemented as a macro.

-
-#define f_tell(fp) ((fp)->fptr)
-
-
- - -
-

QuickInfo

-

Always available.

-
- - -
-

See Also

-

f_open, f_lseek, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/truncate.html b/stmhal/fatfs/doc/en/truncate.html deleted file mode 100644 index 7dc980d40..000000000 --- a/stmhal/fatfs/doc/en/truncate.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - -FatFs - f_truncate - - - - -
-

f_truncate

-

The f_truncate function truncates the file size.

-
-FRESULT f_truncate (
-  FIL* fp     /* [IN] File object */
-);
-
-
- -
-

Parameter

-
-
fp
-
Pointer to the open file object to be truncated.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_OBJECT, -FR_TIMEOUT -

-
- - -
-

Description

-

The f_truncate() function truncates the file size to the current file read/write pointer. This function has no effect if the file read/write pointer is already pointing end of the file.

-
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0 and _FS_MINIMIZE == 0.

-
- - -
-

See Also

-

f_open, f_lseek, FIL

-
- - -

Return

- - diff --git a/stmhal/fatfs/doc/en/unlink.html b/stmhal/fatfs/doc/en/unlink.html deleted file mode 100644 index 0e8519e97..000000000 --- a/stmhal/fatfs/doc/en/unlink.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - -FatFs - f_unlink - - - - -
-

f_unlink

-

The f_unlink function removes a file or sub-directory.

-
-FRESULT f_unlink (
-  const TCHAR* path  /* [IN] Object name */
-);
-
-
- -
-

Parameter

-
-
path
-
Pointer to the null-terminated string that specifies an object to be removed.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NO_FILE, -FR_NO_PATH, -FR_INVALID_NAME, -FR_DENIED, -FR_EXIST, -FR_WRITE_PROTECTED, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT, -FR_LOCKED, -FR_NOT_ENOUGH_CORE -

-
- - -
-

Description

-

-If condition of the object to be removed is applicable to the following terms, the function will be rejected.

-
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0 and _FS_MINIMIZE == 0.

-
- - -

Return

- - diff --git a/stmhal/fatfs/doc/en/utime.html b/stmhal/fatfs/doc/en/utime.html deleted file mode 100644 index 7466c19f7..000000000 --- a/stmhal/fatfs/doc/en/utime.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - -FatFs - f_utime - - - - -
-

f_utime

-

The f_utime function changes the timestamp of a file or sub-directory.

-
-FRESULT f_utime (
-  const TCHAR* path,  /* [IN] Object name */
-  const FILINFO* fno  /* [IN] Time and data to be set */
-);
-
-
- -
-

Parameters

-
-
path
-
Pointer to the null-terminated string that specifies an object to be changed.
-
fno
-
Pointer to the file information structure that has a timestamp to be set in member fdate and ftime. Do not care any other members.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NO_FILE, -FR_NO_PATH, -FR_INVALID_NAME, -FR_WRITE_PROTECTED, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT, -FR_NOT_ENOUGH_CORE -

-
- - -
-

Description

-

The f_utime() function changes the timestamp of a file or sub-directory

-
- - -
-

Example

-
-FRESULT set_timestamp (
-    char *obj,     /* Pointer to the file name */
-    int year,
-    int month,
-    int mday,
-    int hour,
-    int min,
-    int sec
-)
-{
-    FILINFO fno;
-
-    fno.fdate = (WORD)(((year - 1980) * 512U) | month * 32U | mday);
-    fno.ftime = (WORD)(hour * 2048U | min * 32U | sec / 2U);
-
-    return f_utime(obj, &fno);
-}
-
-
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0 and _FS_MINIMIZE == 0.

-
- - -
-

See Also

-

f_stat, FILINFO

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/en/write.html b/stmhal/fatfs/doc/en/write.html deleted file mode 100644 index 925fd5649..000000000 --- a/stmhal/fatfs/doc/en/write.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - -FatFs - f_write - - - - -
-

f_write

-

The f_write writes data to a file.

-
-FRESULT f_write (
-  FIL* fp,          /* [IN] Pointer to the file object structure */
-  const void* buff, /* [IN] Pointer to the data to be written */
-  UINT btw,         /* [IN] Number of bytes to write */
-  UINT* bw          /* [OUT] Pointer to the variable to return number of bytes written */
-);
-
-
- -
-

Parameters

-
-
fp
-
Pointer to the open file object structure.
-
buff
-
Pointer to the data to be written.
-
btw
-
Specifies number of bytes to write in range of UINT type.
-
bw
-
Pointer to the UINT variable to return the number of bytes written. The value is always valid after the function call regardless of the result.
-
-
- - -
-

Return Values

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_OBJECT, -FR_TIMEOUT -

-
- - -
-

Description

-

The read/write pointer of the file object advances number of bytes written. After the function succeeded, *bw should be checked to detect the disk full. In case of *bw is less than btw, it means the volume got full during the write operation. The function can take a time when the volume is full or close to full.

-
- - -
-

QuickInfo

-

Available when _FS_READONLY == 0.

-
- - -
-

See Also

-

f_open, f_read, fputc, fputs, fprintf, f_close, FIL

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/img/app1.c b/stmhal/fatfs/doc/img/app1.c deleted file mode 100644 index c7e690be3..000000000 --- a/stmhal/fatfs/doc/img/app1.c +++ /dev/null @@ -1,43 +0,0 @@ -/*------------------------------------------------------------/ -/ Open or create a file in append mode -/------------------------------------------------------------*/ - -FRESULT open_append ( - FIL* fp, /* [OUT] File object to create */ - const char* path /* [IN] File name to be opened */ -) -{ - FRESULT fr; - - /* Opens an existing file. If not exist, creates a new file. */ - fr = f_open(fp, path, FA_WRITE | FA_OPEN_ALWAYS); - if (fr == FR_OK) { - /* Seek to end of the file to append data */ - fr = f_lseek(fp, f_size(fp)); - if (fr != FR_OK) - f_close(fp); - } - return fr; -} - - -int main (void) -{ - FRESULT fr; - FATFS fs; - FIL fil; - - /* Open or create a log file and ready to append */ - f_mount(&fs, "", 0); - fr = open_append(&fil, "logfile.txt"); - if (fr != FR_OK) return 1; - - /* Append a line */ - f_printf(&fil, "%02u/%02u/%u, %2u:%02u\n", Mday, Mon, Year, Hour, Min); - - /* Close the file */ - f_close(&fil); - - return 0; -} - diff --git a/stmhal/fatfs/doc/img/app2.c b/stmhal/fatfs/doc/img/app2.c deleted file mode 100644 index 89e483199..000000000 --- a/stmhal/fatfs/doc/img/app2.c +++ /dev/null @@ -1,70 +0,0 @@ -/*------------------------------------------------------------/ -/ Remove all contents of a directory -/ This function works regardless of _FS_RPATH. -/------------------------------------------------------------*/ - - -FRESULT empty_directory ( - char* path /* Working buffer filled with start directory */ -) -{ - UINT i, j; - FRESULT fr; - DIR dir; - FILINFO fno; - -#if _USE_LFN - fno.lfname = 0; /* Eliminate LFN output */ -#endif - fr = f_opendir(&dir, path); - if (fr == FR_OK) { - for (i = 0; path[i]; i++) ; - path[i++] = '/'; - for (;;) { - fr = f_readdir(&dir, &fno); - if (fr != FR_OK || !fno.fname[0]) break; - if (fno.fname[0] == '.') continue; - j = 0; - do - path[i+j] = fno.fname[j]; - while (fno.fname[j++]); - if (fno.fattrib & AM_DIR) { - fr = empty_directory(path); - if (fr != FR_OK) break; - } - fr = f_unlink(path); - if (fr != FR_OK) break; - } - path[--i] = '\0'; - closedir(&dir); - } - - return fr; -} - - - -int main (void) -{ - FRESULT fr; - FATFS fs; - char buff[64]; /* Working buffer */ - - - - f_mount(&fs, "", 0); - - strcpy(buff, "/"); /* Directory to be emptied */ - fr = empty_directory(buff); - - if (fr) { - printf("Function failed. (%u)\n", fr); - return 1; - } else { - printf("All contents in the %s are successfully removed.\n", buff); - return 0; - } -} - - - diff --git a/stmhal/fatfs/doc/img/app3.c b/stmhal/fatfs/doc/img/app3.c deleted file mode 100644 index 196975db5..000000000 --- a/stmhal/fatfs/doc/img/app3.c +++ /dev/null @@ -1,106 +0,0 @@ -/*----------------------------------------------------------------------/ -/ Allocate a contiguous area to the file -/-----------------------------------------------------------------------/ -/ This function checks if the file is contiguous with desired size. -/ If not, a block of contiguous sectors is allocated to the file. -/ If the file has been opened without FA_WRITE flag, it only checks if -/ the file is contiguous and returns the resulut. */ - -#if _FATFS != 80960 /* Check if R0.10 */ -#error This function may not be compatible with this revision of FatFs module. -#endif - -/* Declarations of FatFs internal functions accessible from applications. -/ This is intended to be used for disk checking/fixing or dirty hacks :-) */ -DWORD clust2sect (FATFS* fs, DWORD clst); -DWORD get_fat (FATFS* fs, DWORD clst); -FRESULT put_fat (FATFS* fs, DWORD clst, DWORD val); - - -DWORD allocate_contiguous_clusters ( /* Returns the first sector in LBA (0:error or not contiguous) */ - FIL* fp, /* Pointer to the open file object */ - DWORD len /* Number of bytes to allocate */ -) -{ - DWORD csz, tcl, ncl, ccl, cl; - - - if (f_lseek(fp, 0) || !len) /* Check if the given parameters are valid */ - return 0; - csz = 512UL * fp->fs->csize; /* Cluster size in unit of byte (assuming 512 bytes/sector) */ - tcl = (len + csz - 1) / csz; /* Total number of clusters required */ - len = tcl * csz; /* Round-up file size to the cluster boundary */ - - /* Check if the existing cluster chain is contiguous */ - if (len == fp->fsize) { - ncl = 0; ccl = fp->sclust; - do { - cl = get_fat(fp->fs, ccl); /* Get the cluster status */ - if (cl + 1 < 3) return 0; /* Hard error? */ - if (cl != ccl + 1 &&; cl < fp->fs->n_fatent) break; /* Not contiguous? */ - ccl = cl; - } while (++ncl < tcl); - if (ncl == tcl) /* Is the file contiguous? */ - return clust2sect(fp->fs, fp->sclust); /* Return file start sector */ - } -#if _FS_READONLY - return 0; -#else - if (f_truncate(fp)) return 0; /* Remove the existing chain */ - - /* Find a free contiguous area */ - ccl = cl = 2; ncl = 0; - do { - if (cl >= fp->fs->n_fatent) return 0; /* No contiguous area is found. */ - if (get_fat(fp->fs, cl)) { /* Encounterd a cluster in use */ - do { /* Skip the block of used clusters */ - cl++; - if (cl >= fp->fs->n_fatent) return 0; /* No contiguous area is found. */ - } while (get_fat(fp->fs, cl)); - ccl = cl; ncl = 0; - } - cl++; ncl++; - } while (ncl < tcl); - - /* Create a contiguous cluster chain */ - fp->fs->last_clust = ccl - 1; - if (f_lseek(fp, len)) return 0; - - return clust2sect(fp->fs, fp->sclust); /* Return file start sector */ -#endif -} - - -int main (void) -{ - FRESULT fr; - DRESULT dr; - FATFS fs; - FIL fil; - DWORD org; - - - /* Open or create a file */ - f_mount(&fs, "", 0); - fr = f_open(&fil, "swapfile.sys", FA_READ | FA_WRITE | FA_OPEN_ALWAYS); - if (fr) return 1; - - /* Check if the file is 64MB in size and occupies a contiguous area. - / If not, a contiguous area will be re-allocated to the file. */ - org = allocate_contiguous_clusters(&fil, 0x4000000); - if (!org) { - printf("Function failed due to any error or insufficient contiguous area.\n"); - f_close(&fil); - return 1; - } - - /* Now you can read/write the file with disk functions bypassing the file system layer. */ - - dr = disk_write(fil.fs->drv, Buff, org, 1024); /* Write 512Ki bytes from top of the file */ - - ... - - f_close(&fil); - return 0; -} - diff --git a/stmhal/fatfs/doc/img/f1.png b/stmhal/fatfs/doc/img/f1.png deleted file mode 100644 index 5191700fd..000000000 Binary files a/stmhal/fatfs/doc/img/f1.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/f2.png b/stmhal/fatfs/doc/img/f2.png deleted file mode 100644 index 8ef0ec241..000000000 Binary files a/stmhal/fatfs/doc/img/f2.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/f3.png b/stmhal/fatfs/doc/img/f3.png deleted file mode 100644 index 9111bfc97..000000000 Binary files a/stmhal/fatfs/doc/img/f3.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/f4.png b/stmhal/fatfs/doc/img/f4.png deleted file mode 100644 index f9a6b4648..000000000 Binary files a/stmhal/fatfs/doc/img/f4.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/f5.png b/stmhal/fatfs/doc/img/f5.png deleted file mode 100644 index b110b291e..000000000 Binary files a/stmhal/fatfs/doc/img/f5.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/f6.png b/stmhal/fatfs/doc/img/f6.png deleted file mode 100644 index a7b0d71ed..000000000 Binary files a/stmhal/fatfs/doc/img/f6.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/f7.png b/stmhal/fatfs/doc/img/f7.png deleted file mode 100644 index 392e8b892..000000000 Binary files a/stmhal/fatfs/doc/img/f7.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/layers.png b/stmhal/fatfs/doc/img/layers.png deleted file mode 100644 index d485d6b60..000000000 Binary files a/stmhal/fatfs/doc/img/layers.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/layers3.png b/stmhal/fatfs/doc/img/layers3.png deleted file mode 100644 index ac439b0b1..000000000 Binary files a/stmhal/fatfs/doc/img/layers3.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/modules.png b/stmhal/fatfs/doc/img/modules.png deleted file mode 100644 index e6be553ba..000000000 Binary files a/stmhal/fatfs/doc/img/modules.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/rwtest.png b/stmhal/fatfs/doc/img/rwtest.png deleted file mode 100644 index a34bf0621..000000000 Binary files a/stmhal/fatfs/doc/img/rwtest.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/rwtest2.png b/stmhal/fatfs/doc/img/rwtest2.png deleted file mode 100644 index 41a8c1f55..000000000 Binary files a/stmhal/fatfs/doc/img/rwtest2.png and /dev/null differ diff --git a/stmhal/fatfs/doc/img/rwtest3.png b/stmhal/fatfs/doc/img/rwtest3.png deleted file mode 100644 index cbaa3d118..000000000 Binary files a/stmhal/fatfs/doc/img/rwtest3.png and /dev/null differ diff --git a/stmhal/fatfs/doc/ja/appnote.html b/stmhal/fatfs/doc/ja/appnote.html deleted file mode 100644 index e05863f68..000000000 --- a/stmhal/fatfs/doc/ja/appnote.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - - -FatFs繝「繧ク繝・繝シ繝ォ 繧「繝励Μ繧ア繝シ繧キ繝ァ繝ウ繝サ繝弱シ繝 - - - -

FatFs繝「繧ク繝・繝シ繝ォ 繧「繝励Μ繧ア繝シ繧キ繝ァ繝ウ繝サ繝弱シ繝

-
    -
  1. 繝昴シ繝繧」繝ウ繧ー縺ョ髫帙↓驟肴ョ縺吶∋縺阪%縺ィ
  2. -
  3. 髯千阜蛟、
  4. -
  5. 繝。繝「繝ェ菴ソ逕ィ驥
  6. -
  7. 繝「繧ク繝・繝シ繝ォ繝サ繧オ繧、繧コ縺ョ邵ョ蟆
  8. -
  9. 髟キ縺繝輔ぃ繧、繝ォ蜷
  10. -
  11. 譌・譛ャ隱槭ヵ繧。繧、繝ォ蜷阪ョ螟ァ譁蟄怜、画鋤
  12. -
  13. Unicode蜈・蜃コ蜉帙∈縺ョ蟇セ蠢
  14. -
  15. 繝ェ繧ィ繝ウ繝医Λ繝ウ繧キ繝シ
  16. -
  17. 螟夐阪ヵ繧。繧、繝ォ繝サ繧「繧ッ繧サ繧ケ
  18. -
  19. 蜉ケ邇逧縺ェ繝輔ぃ繧、繝ォ繝サ繧「繧ッ繧サ繧ケ
  20. -
  21. 繝輔Λ繝繧キ繝・繝サ繝。繝「繝ェ縺ョ迚ケ諤ァ縺ク縺ョ驟肴ョ
  22. -
  23. 繧ッ繝ェ繝√き繝ォ繝サ繧サ繧ッ繧キ繝ァ繝ウ
  24. -
  25. API縺ョ諡。蠑オ逧菴ソ逕ィ萓
  26. -
  27. FatFs縺ョ繝ゥ繧、繧サ繝ウ繧ケ縺ォ縺、縺縺ヲ
  28. -
-
- -
-

繝昴シ繝繧」繝ウ繧ー縺ョ髫帙↓驟肴ョ縺吶∋縺阪%縺ィ

- -

遘サ讀阪ョ髫帙ョ蜑肴署譚。莉カ

-

FatFs繝「繧ク繝・繝シ繝ォ縺ッ遘サ讀肴ァ縺ォ髢「縺励※谺。縺ョ轤ケ繧貞燕謠舌→縺励※縺縺セ縺吶

- - -

繧キ繧ケ繝繝讒区

-

荳九↓遉コ縺吩セ晏ュ倬未菫ょ峙縺ッ縲:atFs繝「繧ク繝・繝シ繝ォ蛻ゥ逕ィ縺ョ邨縺ソ霎シ縺ソ繧キ繧ケ繝繝縺ォ縺翫¢繧倶サ」陦ィ逧縺ェ讒区舌r遉コ縺励∪縺吶

-

繧キ繧ケ繝繝讒区仙峙

- -

繝ヲ繝シ繧カ縺ョ菴懈舌☆繧矩未謨ー

-

蠢隕√↑縺ョ縺ッ FatFs繝「繧ク繝・繝シ繝ォ縺ョ隕∵アゅ☆繧九ョ繧」繧ケ繧ッ髢「謨ー繧堤畑諢上☆繧九%縺ィ縺縺代〒縲√◎繧御サ・螟悶↓縺吶k縺薙→縺ッ縺ゅj縺セ縺帙s縲よ里縺ォ蜍穂ス懊@縺ヲ縺繧九ョ繧」繧ケ繧ッ髢「謨ー縺後≠繧九↑繧峨√◎縺ョ API繧 FatFs縺ォ蜷医o縺帙k縺九げ繝ォ繝シ髢「謨ー縺ァ縺、縺ェ縺舌□縺代〒貂医∩縺セ縺吶′縲∫┌縺蝣エ蜷医ッ縺サ縺九°繧臥ァサ讀阪☆繧九°譛蛻昴°繧画嶌縺上°縺吶k蠢隕√′縺ゅj縺セ縺吶ょョ夂セゥ縺輔l縺ヲ縺繧句ィ縺ヲ縺ョ髢「謨ー縺悟クク縺ォ蠢隕√↑繧上¢縺ァ縺ッ縺ゅj縺セ縺帙s縲ゆセ九∴縺ー縲√Μ繝シ繝峨サ繧ェ繝ウ繝ェ繝シ讒区舌〒縺ッ譖ク縺崎セシ縺ソ邉サ髢「謨ー縺ッ蠢隕√≠繧翫∪縺帙s縲よャ。縺ョ陦ィ縺ォ讒区舌が繝励す繝ァ繝ウ縺ィ隕∵アゅ&繧後k髢「謨ー縺ョ蟇セ蠢懊r遉コ縺励∪縺吶

- - - - - - - - - - -
繝ヲ繝シ繧カ菴懈宣未謨ー蠢隕√→縺ェ繧区擅莉カ蛯呵
disk_initialize
disk_status
disk_read
蟶ク譎ffsample.zip (繧オ繝ウ繝励Ν)
縺昴ョ莉殆eb荳翫↓螟壽焚
disk_write
get_fattime
disk_ioctl (CTRL_SYNC)
_FS_READONLY == 0
disk_ioctl (GET_SECTOR_COUNT)
disk_ioctl (GET_BLOCK_SIZE)
_USE_MKFS == 1
disk_ioctl (GET_SECTOR_SIZE)_MAX_SS >= 1024
disk_ioctl (CTRL_ERASE_SECTOR)_USE_ERASE == 1
ff_convert
ff_wtoupper
_USE_LFN >= 1option/cc*.c
ff_cre_syncobj
ff_rel_grant
ff_req_grant
ff_del_syncobj
_FS_REENTRANT == 1option/syscall.c (繧オ繝ウ繝励Ν)
ff_mem_alloc
ff_mem_free
_USE_LFN == 3
-
- -
-

髯千阜蛟、

- -
- -
-

繝。繝「繝ェ菴ソ逕ィ驥

-

谺。縺ョ陦ィ縺ォ縺縺上▽縺九ョ繧ソ繝シ繧イ繝繝医↓縺翫¢繧九Γ繝「繝ェ菴ソ逕ィ驥上ョ萓九r遉コ縺励∪縺吶ゅユ繧ケ繝域凾縺ョ讒区舌が繝励す繝ァ繝ウ縺ッ縺昴ョ荳九ョ騾壹j縺ァ縺吶よ焚蛟、縺ョ蜊倅ス阪ッ繝舌う繝医〒縲V縺ッ繝懊Μ繝・繝シ繝謨ー縲F縺ッ蜷梧凾繧ェ繝シ繝励Φ繝サ繝輔ぃ繧、繝ォ謨ー繧堤、コ縺励∪縺吶ゅさ繝ウ繝代う繝ゥ縺ョ譛驕ゥ蛹悶が繝励す繝ァ繝ウ縺ッ繧ウ繝シ繝峨サ繧オ繧、繧コ縺ィ縺励※縺縺セ縺吶

- - - - - - - - - - - - -
ARM7
32bit
ARM7
Thumb
CM3
Thumb-2
AVRH8/300HPIC24RL78V850ESSH-2ARX600IA-32
CompilerGCCGCCGCCGCCCH38C30CC78K0RCA850SHCRXCVC6
_WORD_ACCESS00010001011
text (Full, R/W)1059171196565132401086411619131928031896059777856
text (Min, R/W) 667145954293 8512 7232 7674 90335235576839235129
text (Full, R/O) 469531212861 6218 5162 5466 64183799396428473687
text (Min, R/O) 352324632275 4558 4058 4212 49482959309621992857
bssV*4 + 2V*4 + 2V*4 + 2V*2 + 2V*4 + 2V*2 + 2V*2 + 2V*4 + 2V*4 + 2V*4 + 2V*4 + 2
Work area
(_FS_TINY == 0)
V*560 +
F*550
V*560 +
F*550
V*560 +
F*550
V*560 +
F*544
V*560 +
F*550
V*560 +
F*544
V*560 +
F*544
V*560 +
F*544
V*560 +
F*550
V*560 +
F*550
V*560 +
F*550
Work area
(_FS_TINY == 1)
V*560 +
F*36
V*560 +
F*36
V*560 +
F*36
V*560 +
F*32
V*560 +
F*36
V*560 +
F*32
V*560 +
F*32
V*560 +
F*36
V*560 +
F*36
V*560 +
F*36
V*560 +
F*36
-
-FatFs R0.10 options:
-_FS_READONLY     0 (R/W), 1 (R/O)
-_FS_MINIMIZE     0 (Full function), 3 (Minimized function)
-_USE_STRFUNC     0 (Disable string functions)
-_USE_MKFS        0 (Disable f_mkfs function)
-_USE_FORWARD     0 (Disable f_forward function)
-_USE_FASTSEEK    0 (Disable fast seek feature)
-_CODE_PAGE       932 (Japanese Shift-JIS)
-_USE_LFN         0 (Disable LFN)
-_MAX_SS          512 (Fixed sector size)
-_FS_RPATH        0 (Disable relative path feature)
-_FS_LABEL        0 (Disable volume label functions)
-_VOLUMES         V (Number of logical drives to be used)
-_MULTI_PARTITION 0 (Single partition per drive)
-_FS_REENTRANT    0 (Disable reentrancy)
-_FS_LOCK         0 (Disable file lock control)
-
-
- -
-

繝「繧ク繝・繝シ繝ォ繝サ繧オ繧、繧コ縺ョ邵ョ蟆

-

谺。縺ョ陦ィ縺ッ讒区舌が繝励す繝ァ繝ウ縺ョ險ュ螳壼、縺ォ繧医j縺ゥ縺ョ讖溯ス縺悟炎髯、縺輔l繧九°繧堤、コ縺励∪縺吶

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Function_FS_MINIMIZE_FS_READONLY_USE_STRFUNC_FS_RPATH_FS_LABEL_USE_MKFS_USE_FORWARD_MULTI_PARTITION
0123010  1/20120101010/12
f_mount
f_open
f_close
f_read
f_writex
f_syncx
f_lseekx
f_opendirxx
f_closedirxx
f_readdirxx
f_statxxx
f_getfreexxxx
f_truncatexxxx
f_unlinkxxxx
f_mkdirxxxx
f_chmodxxxx
f_utimexxxx
f_renamexxxx
f_chdirx
f_chdrivex
f_getcwdxx
f_getlabelx
f_setlabelxx
f_forwardx
f_mkfsxx
f_fdiskxxx
f_putcxx
f_putsxx
f_printfxx
f_getsx
-
- -
-

髟キ縺繝輔ぃ繧、繝ォ蜷

-

FatFs繝「繧ク繝・繝シ繝ォ縺ッR0.07縺九i髟キ縺繝輔ぃ繧、繝ォ蜷(LFN)繧偵し繝昴シ繝医@縺セ縺励◆縲ゅヵ繧。繧、繝ォ縺ォ莉倥¢繧峨l縺2縺、縺ョ逡ー縺ェ繧句錐蜑(遏ュ縺繝輔ぃ繝ォ蜷阪→髟キ縺繝輔ぃ繧、繝ォ蜷)縺ッ縲f_readdir()繧帝勁縺上ヵ繧。繧、繝ォ謫堺ス憺未謨ー縺ォ縺翫>縺ヲ騾城℃縺ァ縺吶LFN讖溯ス繧呈怏蜉ケ縺ォ縺吶k縺ォ縺ッ縲_USE_LFN繧1,2縺セ縺溘ッ3縺ォ險ュ螳壹@縲ゞnicode螟画鋤髢「謨ーff_convert(), ff_wtoupper()繧偵励Ο繧ク繧ァ繧ッ繝医↓霑ス蜉縺励∪縺吶ゅ%繧後i縺ョ髢「謨ー縺ッ縲option/cc*.c縺ォ蜷ォ縺セ繧後※縺縺セ縺吶LFN讖溯ス縺ッ縲∝刈縺医※縺ゅk遞句コヲ縺ョ繝ッ繝シ繧ッ繝サ繧ィ繝ェ繧「(LFN謫堺ス懊ヰ繝繝輔ぃ)繧貞ソ隕√→縺励∪縺吶ゅヰ繝繝輔ぃ髟キ縺ッ菴ソ逕ィ縺ァ縺阪k繝。繝「繝ェ縺ォ蠢懊§縺ヲ_MAX_LFN繧ェ繝励す繝ァ繝ウ縺ァ讒区舌&繧後k縺薙→縺後〒縺阪∪縺吶LFN縺ョ髟キ縺輔ッ譛螟ァ255譁蟄励↓驕斐☆繧九ョ縺ァ縲´FN螳悟ィ蟇セ蠢懊ョ縺溘a縺ォ縺ッ_MAX_LFN縺ッ255縺ォ險ュ螳壹&繧後k縺ケ縺阪〒縺吶ゆク弱∴繧峨l縺溘ヵ繧。繧、繝ォ蜷阪↓蟇セ縺励※繝舌ャ繝輔ぃ髟キ縺御ク崎カウ縺励◆蝣エ蜷医√ヵ繧。繧、繝ォ髢「謨ー縺ッFR_INVALID_NAME縺ァ螟ア謨励@縺セ縺吶

-

菴輔i縺九ョ繝ェ繧ィ繝ウ繝医Λ繝ウ繝育憾諷九ョ荳九〒LFN讖溯ス繧剃スソ逕ィ縺吶k蝣エ蜷医ッ縲_USE_LFN縺ッ2縺セ縺溘ッ3縺ォ險ュ螳壹&繧後↑縺代l縺ー縺ェ繧翫∪縺帙s縲ゅ%縺ョ蝣エ蜷医√ヵ繧。繧、繝ォ髢「謨ー縺ッ繝舌ャ繝輔ぃ繧偵せ繧ソ繝繧ッ繧繝偵シ繝励↓遒コ菫昴@縺セ縺吶ゅヰ繝繝輔ぃ繝サ繧オ繧、繧コ縺ッ縲(_MAX_LFN + 1) * 2繝舌う繝医↓縺ェ繧九ョ縺ァ縲√せ繧ソ繝繧ッ遲峨ョ繧オ繧、繧コ縺ッ縺昴l繧定諷ョ縺励◆蜊∝縺ェ繧オ繧、繧コ縺ァ縺ェ縺代l縺ー縺ェ繧翫∪縺帙s縲

- - - - - - - - -
LFN cfg on ARM7
繧ウ繝シ繝峨壹シ繧ク繧ウ繝シ繝峨し繧、繧コ[bytes]
SBCS+3721
932(Shift-JIS)+62609
936(GBK)+177797
949(Korean)+139857
950(Big5)+111497
-

LFN讖溯ス縺ョ荳頑焔縺ェ菴ソ縺譁ケ縺ッ縲√◎繧後r菴ソ繧上↑縺縺ィ縺縺縺薙→縺ァ縺吶ょョ滄圀縲∫オ縺ソ霎シ縺ソ逕ィ騾斐〒縺ッLFN讖溯ス縺後←縺縺励※繧ょソ隕√↓縺ェ繧九→縺縺縺薙→縺ッ縺サ縺ィ繧薙←辟。縺縺ッ縺壹〒縺吶LFN繧呈怏蜉ケ縺ォ縺吶k縺ィ縲驕ク謚槭&繧後◆繧ウ繝シ繝峨サ繝壹シ繧ク縺ォ蠢懊§縺ヲ繝「繧ク繝・繝シ繝ォ繝サ繧オ繧、繧コ縺悟「怜、ァ縺輔l縺セ縺吶ょ承縺ョ陦ィ縺ォ蜷繧ウ繝シ繝峨サ繝壹シ繧ク縺ォ縺翫¢繧記FN繧呈怏蜉ケ縺ォ縺励◆縺ィ縺阪ョ繝「繧ク繝・繝シ繝ォ繝サ繧オ繧、繧コ縺ョ驕輔>繧堤、コ縺励∪縺吶ら音縺ォ縲,JK蝨ー蝓溘〒縺ッ謨ー荳縺ョ譁蟄励′菴ソ繧上l縺ヲ縺縺セ縺吶′縲∽ク榊ケク縺ェ縺薙→縺ォ縺昴l縺ッ蟾ィ螟ァ縺ェOEMシ攻nicode逶ク莠貞、画鋤繝繝シ繝悶Ν繧定ヲ∵アゅ@縲√Δ繧ク繝・繝シ繝ォ繝サ繧オ繧、繧コ縺ッ蜉逧縺ォ蠅怜、ァ縺輔l縺セ縺吶ゅ◎縺ョ邨先棡縲√◎繧後i縺ョ繧ウ繝シ繝峨サ繝壹シ繧ク縺ォ縺翫>縺ヲLFN繧呈怏蜉ケ縺ォ縺励◆FatFs繝「繧ク繝・繝シ繝ォ縺ッ縲、VR繧貞性繧谿縺ゥ縺ョ8繝薙ャ繝医サ繝槭う繧ウ繝ウ縺ォ繧、繝ウ繝励Μ繝。繝ウ繝医&繧後k縺薙→縺後〒縺阪∪縺帙s縲

-

LFN讖溯ス縺ョ繝上シ繝峨Ν縺ッ縺昴l縺縺代〒縺ッ縺ゅj縺セ縺帙s縲ゅ槭う繧ッ繝ュ繧ス繝輔ヨ遉セ縺ッFAT繝輔ぃ繧、繝ォ繝サ繧キ繧ケ繝繝縺ォ縺、縺縺ヲ縺縺上▽縺九ョ迚ケ險ア繧剃ソ晄怏縺励※縺縺セ縺吶ゅ>縺壹l繧LFN讖溯ス縺ョ螳溯」縺ォ髢「縺吶k繧ゅョ縺ァ縲√◎縺ョ蛻ゥ逕ィ縺ォ蟇セ縺励※$0.25/unit縺ョ繝ゥ繧、繧サ繝ウ繧ケ譁吶r隕∵アゅ@縺ヲ縺縺セ縺吶ゅ%縺ョ縺溘a縲∝膚逕ィ陬ス蜩√〒LFN讖溯ス繧貞茜逕ィ縺吶k縺ィ縺阪ッ縲∵怙邨ゆサ募髄蝨ー縺ォ繧医▲縺ヲ縺ッ繝ゥ繧、繧サ繝ウ繧ケ縺悟ソ隕√↓縺ェ繧翫∪縺吶よ怙霑代ョFAT32繝峨Λ繧、繝舌ョ螟壹¥縺ッLFN讖溯ス繧貞性繧薙〒縺繧九◆繧√√◎繧後i縺ョ菴ソ逕ィ縺ォ蠖薙◆縺」縺ヲ繝ゥ繧、繧サ繝ウ繧ケ縺悟ソ隕√↓縺ェ繧翫∪縺吶′縲:atFs縺ァ縺ッLFN讖溯ス繧呈ァ区舌が繝励す繝ァ繝ウ縺ァ莉サ諢上↓ON/OFF縺ァ縺阪k縺溘a縲∫┌蜉ケ縺ォ縺励※繝ゥ繧、繧サ繝ウ繧ケ蝠城。後r蝗樣∩縺吶k縺薙→繧ゅ〒縺阪∪縺吶

-
- -
-

譌・譛ャ隱槭ヵ繧。繧、繝ォ蜷阪ョ螟ァ譁蟄怜、画鋤

-

CP932(Shift_JIS)縺ァ縺九▽髱朖FN讒区舌ョ縺ィ縺阪ッ縲∵僑蠑オ譁蟄励ョ蟆乗枚蟄(2繝舌う繝郁恭蟄励サ繧ュ繝ェ繝ォ譁蟄励サ繧ョ繝ェ繧キ繝」譁蟄)縺ォ蟇セ縺励※螟ァ譁蟄怜、画鋤繧定。後o縺壹∝ー乗枚蟄励ョ縺セ縺セSFN繧ィ繝ウ繝医Μ縺ォ險倬鹸繝サ讀懃エ「縺輔l縺セ縺(譌・譛ャ隱朞SDOS莉墓ァ)縲ゅ%縺ョ縺溘a縲髱朖FN讒区舌〒蜈ィ隗貞ー乗枚蟄励r蜷ォ繧繝輔ぃ繧、繝ォ繧剃ス懈舌☆繧九→縲¨T邉サWindows縺ァ縺昴ョ繝輔ぃ繧、繝ォ繧帝幕縺代↑縺上↑繧翫∪縺吶LFN讒区舌〒縺ッ螟ァ譁蟄怜、画鋤繧定。後>縺セ縺(NT邉サWindows莉墓ァ)縲

-
- -
-

Unicode蜈・蜃コ蜉帙∈縺ョ蟇セ蠢

-

FatFs API荳翫↓縺翫¢繧九ヵ繧。繧、繝ォ蜷咲ュ峨ョ譁蟄怜励ョ繝シ繧ソ縺ョ蜈・蜃コ蜉帙ッ縲√ョ繝輔か繝ォ繝医〒縺ッANSI/OEM繧ウ繝シ繝峨〒陦後o繧後∪縺吶′縲√%繧後rUnicode(UTF-16)縺ォ蛻繧頑崛縺医k縺薙→繧ゅ〒縺阪∪縺(_LFN_UNICODE繧ェ繝励す繝ァ繝ウ縺ァ險ュ螳)縲ゅ▽縺セ繧翫√%繧後ッFatFs縺鍬FN讖溯ス縺ォ螳悟ィ蟇セ蠢懊@縺ヲ縺繧九%縺ィ繧呈э蜻ウ縺励∪縺吶6nicode縺ョ繝輔ぃ繧、繝ォ蜷阪↓髢「縺吶k隧ウ邏ー縺ッ縲繝輔ぃ繧、繝ォ蜷繧貞盾辣ァ縺励※縺上□縺輔>縲

-
- -
-

繝ェ繧ィ繝ウ繝医Λ繝ウ繧キ繝シ

-

莠偵>縺ォ逡ー縺ェ繧九懊Μ繝・繝シ繝縺ォ蟇セ縺吶k繝輔ぃ繧、繝ォ謫堺ス懊ッ繝ェ繧ィ繝ウ繝医Λ繝ウ繝医〒縲∝クク縺ォ蜷梧凾蟷ウ陦後↓蜍穂ス懊〒縺阪∪縺吶ょ酔縺倥懊Μ繝・繝シ繝縺ォ蟇セ縺励※縺ッ繝繝輔か繝ォ繝医〒縺ッ繝ェ繧ィ繝ウ繝医Λ繝ウ繝医〒縺ッ縺ゅj縺セ縺帙s縺後_FS_REENTRANT繧ェ繝励す繝ァ繝ウ縺ァ繝ェ繧ィ繝ウ繝医Λ繝ウ繝(繧ケ繝ャ繝繝峨サ繧サ繝シ繝)縺ォ縺吶k縺薙→縺ッ縺ァ縺阪∪縺吶ゅ%縺ョ蝣エ蜷医^S萓晏ュ倥ョ蜷梧悄繧ェ繝悶ず繧ァ繧ッ繝域桃菴憺未謨ーff_cre_syncobj(), ff_del_syncobj(), ff_req_grant(), ff_rel_grant()繧ゅ∪縺溘励Ο繧ク繧ァ繧ッ繝医↓霑ス蜉縺輔l縺ェ縺代l縺ー縺ェ繧翫∪縺帙s縲ゅし繝ウ繝励Ν繝サ繧ウ繝シ繝峨→隗」隱ャ縺ッoption/syncobj.c縺ォ縺ゅj縺セ縺吶

-

縺薙ョ蝣エ蜷医√≠繧九ち繧ケ繧ッ縺後懊Μ繝・繝シ繝繧剃スソ逕ィ荳ュ縺ォ莉悶ョ繧ソ繧ケ繧ッ縺九i縺昴ョ繝懊Μ繝・繝シ繝縺ォ蟇セ縺吶k繝輔ぃ繧、繝ォ髢「謨ー縺悟他縺ウ蜃コ縺輔l繧九→縲√◎縺ョ繧「繧ッ繧サ繧ケ縺ッ蜈医ョ繧ソ繧ケ繧ッ縺後ヵ繧。繧、繝ォ髢「謨ー繧呈栢縺代k縺セ縺ァ繝悶Ο繝繧ッ縺輔l縺セ縺吶ゅb縺励∝セ縺。譎る俣縺_TIMEOUT縺ァ謖螳壹&繧後◆譛滄俣繧定カ翫☆縺ィ縲√◎縺ョ髢「謨ー縺ッFR_TIMEOUT縺ァ繧「繝懊シ繝医@縺セ縺吶ゅ>縺上▽縺九ョRTOS縺ァ縺ッ繧ソ繧、繝繧「繧ヲ繝域ゥ溯ス縺ッ繧オ繝昴シ繝医&繧後↑縺縺九b遏・繧後∪縺帙s縲

-

縺イ縺ィ縺、縺ョ萓句、悶′f_mount(), f_mkfs(), f_fdisk()縺ォ縺ゅj縺セ縺吶ゅ%繧後i縺ョ髢「謨ー縺ッ蜷後§繝懊Μ繝・繝シ繝(縺セ縺溘ッ髢「騾」縺吶k迚ゥ逅繝峨Λ繧、繝)縺ォ蟇セ縺励※繝ェ繧ィ繝ウ繝医Λ繝ウ繝医〒縺ッ縺ゅj縺セ縺帙s縲ゅ%繧後i縺ョ髢「謨ー繧剃スソ逕ィ縺吶k縺ィ縺阪ッ縲√い繝励Μ繧ア繝シ繧キ繝ァ繝ウ繝サ繝ャ繝吶Ν縺ァ謗剃サ門宛蠕。縺励↑縺代l縺ー縺ェ繧翫∪縺帙s縲

-

豕ィ: 縺薙ョ繧サ繧ッ繧キ繝ァ繝ウ縺ッFatFs繝「繧ク繝・繝シ繝ォ縺昴l閾ェ菴薙ョ繝ェ繧ィ繝ウ繝医Λ繝ウ繧キ繝シ縺ォ縺、縺縺ヲ隱ャ譏弱@縺ヲ縺縺セ縺吶ゅ◎縺ョ荳倶ス阪ョ繝繧」繧ケ繧ッI/O繝「繧ク繝・繝シ繝ォ縺ョ繝ェ繧ィ繝ウ繝医Λ繝ウ繧キ繝シ縺ォ髢「縺励※縺ッ菴輔ョ蜑肴署繧ゅ≠繧翫∪縺帙s縲

-
- -
-

螟夐阪ヵ繧。繧、繝ォ繝サ繧「繧ッ繧サ繧ケ

-

FatFs繝「繧ク繝・繝シ繝ォ縺ァ縺ッ繝繝輔か繝ォ繝医〒縺ッ螟夐阪い繧ッ繧サ繧ケ蛻カ蠕。讖溯ス繧偵し繝昴シ繝医@縺ヲ縺縺セ縺帙s縲ゅヵ繧。繧、繝ォ縺ォ蟇セ縺吶k螟夐阪い繧ッ繧サ繧ケ縺ッ縲√◎縺ョ繧「繧ッ繧サ繧ケ繝サ繝「繝シ繝峨↓繧医▲縺ヲ蛻カ髯舌&繧後∪縺吶ゆク縺、縺ョ繝輔ぃ繧、繝ォ縺ォ蟇セ縺吶k螟夐阪が繝シ繝励Φ縺ッ縲√◎繧後i縺悟ィ縺ヲ繝ェ繝シ繝峨サ繝「繝シ繝峨ョ縺ィ縺阪↓髯舌▲縺ヲ險ア蜿ッ縺輔l縺セ縺吶よ嶌縺崎セシ縺ソ繝「繝シ繝峨r蜷ォ繧螟夐阪が繝シ繝励Φ縲√∪縺滄幕縺九l縺ヲ縺繧九ヵ繧。繧、繝ォ縺ォ蟇セ縺吶k繝ェ繝阪シ繝繧蜑企勁繧定。後▲縺ヲ縺ッ縺ェ繧翫∪縺帙s縲ゅ&繧ゅ↑縺縺ィ縲√◎縺ョ繝懊Μ繝・繝シ繝縺ョFAT讒矩縺檎エ螢翫&繧後k蜿ッ閭ス諤ァ縺後≠繧翫∪縺吶

-

_FS_LOCK縺ォ1莉・荳翫ョ蛟、(蛟、縺ッ蜷梧凾縺ォ邂。逅縺ァ縺阪k繝輔ぃ繧、繝ォ謨ー)繧偵そ繝繝医☆繧九%縺ィ縺ァ螟夐阪い繧ッ繧サ繧ケ蛻カ蠕。讖溯ス縺梧怏蜉ケ縺ォ縺ェ繧翫√ヵ繧。繧、繝ォ蜊倅ス阪ョ繧「繧ッ繧サ繧ケ蛻カ蠕。繧定ェ蜍輔〒陦後≧縺薙→繧ゅ〒縺阪∪縺吶ゅ%縺ョ蝣エ蜷医∽ク願ィ倥ョ繝ォ繝シ繝ォ繧堤エ縺」縺溘が繝シ繝励Φ繝サ繝ェ繝阪シ繝繝サ蜑企勁繧定ゥヲ縺ソ繧九→縲√◎縺ョ髢「謨ー縺ッFR_LOCKED縺ァ螟ア謨励@縺セ縺吶ゅ∪縺溘_FS_LOCK繧定カ翫∴繧区焚縺ョ繝輔ぃ繧、繝ォ繧繝繧」繝ャ繧ッ繝医Μ繧貞酔譎ゅ↓繧ェ繝シ繝励Φ縺励h縺縺ィ縺吶k縺ィ縲FR_TOO_MANY_OPEN_FILES縺ァ螟ア謨励@縺セ縺吶

-
- -
-

蜉ケ邇逧縺ェ繝輔ぃ繧、繝ォ繝サ繧「繧ッ繧サ繧ケ

-

蟆剰ヲ乗ィ。縺ェ邨霎シ繧キ繧ケ繝繝縺ァ縺ョ繝輔ぃ繧、繝ォ縺ョ隱ュ縺ソ譖ク縺阪↓縺翫¢繧句柑邇縺ョ濶ッ縺繧「繧ッ繧サ繧ケ縺ョ縺溘a縲√い繝励Μ繧ア繝シ繧キ繝ァ繝ウ繝サ繝励Ο繧ー繝ゥ繝槭ッFatFs繝「繧ク繝・繝シ繝ォ縺ョ荳ュ縺ァ縺ゥ縺ョ繧医≧縺ェ蜃ヲ逅縺瑚。後o繧後※縺繧九°閠諷ョ縺吶∋縺阪〒縺吶ゅせ繝医Ξ繝シ繧ク荳翫ョ繝繝シ繧ソ縺ッf_read()縺ォ繧医j谺。縺ョ繧キ繝シ繧ア繝ウ繧ケ縺ァ霆「騾√&繧後∪縺吶

-

蝗ウ1. 繧サ繧ッ繧ソ繝サ繝溘せ繧「繝ゥ繧、繝ウ繝峨サ繝ェ繝シ繝 (繧キ繝ァ繝シ繝)
-fig.1 -

-

蝗ウ2. 繧サ繧ッ繧ソ繝サ繝溘せ繧「繝ゥ繧、繝ウ繝峨サ繝ェ繝シ繝 (繝ュ繝ウ繧ー)
-fig.2 -

-

蝗ウ3. 繧サ繧ッ繧ソ繝サ繧「繝ゥ繧、繝ウ繝峨サ繝ェ繝シ繝
-fig.3 -

-

繝輔ぃ繧、繝ォI/O繝舌ャ繝輔ぃ縺ッ繧サ繧ッ繧ソ縺ョ荳驛ィ縺ョ繝繝シ繧ソ繧定ェュ縺ソ譖ク縺阪☆繧九◆繧√ョ繧サ繧ッ繧ソ繝サ繝舌ャ繝輔ぃ繧呈э蜻ウ縺励∪縺吶ゅそ繧ッ繧ソ繝サ繝舌ャ繝輔ぃ縺ッ縲√◎繧後◇繧後ョ繝輔ぃ繧、繝ォ繝サ繧ェ繝悶ず繧ァ繧ッ繝亥縺ョ繝励Λ繧、繝吶シ繝医サ繧サ繧ッ繧ソ繝サ繝舌ャ繝輔ぃ縺セ縺溘ッ繝輔ぃ繧、繝ォ繝サ繧キ繧ケ繝繝繝サ繧ェ繝悶ず繧ァ繧ッ繝亥縺ョ蜈ア譛峨そ繧ッ繧ソ繝サ繝舌ャ繝輔ぃ縺ョ縺ゥ縺。繧峨°縺ァ縺吶ゅヰ繝繝輔ぃ讒区舌が繝励す繝ァ繝ウ縺ョ_FS_TINY縺ッ縲√ョ繝シ繧ソ霆「騾√↓縺ゥ縺。繧峨r菴ソ縺縺九r豎コ螳壹@縺セ縺吶ゅち繧、繝九シ繝サ繝舌ャ繝輔ぃ(1)縺碁∈謚槭&繧後k縺ィ繝繝シ繧ソ繝サ繝。繝「繝ェ縺ョ豸郁イサ縺ッ縺昴l縺槭l縺ョ繝輔ぃ繧、繝ォ繝サ繧ェ繝悶ず繧ァ繧ッ繝医〒512繝舌う繝域ク帛ー代&繧後∪縺吶ゅ%縺ョ蝣エ蜷医:atFs繝「繧ク繝・繝シ繝ォ縺ッ繝輔ぃ繧、繝ォ繝サ繝繝シ繧ソ縺ョ霆「騾√→FAT/繝繧」繝ャ繧ッ繝医Μ繝サ繧「繧ッ繧サ繧ケ縺ォ繝輔ぃ繧、繝ォ繝サ繧キ繧ケ繝繝繝サ繧ェ繝悶ず繧ァ繧ッ繝亥縺ョ繧サ繧ッ繧ソ繝サ繝舌ャ繝輔ぃ縺縺代r菴ソ逕ィ縺励∪縺吶ゅち繧、繝九シ繝サ繝舌ャ繝輔ぃ縺ョ谺轤ケ縺ッ縲√そ繧ッ繧ソ繝サ繝舌ャ繝輔ぃ縺ォ繧ュ繝」繝繧キ繝・縺輔l縺檳AT繝繝シ繧ソ縺後ヵ繧。繧、繝ォ繝サ繝繝シ繧ソ縺ョ霆「騾√↓繧医j螟ア繧上l縲√け繝ゥ繧ケ繧ソ蠅逡後ョ豈弱↓繝ェ繝ュ繝シ繝峨&繧後↑縺代l縺ー縺ェ繧峨↑縺縺薙→縺ァ縺吶ゅ〒繧ゅ∵が縺上↑縺諤ァ閭ス縺ィ蟆代↑縺繝。繝「繝ェ豸郁イサ縺ョ隕也せ縺九i螟壹¥縺ョ繧「繝励Μ繧ア繝シ繧キ繝ァ繝ウ縺ォ驕ゥ縺吶k縺ァ縺励g縺縲

-

蝗ウ1縺ッ繧サ繧ッ繧ソ縺ョ荳驛ィ縺ョ繝繝シ繧ソ縺後ヵ繧。繧、繝ォI/O繝舌ャ繝輔ぃ繧堤オ檎罰縺ァ霆「騾√&繧後k縺薙→繧堤、コ縺励∪縺吶ょ峙2縺ォ遉コ縺輔l繧矩聞縺繝繝シ繧ソ縺ョ霆「騾√〒縺ッ縲∬サ「騾√ョ繝シ繧ソ縺ョ荳ュ髢薙ョ1繧サ繧ッ繧ソ縺セ縺溘ッ縺昴l莉・荳翫ョ繧サ繧ッ繧ソ縺ォ縺セ縺溘′繧玖サ「騾√ョ繝シ繧ソ縺後い繝励Μ繧ア繝シ繧キ繝ァ繝ウ繝サ繝舌ャ繝輔ぃ縺ォ逶エ謗・霆「騾√&繧後※縺縺セ縺吶ょ峙3縺ッ霆「騾√ョ繝シ繧ソ蜈ィ菴薙′繧サ繧ッ繧ソ蠅逡後↓繧「繝ゥ繧、繝。繝ウ繝医&繧後※縺繧句エ蜷医r遉コ縺励※縺縺セ縺吶ゅ%縺ョ蝣エ蜷医√ヵ繧。繧、繝ォI/O繝舌ャ繝輔ぃ縺ッ菴ソ逕ィ縺輔l縺セ縺帙s縲ら峩謗・霆「騾√↓縺翫>縺ヲ縺ッ譛螟ァ縺ョ遽蝗イ縺ョ繧サ繧ッ繧ソ縺disk_read()縺ァ荳蠎ヲ縺ォ隱ュ縺ソ霎シ縺セ繧後∪縺吶′縲√け繝ゥ繧ケ繧ソ蠅逡後r雜翫∴繧九槭Ν繝√サ繧サ繧ッ繧ソ霆「騾√ッ縺昴l縺碁團謗・縺ァ縺ゅ▲縺ヲ繧り。後o繧後∪縺帙s縲

-

縺薙ョ繧医≧縺ォ縲√そ繧ッ繧ソ縺ォ繧「繝ゥ繧、繝。繝ウ繝医@縺溘ヵ繧。繧、繝ォ縺ョ隱ュ縺ソ譖ク縺阪∈縺ョ驟肴ョ縺ッ繝舌ャ繝輔ぃ邨檎罰縺ョ繝繝シ繧ソ霆「騾√r驕ソ縺代∬ェュ縺ソ譖ク縺肴ァ閭ス縺ッ謾ケ蝟縺輔l繧九〒縺励g縺縲ゅ◎縺ョ蜉ケ譫懊↓蜉縺医√ち繧、繝九シ讒区舌〒繧ュ繝」繝繧キ繝・縺輔l縺檳AT繝繝シ繧ソ縺後ヵ繧。繧、繝ォ繝サ繝繝シ繧ソ縺ョ霆「騾√↓繧医j繝輔Λ繝繧キ繝・縺輔l縺壹髱槭ち繧、繝九シ讒区舌→蜷後§諤ァ閭ス繧貞ー上&縺ェ繝。繝「繝ェ繝サ繝輔ャ繝医励Μ繝ウ繝医〒驕疲舌〒縺阪∪縺吶

-
- -
-

繝輔Λ繝繧キ繝・繝サ繝。繝「繝ェ縺ョ迚ケ諤ァ縺ク縺ョ驟肴ョ

-

HDD縺ェ縺ゥ縺ョ繝繧」繧ケ繧ッ繝サ繝。繝繧」繧「縺ィ縺ッ逡ー縺ェ繧翫ヾDC繧ГFC縺ェ縺ゥ縺ョ繝輔Λ繝繧キ繝・繝サ繝。繝「繝ェ繝サ繝。繝繧」繧「縺ョ諤ァ閭ス繧貞シ輔″蜃コ縺吶↓縺ッ縲√◎縺ョ迚ケ諤ァ繧呈э隴倥@縺溷宛蠕。縺悟ソ隕√↓縺ェ繧翫∪縺吶

-

繝槭Ν繝√サ繧サ繧ッ繧ソ譖ク縺崎セシ縺ソ

-
-蝗ウ6. 繝槭Ν繝/繧キ繝ウ繧ー繝ォ繝サ繧サ繧ッ繧ソ繝サ繝ゥ繧、繝医ョ豈碑シ
-fig.6 -
-

繝輔Λ繝繧キ繝・繝サ繝。繝「繝ェ繝サ繝。繝繧」繧「縺ョ譖ク縺崎セシ縺ソ騾溷コヲ縺ッ繧キ繝ウ繧ー繝ォ繝サ繧サ繧ッ繧ソ譖ク縺崎セシ縺ソ縺ョ譎ゅ↓譛繧ゆス弱>繧ゅョ縺ォ縺ェ繧翫∽ク蝗槭ョ繝医Λ繝ウ繧カ繧ッ繧キ繝ァ繝ウ縺ァ霆「騾√&繧後k繧サ繧ッ繧ソ謨ー縺悟、ァ縺阪¥縺ェ繧九⊇縺ゥ譖ク縺崎セシ縺ソ騾溷コヲ縺ッ蜷台ク翫@縺セ縺吶ゅ%縺ョ蜉ケ譫懊ッ繝舌せ騾溷コヲ縺碁ォ倬溘↓縺ェ繧九⊇縺ゥ鬘戊送縺ァ縲10蛟堺サ・荳翫ョ蟾ョ縺檎樟繧後k縺薙→繧ら渚縺励¥縺ゅj縺セ縺帙s縲よ嶌縺崎セシ縺ソ繝医Λ繝ウ繧カ繧ッ繧キ繝ァ繝ウ縺ョ蝗樊焚縺ッ縺セ縺溘√Γ繝繧」繧「縺ョ蟇ソ蜻ス縺ォ繧ょスア髻ソ縺励※縺阪∪縺吶ゅ%縺ョ縺溘a縲√い繝励Μ繧ア繝シ繧キ繝ァ繝ウ縺ッ縺ェ繧九∋縺丞、ァ縺阪↑繝悶Ο繝繧ッ(繧ッ繝ゥ繧ケ繧ソ繝サ繧オ繧、繧コ縺セ縺溘ッ2縺ョ邏ッ荵励そ繧ッ繧ソ蠅逡後↓繧「繝ゥ繧、繝。繝ウ繝医@縺)縺ァ隱ュ縺ソ譖ク縺阪r陦後≧蠢隕√′縺ゅj縺セ縺吶ゅb縺。繧阪s縲√い繝励Μ繧ア繝シ繧キ繝ァ繝ウ縺九i繝。繝繧」繧「縺ォ閾ウ繧句ィ縺ヲ縺ョ繝ャ繧、繝、縺後槭Ν繝√サ繧サ繧ッ繧ソ霆「騾√↓蟇セ蠢懊@縺ヲ縺縺ェ縺縺ィ諢丞袖縺後≠繧翫∪縺帙s縲よョ句ソオ縺ェ縺後i縲∵里蟄倥ョ繧ェ繝シ繝励Φ繝サ繧ス繝シ繧ケ縺ョ繝峨Λ繧、繝舌ョ螟壹¥縺ッ繝槭Ν繝√サ繧サ繧ッ繧ソ霆「騾√↓譛ェ蟇セ蠢懊〒縺吶ゅ↑縺翫:atFs繝「繧ク繝・繝シ繝ォ縺翫h縺ウ縺昴l逕ィ縺ョ繧オ繝ウ繝励Ν繝サ繝峨Λ繧、繝舌ッ繝槭Ν繝√サ繧サ繧ッ繧ソ霆「騾√↓蟇セ蠢懊@縺ヲ縺縺セ縺吶

-

譏守、コ逧縺ェ繝。繝「繝ェ豸亥悉

-

騾壼クク縺ョ繝輔ぃ繧、繝ォ豸亥悉縺ァ縺ッ縲∬ィ倬鹸縺輔l縺溘ョ繝シ繧ソ縺ォ蟇セ縺励※菴輔i縺九ョ蛻カ蠕。縺瑚。後o繧後k繧上¢縺ァ縺ッ縺ェ縺上∝腰縺ォFAT荳翫↓譛ェ菴ソ逕ィ繧ッ繝ゥ繧ケ繧ソ縺ィ縺励※險倬鹸縺輔l縺ヲ縺繧九□縺代〒縺吶ゅ%縺ョ縺溘a縲√ヵ繧。繧、繝ォ縺梧カ亥悉縺輔l縺溘≠縺ィ繧ゅ◎繧後i縺ッ譛牙柑縺ェ繝。繝「繝ェ繝サ繝悶Ο繝繧ッ縺ィ縺励※繝輔Λ繝繧キ繝・繝サ繝。繝「繝ェ荳翫↓谿九j縺セ縺吶ゅ◎縺薙〒縲√ヵ繧。繧、繝ォ繧呈カ亥悉縺吶k縺ィ縺阪∝頃譛峨@縺ヲ縺縺溘ョ繝シ繧ソ繝サ繧サ繧ッ繧ソ繧呈守、コ逧縺ォ豸亥悉(縺、縺セ繧頑悴菴ソ逕ィ繝悶Ο繝繧ッ縺ォ縺吶k)縺吶k縺薙→縺ォ繧医j縲√Γ繝繧」繧「蜀縺ョ遨コ縺阪ヶ繝ュ繝繧ッ繧貞「励d縺吶%縺ィ縺後〒縺阪∪縺吶ゅ%繧後↓繧医j縲∵ャ。縺ォ縺昴ョ繝悶Ο繝繧ッ縺ォ譖ク縺崎セシ繧縺ィ縺阪ョ豸亥悉蜍穂ス懊′辟。縺上↑繧翫∵嶌縺崎セシ縺ソ諤ァ閭ス縺悟髄荳翫☆繧句庄閭ス諤ァ縺後≠繧翫∪縺吶ゅ∪縺溘√え繧ァ繧「繝ャ繝吶Μ繝ウ繧ー縺ォ菴ソ縺医k繝悶Ο繝繧ッ縺悟「励∴縲√Γ繝繧」繧「縺ョ閠蝉ケ諤ァ繧ょ髄荳翫☆繧九°繧ら衍繧後∪縺帙s縲ゅ%縺ョ讖溯ス繧呈怏蜉ケ縺ォ縺吶k縺ォ縺ッ縲∵ァ区舌が繝励す繝ァ繝ウ縺ョ_USE_ERASE縺ォ1繧定ィュ螳壹@縺セ縺吶ゅ%繧後ッ繝輔Λ繝繧キ繝・繝サ繝。繝「繝ェ繝サ繝。繝繧」繧「縺ョ蜀驛ィ蜍穂ス懊↓譛溷セ縺励◆蛻カ蠕。縺ェ縺ョ縺ァ縲∝柑譫懊′縺ゅk縺ィ縺ッ髯舌j縺セ縺帙s縲ゅ∪縺溘√ヵ繧。繧、繝ォ豸亥悉縺ョ譎る俣縺悟サカ縺ウ繧九%縺ィ繧り諷ョ縺ォ蜈・繧後k縺ケ縺阪〒縺吶

-
- -
-

繧ッ繝ェ繝√き繝ォ繝サ繧サ繧ッ繧キ繝ァ繝ウ

-

繧ケ繝医Ξ繝シ繧ク荳翫ョFAT讒矩繧呈桃菴懊@縺ヲ縺繧矩比クュ縺ァ縲∝●髮サ縲∽ク肴ュ」縺ェ繝。繝繧」繧「縺ョ蜿悶j螟悶@縲∝屓蠕ゥ荳崎ス縺ェ繝繝シ繧ソ繝サ繧ィ繝ゥ繝シ遲峨ョ髫懷ョウ縺檎匱逕溘☆繧九→縲∝ヲ逅縺御クュ騾泌濠遶ッ縺ェ迥カ諷九〒荳ュ譁ュ縺輔l縲√◎縺ョ邨先棡縺ィ縺励※FAT繝懊Μ繝・繝シ繝縺ョ讒矩縺檎エ螢翫&繧後k蜿ッ閭ス諤ァ縺後≠繧翫∪縺吶よャ。縺ォFatFs繝「繧ク繝・繝シ繝ォ縺ォ縺翫¢繧九け繝ェ繝√き繝ォ繝サ繧サ繧ッ繧キ繝ァ繝ウ縺ィ縲√◎縺ョ髢薙ョ髫懷ョウ縺ォ繧医j襍キ縺阪≧繧九お繝ゥ繝シ縺ョ迥カ諷九r遉コ縺励∪縺吶

-
-蝗ウ4. 髟キ縺繧ッ繝ェ繝√き繝ォ繝サ繧サ繧ッ繧キ繝ァ繝ウ
-fig.4 -
-
-蝗ウ5. 譛蟆丞喧縺励◆繧ッ繝ェ繝√き繝ォ繝サ繧サ繧ッ繧キ繝ァ繝ウ
-fig.5 -
-
-

襍、縺ァ遉コ縺励◆繧サ繧ッ繧キ繝ァ繝ウ繧貞ョ溯。御クュ縺ォ髫懷ョウ縺檎匱逕溘@縺溷エ蜷医√け繝ュ繧ケ繝サ繝ェ繝ウ繧ッ縺檎匱逕溘@縺ヲ謫堺ス懷ッセ雎。縺ョ繝輔ぃ繧、繝ォ繝サ繝繧」繝ャ繧ッ繝医Μ縺悟、ア繧上l繧句庄閭ス諤ァ縺後≠繧翫∪縺吶るサ濶イ縺ァ遉コ縺励◆繧サ繧ッ繧キ繝ァ繝ウ繧貞ョ溯。御クュ縺ォ髫懷ョウ縺檎匱逕溘@縺溷エ蜷医√▽縺弱ョ縺縺。縺縺壹l縺九∪縺溘ッ隍謨ー縺ョ邨先棡縺檎函縺倥k蜿ッ閭ス諤ァ縺後≠繧翫∪縺吶

- -

縺縺壹l繧よ嶌縺崎セシ縺ソ荳ュ繧謫堺ス懊ョ蟇セ雎。縺ァ縺ェ縺繝輔ぃ繧、繝ォ縺ォ縺ッ蠖ア髻ソ縺ッ縺ゅj縺セ縺帙s縲ゅ%繧後i縺ョ繧ッ繝ェ繝√き繝ォ繝サ繧サ繧ッ繧キ繝ァ繝ウ縺ッ縲√ヵ繧。繧、繝ォ繧呈嶌縺崎セシ縺ソ繝「繝シ繝峨〒髢九>縺ヲ縺繧区凾髢薙r譛蟆城剞縺ォ縺吶k縺九f_sync()繧帝←螳應スソ逕ィ縺吶k縺薙→縺ァ蝗ウ5縺ョ繧医≧縺ォ繝ェ繧ケ繧ッ繧呈怙蟆丞喧縺吶k縺薙→縺後〒縺阪∪縺吶

-
- -
-

API縺ョ諡。蠑オ逧菴ソ逕ィ萓

-

FatFs API縺ョ諡。蠑オ逧菴ソ逕ィ萓九〒縺吶よ怏逕ィ縺ェ繧ウ繝シ繝峨′縺ゅ▲縺溷エ蜷医ッ縲髫乗凾霑ス蜉縺励※縺縺阪∪縺吶ゅ

-
    -
  1. 霑ス險倥Δ繝シ繝峨〒縺ョ繧ェ繝シ繝励Φ/譁ー隕丈ス懈
  2. -
  3. 繝繧」繝ャ繧ッ繝医Μ繧堤ゥコ縺ォ縺吶k
  4. -
  5. 繝輔ぃ繧、繝ォ縺ォ騾」邯夐伜沺繧貞牡繧雁ス薙※繧
  6. -
-
- -
-

FatFs縺ョ繝ゥ繧、繧サ繝ウ繧ケ縺ォ縺、縺縺ヲ

-

繧ス繝シ繧ケ繝サ繝輔ぃ繧、繝ォ縺ョ繝倥ャ繝縺ォ繝ゥ繧、繧サ繝ウ繧ケ譚。莉カ縺瑚ィ倩ソー縺輔l縺ヲ縺繧九ョ縺ァ縲∝茜逕ィ縺ョ髫帙ッ縺昴l縺ォ蠕薙≧縺薙→縲り恭隱槭r隱ュ繧√↑縺譁ケ縺ョ縺溘a縺ォ莉・荳九↓譌・譛ャ隱櫁ィウ繧堤、コ縺励※縺翫″縺セ縺吶

-
/*----------------------------------------------------------------------------/
-/  FatFs - FAT file system module  R0.10                    (C)ChaN, 2013
-/-----------------------------------------------------------------------------/
-/ FatFs繝「繧ク繝・繝シ繝ォ縺ッ縲∝ー剰ヲ乗ィ。縺ェ邨縺ソ霎シ縺ソ繧キ繧ケ繝繝蜷代¢縺ョ豎守畑FAT繝輔ぃ繧、繝ォ繧キ繧ケ繝繝繝サ
-/ 繝「繧ク繝・繝シ繝ォ縺ァ縺吶ゅ%繧後ッ繝輔Μ繝シ繝サ繧ス繝輔ヨ繧ヲ繧ァ繧「縺ィ縺励※縲∵蕗閧イ繝サ遐皮ゥカ繝サ髢狗匱縺ョ縺溘a縺ォ
-/ 莉・荳九ョ繝ゥ繧、繧サ繝ウ繧ケ繝サ繝昴Μ繧キ繝シ縺ョ荳九〒蜈ャ髢九&繧後※縺縺セ縺吶
-/
-/  Copyright (C) 2013, ChaN, all right reserved.
-/
-/ * FatFs繝「繧ク繝・繝シ繝ォ縺ッ繝輔Μ繝シ繝サ繧ス繝輔ヨ繧ヲ繧ァ繧「縺ァ縺ゅj縲√∪縺辟。菫晁ィシ縺ァ縺縲
-/ * 逕ィ騾斐↓蛻カ髯舌ッ縺ゅj縺セ縺帙s縲縺ゅ↑縺溘ョ雋ャ莉サ縺ョ荳九↓縺翫>縺ヲ縲∝倶ココ逧繝サ髱槫霧蛻ゥ逧縺ェ
-/   繧ゅョ縺九i蝠逕ィ陬ス蜩√ョ髢狗匱縺ォ蜿翫カ逶ョ逧縺ォ菴ソ逕ィ繝サ謾ケ螟峨サ蜀埼榊ク縺吶k縺薙→縺後〒縺阪∪縺吶
-/ * 繧ス繝シ繧ケ繝サ繧ウ繝シ繝峨r蜀埼榊ク縺吶k縺ィ縺阪ッ縲∽ク願ィ倥ョ闡嶺ス懈ィゥ陦ィ遉コ繧剃ソ晄戟縺励↑縺代l縺ー縺ェ繧翫∪縺帙s縲
-/
-/-----------------------------------------------------------------------------/
-

隕√☆繧九↓FatFs縺ッ繧ソ繝縺ァ閾ェ逕ア縺ォ菴ソ縺医k縺ィ縺縺縺薙→縺ァ縺吶ゅた繝シ繧ケ繝サ繧ウ繝シ繝峨r蜀埼榊ク縺吶k縺ィ縺阪ッ縲√%縺ョ繝悶Ο繝繧ッ繧偵◎縺ョ縺セ縺セ菫晄戟縺励※縺翫¥縺薙→縲ゅ%縺ョ繧医≧縺ォFatFs縺ッBSD繝ゥ繧、繧ッ縺ェ繝ゥ繧、繧サ繝ウ繧ケ縺ィ縺励※縺縺セ縺吶′縲∽ク縺、螟ァ縺阪↑驕輔>縺後≠繧翫∪縺吶ら音縺ォ邨縺ソ霎シ縺ソ逕ィ騾斐〒縺ョ蛻ゥ逕ィ萓。蛟、繧帝ォ倥a繧九◆繧√√ヰ繧、繝翫Μ蠖「蠑(繧ス繝シ繧ケ繝サ繧ウ繝シ繝峨r蜷ォ縺セ縺ェ縺蠖「蠑丞ィ縺ヲ)縺ァ縺ョ蜀埼榊ク縺ォ縺、縺縺ヲ縺ッ縲∵擅莉カ縺ッ險ュ縺代※縺縺セ縺帙s縲ゅ◎縺ョ蝣エ蜷医ッ縲:atFs縺翫h縺ウ縺昴ョ繝ゥ繧、繧サ繝ウ繧ケ譁譖ク縺ォ縺、縺縺ヲ縺ッ繝峨く繝・繝。繝ウ繝医↓譏手ィ倥@縺ヲ繧ゅ@縺ェ縺上※繧ゅ°縺セ縺縺セ縺帙s縲ゅ%繧後ッ縲∽ク譚。鬆BSD繝ゥ繧、繧サ繝ウ繧ケ縺ィ遲我セ。縺ィ縺縺縺薙→縺ァ縺吶ゅb縺。繧阪sGNU GPL繝励Ο繧ク繧ァ繧ッ繝医→繧ょア蟄伜庄閭ス縺ァ縺吶ゆス輔i縺九ョ螟画峩繧貞刈縺医※蜀埼榊ク縺吶k髫帙ッ縲∫泝逶セ縺励↑縺莉悶ョ繝ゥ繧、繧サ繝ウ繧ケ(GNU GPL繧菫ョ豁」BSD繝ゥ繧、繧サ繝ウ繧ケ縺ェ縺ゥ)縺ォ螟画峩縺吶k縺薙→繧ょ庄閭ス縺ァ縺吶

-
- -

謌サ繧

- - diff --git a/stmhal/fatfs/doc/ja/chdir.html b/stmhal/fatfs/doc/ja/chdir.html deleted file mode 100644 index c84607011..000000000 --- a/stmhal/fatfs/doc/ja/chdir.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - -FatFs - f_chdir - - - - -
-

f_chdir

-

カレント・ディレクトリを変更します。

-
-FRESULT f_chdir (
-  const TCHAR* path /* [IN] ディレクトリ名へのポインタ */
-);
-
-
- -
-

引数

-
-
path
-
移動対象のディレクトリのパス名を示すヌル文字'\0'終端の文字列を指定します。
-
-
- - -
-

戻り値

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NO_FILE, -FR_NO_PATH, -FR_INVALID_NAME, -FR_INVALID_DRIVE, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_NOT_ENOUGH_CORE -

-
- - -
-

解説

-

各ボリュームのカレント・ディレクトリを変更します。カレント・ディレクトリはファイル・システム・オブジェクトの初期化が行われたとき、ルート・ディレクトリに設定されます。カレント・ディレクトリは、ファイル・システム・オブジェクトに保持されるため、そのボリュームを使用する全てのタスクに対して影響を与えます。

-
- - -
-

対応情報

-

_FS_RPATH == 1のときに使用可能となります。

-
- - -
-

使用例

-
-    /* カレント・ドライブのカレント・ディレクトリを変更 (ルート下のdir1へ) */
-    f_chdir("/dir1");
-
-    /* ドライブ2のカレント・ディレクトリを変更 (親ディレクトリへ) */
-    f_chdir("2:..");
-
-
- -
-

参照

-

f_chdrive

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/chdrive.html b/stmhal/fatfs/doc/ja/chdrive.html deleted file mode 100644 index 83d1a1844..000000000 --- a/stmhal/fatfs/doc/ja/chdrive.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - -FatFs - f_chdrive - - - - -
-

f_chdrive

-

カレント・ドライブを変更します。

-
-FRESULT f_chdrive (
-  const TCHAR* path  /* [IN] 対象ドライブを指定します */
-);
-
-
- -
-

引数

-
-
path
-
カレント・ドライブに設定する論理ドライブ番号を指定するパス名を指定します。
-
-
- - -
-

戻り値

-

-FR_OK, -FR_INVALID_DRIVE -

-
- - -
-

解説

-

カレント・ドライブを変更します。システム起動時の初期値は0です。この設定はFatFsモジュールの静的変数に記録されるため、全てのタスクに対して影響を与えます。

-
- - -
-

対応情報

-

_FS_RPATH == 1のときに使用可能となります。

-
- - -
-

参照

-

f_chdir

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/ja/chmod.html b/stmhal/fatfs/doc/ja/chmod.html deleted file mode 100644 index e0d113ef9..000000000 --- a/stmhal/fatfs/doc/ja/chmod.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - -FatFs - f_chmod - - - - -
-

f_chmod

-

ファイルまたはサブ・ディレクトリの属性を変更します。

-
-FRESULT f_chmod (
-  const TCHAR* path, /* [IN] オブジェクト名へのポインタ */
-  BYTE attr,         /* [IN] 設定値 */
-  BYTE mask          /* [IN] 変更マスク */
-);
-
-
- -
-

引数

-
-
path
-
属性変更対象のオブジェクトのパス名を示すヌル文字'\0'終端の文字列を指定します。
-
attr
-
設定する属性。指定可能な属性は次の通りで、これらの組み合わせで指定します。指定されなかった属性は解除されます。
- - - - - - -
意味
AM_RDOリード・オンリー
AM_ARCアーカイブ
AM_SYSシステム
AM_HIDヒドゥン
-
-
mask
-
変更する属性のマスク。指定した属性が設定または解除され、指定されなかった属性は状態が保持されます。attrと同じ値を使います。
-
-
- - -
-

戻り値

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_NO_FILE, -FR_NO_PATH, -FR_INVALID_NAME, -FR_WRITE_PROTECTED, -FR_NOT_ENABLED, -FR_NO_FILESYSTEM, -FR_TIMEOUT, -FR_LOCKED, -FR_NOT_ENOUGH_CORE -

-
- - -
-

対応情報

-

_FS_READONLY == 0で、且つ_FS_MINIMIZE == 0のとき使用可能です。

-
- - -
-

使用例

-
-    /* リードオンリーをセット、アーカイブをクリア、その他は変更しない */
-    f_chmod("file.txt", AM_RDO, AM_RDO | AM_ARC);
-
-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/close.html b/stmhal/fatfs/doc/ja/close.html deleted file mode 100644 index cefd795aa..000000000 --- a/stmhal/fatfs/doc/ja/close.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - -FatFs - f_close - - - - -
-

f_close

-

ファイルを閉じます。

-
-FRESULT f_close (
-  FIL* fp     /* [IN] ファイル・オブジェクトへのポインタ */
-);
-
-
- -
-

引数

-
-
fp
-
閉じようとするファイルのファイル・オブジェクト構造体へのポインタを指定します。
-
-
- - -
-

戻り値

-

-FR_OK, -FR_DISK_ERR, -FR_INT_ERR, -FR_NOT_READY, -FR_INVALID_OBJECT, -FR_TIMEOUT -

-
- - -
-

解説

-

ファイルを閉じます。何らかの書き込みの行われたファイルの場合、キャッシュされた状態(リード/ライト・バッファ上のデータ、変更されたFATやディレクトリ項目)はディスクに書き戻されます。関数が正常終了すると、そのファイル・オブジェクトは無効になり、そのメモリも解放できます。

-

ファイル・オブジェクトが読み出し専用モードで、_FS_LOCKオプションが選択されていない場合は、ファイルを閉じずにファイル・オブジェクトを破棄することもできます。しかし、これは将来の互換性の点で推奨はされません。

-
- - -
-

対応情報

-

全ての構成で使用可能です。

-
- - -
-

参照

-f_open, f_read, f_write, f_sync, FIL, FATFS -
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/closedir.html b/stmhal/fatfs/doc/ja/closedir.html deleted file mode 100644 index 021e8c87e..000000000 --- a/stmhal/fatfs/doc/ja/closedir.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - -FatFs - f_closedir - - - - -
-

f_closedir

-

ディレクトリを閉じます。

-
-FRESULT f_closedir (
-  DIR* dp     /* [IN] ディレクトリ・オブジェクトへのポインタ */
-);
-
-
- -
-

引数

-
-
dp
-
閉じようとするディレクトリのディレクトリ・オブジェクト構造体へのポインタを指定します。
-
-
- - -
-

戻り値

-

-FR_OK, -FR_INT_ERR, -FR_INVALID_OBJECT, -FR_TIMEOUT -

-
- - -
-

解説

-

ディレクトリを閉じます。関数が正常終了すると、そのディレクトリ・オブジェクトは無効になり、そのメモリも解放できます。

-

_FS_LOCKオプションが選択されていない場合は、この処理を行わずにディレクトリ・オブジェクトを破棄することもできます。しかし、これは将来の互換性の点で推奨はされません。

-
- - -
-

対応情報

-

_FS_MINIMIZE <= 1のとき使用可能になります。

-
- - -
-

参照

-f_opendir, f_readdir, DIR -
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/dinit.html b/stmhal/fatfs/doc/ja/dinit.html deleted file mode 100644 index abe3d0e18..000000000 --- a/stmhal/fatfs/doc/ja/dinit.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - -FatFs - disk_initialize - - - - -
-

disk_initialize

-

ディスク・ドライブを初期化します。

-
-DSTATUS disk_initialize (
-  BYTE pdrv      /* [IN] 物理ドライブ番号 */
-);
-
-
- -
-

引数

-
-
pdrv
-
初期化する物理ドライブ番号(0-9)が指定されます。
-
-
- - -
-

戻り値

-

この関数は戻り値としてディスク・ステータスを返します。ディスク・ステータスの詳細に関してはdisk_status()を参照してください。

-
- -
-

解説

-

ディスク・ドライブを初期化します。関数が成功すると、戻り値のSTA_NOINITフラグがクリアされます。

-

FatFsを使用中はアプリケーションからはこの関数を呼び出してはなりません。さもないと、FATボリュームが破壊されます。エラー等により再初期化が必要なときは、f_mount()を使用してください。FatFsモジュールは、自動マウント動作により、必要に応じてこの関数を呼び出します。

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/dioctl.html b/stmhal/fatfs/doc/ja/dioctl.html deleted file mode 100644 index 056396302..000000000 --- a/stmhal/fatfs/doc/ja/dioctl.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - -FatFs - disk_ioctl - - - - -
-

disk_ioctl

-

セクタの読み書き以外のディスク・ドライブ自体に対する様々な制御をします。

-
-DRESULT disk_ioctl (
-  BYTE pdrv,    /* [IN] 物理ドライブ番号 */
-  BYTE cmd,     /* [IN] 制御コマンド */
-  void* buff    /* [I/O] データ受け渡しバッファ */
-);
-
-
- -
-

引数

-
-
pdrv
-
物理ドライブ番号(0-9)が指定されます。
-
cmd
-
制御コマンド・コードが指定されます。
-
buff
-
制御コマンドに依存したパラメータを授受するバッファを指すポインタが指定されます。データの授受のないコマンドの場合は、値に意味はありません。
-
-
- -
-

戻り値

-
-
RES_OK (0)
-
正常終了。
-
RES_ERROR
-
何らかのエラーが発生した。
-
RES_PARERR
-
コマンドが不正。
-
RES_NOTRDY
-
ドライブが動作可能状態ではない、または初期化されていない。
-
-
- -
-

解説

-

物理ドライブの種類によりサポートされるコマンドは異なりますが、FatFsモジュールでは、次の汎用コマンドのみ使用し、特定のハードウェアに依存した制御は行いません。

- - - - - - - -
コマンド解説
CTRL_SYNCドライブ内のデータ書き込み処理の完了待ち。ライト・バック・キャッシュなどが存在する場合は、書き込まれていないデータを即時書き戻します。リード・オンリー構成では使用されません。
GET_SECTOR_SIZEbuffの指すWORD型変数にドライブのセクタ・サイズ(バイト単位)を返します。セクタ・サイズが固定(_MAX_SSが512)のときはこのコマンドは使われません。
GET_SECTOR_COUNTbuffの指すDWORD型変数にドライブ上の総セクタ数を返します。f_mkfs()内で呼び出され、作成するボリュームのサイズを決定するために使用されます。
GET_BLOCK_SIZEbuffの指すDWORD型変数にフラッシュ・メモリの消去ブロック・サイズ(セクタ単位)を返します。1から32768の範囲で2の累乗の値でなければなりません。不明な場合またはフラッシュ・メモリ以外のメディアでは1を返します。f_mkfs()内でのみ使用され、ボリュームのデータ領域はこの境界にアライメントされます。
CTRL_ERASE_SECTORフラッシュ・メモリ上の指定領域の消去。buffの指すDWORD型配列には消去する領域 {開始セクタ,終了セクタ} を指定して呼び出されます。_USE_ERASEが1のとき、クラスタが解放されるときに呼び出されます。これは、ATAコマンド・セットのTrimコマンドと等価で、この機能をサポートしない場合は何もする必要はありません。また、戻り値はチェックされず、消去が完全に行われなかったとしてもFatFsの動作には影響ありません。
-
- - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/dread.html b/stmhal/fatfs/doc/ja/dread.html deleted file mode 100644 index 2c994902d..000000000 --- a/stmhal/fatfs/doc/ja/dread.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - -FatFs - disk_read - - - - -
-

disk_read

-

ドライブからセクタを読み出します。

-
-DRESULT disk_read (
-  BYTE pdrv,     /* [IN] 物理ドライブ番号 */
-  BYTE* buff,    /* [OUT] 読み出しバッファへのポインタ */
-  DWORD sector,  /* [IN] 読み出し開始セクタ番号 */
-  UINT count     /* [IN] 読み出すセクタ数 */
-);
-
-
- -
-

引数

-
-
pdrv
-
物理ドライブ番号(0-9)が指定されます。
-
buff
-
ディスクから読み出したデータを格納するバイト配列で、読み出されるバイト数分のサイズが必要です。
-
sector
-
読み出しを開始するセクタ番号。LBAで指定されます。
-
count
-
読み出すセクタ数。 1〜128の範囲の値で指定されます。一般的に、複数セクタの転送要求はデバイスに対して可能な限りマルチ・セクタ転送しなければなりません。複数のシングル・セクタ読み出しに分解した場合、スループットが低下することがあります。
-
-
- - -
-

戻り値

-
-
RES_OK (0)
-
正常終了。
-
RES_ERROR
-
読み込み中にエラーが発生し、その回復にも失敗した。
-
RES_PARERR
-
パラメータが不正。
-
RES_NOTRDY
-
ドライブが動作可能状態ではない(初期化されていない)。
-
-
- - -
-

解説

-

buffBYTE型なので、指定されるアドレスは常にワード・アライメントされているとは限りません。非アライメント・アドレスへの転送は、直接転送において発生することがあります。もしも、ハードウェア上の制約でそのような転送が不可能なときは、この関数内で二段転送するなどして解決するか、または別の方法で対応しなければなりません。次にいくつかの対応方法を示します(いずれか一つでOK)。

- - - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/dstat.html b/stmhal/fatfs/doc/ja/dstat.html deleted file mode 100644 index d21f8ef21..000000000 --- a/stmhal/fatfs/doc/ja/dstat.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - -FatFs - disk_status - - - - -
-

disk_status

-

ディスク・ドライブの状態を取得します。

-
-DSTATUS disk_status (
-  BYTE pdrv           /* [IN] 物理ドライブ番号 */
-);
-
-
- -
-

引数

-
-
pdrv
-
ステータスを取得する物理ドライブ番号が指定されます。
-
-
- - -
-

戻り値

-

物理ドライブの状態を次のフラグの組み合わせ値で返します。

-
-
STA_NOINIT
-
ドライブが初期化されていないことを示すフラグ。システム・リセットやメディアの取り外し等でセットされ、disk_initialize()の正常終了でクリア、失敗でセットされます。メディア交換は非同期に発生するイベントなので、過去にメディア交換があった場合もこのフラグに反映させる必要があります。FatFsモジュールは、このフラグを参照して自動マウント動作を行うかどうかを判断します。
-
STA_NODISK
-
メディアが存在しないことを示すフラグ。メディアが取り外されている間はセットされ、セットされている間はクリアされます。固定ディスクでは常にクリアします。なお、このフラグはFatFsモジュールでは参照されません。
-
STA_PROTECTED
-
メディアがライト・プロテクトされていることを示すフラグ。ライト・プロテクト機能をサポートしないときは、常にクリアします。リード・オンリ構成では参照されません。
-
-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/dwrite.html b/stmhal/fatfs/doc/ja/dwrite.html deleted file mode 100644 index 31520bbc4..000000000 --- a/stmhal/fatfs/doc/ja/dwrite.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - -FatFs - disk_write - - - - -
-

disk_write

-

ディスクにデータを書き込みます。

-
-DRESULT disk_write (
-  BYTE pdrv,        /* [IN] 物理ドライブ番号 */
-  const BYTE* buff, /* [IN] 書き込むデータへのポインタ */
-  DWORD sector,     /* [IN] 書き込み開始セクタ番号 */
-  UINT count        /* [IN] 書き込むセクタ数 */
-);
-
-
- -
-

引数

-
-
pdrv
-
物理ドライブ番号(0-9)が指定されます。
-
buff
-
ディスクに書き込むバイト配列が指定されます。アドレスは常にワード・アライメントされているとは限りません
-
sector
-
書き込みを開始するセクタ番号。LBAで指定されます。
-
count
-
書き込むセクタ数。 1〜128の範囲の値で指定されます。一般的に、複数セクタの転送要求はデバイスに対して可能な限りマルチ・セクタ転送しなければなりません。複数のシングル・セクタ書き込みに分解した場合、スループットが極端に低下することがあります。
-
-
- - -
-

戻り値

-
-
RES_OK (0)
-
正常終了。
-
RES_ERROR
-
書き込み中にエラーが発生し、その回復にも失敗した。
-
RES_WRPRT
-
メディアが書き込み禁止状態。
-
RES_PARERR
-
パラメータが不正。
-
RES_NOTRDY
-
ドライブが動作可能状態ではない(初期化されていない)。
-
-
- - -
-

解説

-

リード・オンリー構成ではこの関数は必要とされません。

-

FatFsの使用中はアプリケーションからはこの関数を呼び出してはなりません。さもないと、FATボリュームが破壊されます。エラー等により再初期化が必要なときは、f_mount()を使用してください。FatFsモジュールは、自動マウント動作により、必要に応じてこの関数を呼び出します。

-
- - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/eof.html b/stmhal/fatfs/doc/ja/eof.html deleted file mode 100644 index b1f0e1ac4..000000000 --- a/stmhal/fatfs/doc/ja/eof.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_eof - - - - -
-

f_eof

-

リード/ライト・ポインタがファイル終端に達しているかどうか調べます。.

-
-int f_eof (
-  FIL* fp   /* [IN] ファイル・オブジェクト */
-);
-
-
- - -
-

引数

-
-
fp
-
ファイル・オブジェクト構造体へのポインタを指定します。
-
-
- - -
-

戻り値

-

リード/ライト・ポインタがファイル終端にあり読み出すデータがない場合は、0以外の値を返します。それ以外の時は0を返します。

-
- - -
-

解説

-

f_eof関数は、現リビジョンではマクロとして実装されています。

-
-#define f_eof(fp) (((fp)->fptr) == ((fp)->fsize) ? 1 : 0)
-
-
- - -
-

対応情報

-

常に使用可能。

-
- - -
-

参照

-

f_open, f_lseek, FIL

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/error.html b/stmhal/fatfs/doc/ja/error.html deleted file mode 100644 index ccd2f0716..000000000 --- a/stmhal/fatfs/doc/ja/error.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_error - - - - -
-

f_error

-

エラー発生の有無を調べます。

-
-int f_error (
-  FIL* fp   /* [IN] ファイル・オブジェクト */
-);
-
-
- - -
-

引数

-
-
fp
-
ファイル・オブジェクト構造体へのポインタを指定します。
-
-
- - -
-

戻り値

-

ファイルが操作中のエラーによって処理が中断されている場合は、0以外の値を返します。それ以外の時は0を返します。

-
- - -
-

解説

-

f_error関数は、現リビジョンではマクロとして実装されています。

-
-#define f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0)
-
-
- - -
-

対応情報

-

常に使用可能。

-
- - -
-

参照

-

f_open, FIL

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/fattime.html b/stmhal/fatfs/doc/ja/fattime.html deleted file mode 100644 index 7c9416504..000000000 --- a/stmhal/fatfs/doc/ja/fattime.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - -FatFs - get_fattime - - - - -
-

get_fattime

-

現在時刻を取得します。

-
-DWORD get_fattime (void);
-
-
- - -
-

戻り値

-

現在のローカル・タイムがDWORD値にパックされて返されます。ビット・フィールドは次に示すようになります。

-
-
bit31:25
-
1980年を起点とした年が 0..127 で入ります。
-
bit24:21
-
月が 1..12 の値で入ります。
-
bit20:16
-
日が 1..31 の値で入ります。
-
bit15:11
-
時が 0..23 の値で入ります。
-
bit10:5
-
分が 0..59 の値で入ります。
-
bit4:0
-
秒/2が 0..29 の値で入ります。
-
-
- - -
-

解説

-

RTCをサポートしないシステムでも、何らかの日付として有効な値を返さなければなりません。0を返した場合、そのファイルは日付を持ちません。リード・オンリー構成ではこの関数は必要とされません。

-
- - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/fdisk.html b/stmhal/fatfs/doc/ja/fdisk.html deleted file mode 100644 index 27f78b33f..000000000 --- a/stmhal/fatfs/doc/ja/fdisk.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - -FatFs - f_fdisk - - - - -
-

f_fdisk

-

物理ドライブを分割します。

-
-FRESULT f_fdisk (
-  BYTE  pdrv,         /* [IN] 物理ドライブ番号 */
-  const DWORD part[], /* [IN] 区画マップ・テーブル */
-  void* work          /* [-] ワークエリア */
-);
-
-
- -
-

引数

-
-
pdrv
-
分割する物理ドライブのドライブ番号を指定します。
-
part[]
-
区画マップ・テーブルへのポインタを指定します。
-
work
-
ワークエリアへのポインタを指定します。サイズは_MAX_SSバイト必要です。
-
-
- - - -
-

説明

-

この関数は、指定された物理ドライブのMBRに区画テーブルを作成します。区画分けは一般的なFDISK形式で行うため、最大4つの基本区画を作成することができます。拡張区画には対応していません。区画マップテーブルpart[]にはドライブをどのように分割するか指定して渡します。この配列は4つの項目から成り、先頭の項目が1番目の、最後の項目が4番目の区画のサイズを示します。値が100以下の場合、ドライブの総容量に対する割合をパーセント単位で指定します。100を超える値の場合はセクタ数の直接指定になります。

-
- -
-

対応情報

-

_FS_READOLNY == 0_USE_MKFS == 1_MULTI_PARTITION == 1 のとき使用可能です。

-
- -
-

使用例

-
-    /* ユーザ定義のボリューム管理テーブル (_MULTI_PARTITION == 1 のとき必要) */
-
-    PARTITION VolToPart[] = {
-        {0, 1},    /* 論理ドライブ 0 ==> 物理ドライブ 0, 第1区画 */
-        {0, 2},    /* 論理ドライブ 1 ==> 物理ドライブ 0, 第2区画 */
-        {1, 0}     /* 論理ドライブ 2 ==> 物理ドライブ 1, 自動検出 */
-    };
-
-
-    /* 新しい物理ドライブ(0)の初期化 */
-
-    FATFS fs;
-    DWORD plist[] = {50, 50, 0, 0};  /* 2分割 */
-    BYTE work[_MAX_SS];
-
-    f_fdisk(0, plist, work);  /* 物理ドライブ 0 の分割 */
-
-    f_mount(&fs "0:", 0);
-    f_mkfs("0:", 0, 0);       /* 論理ドライブ 0 のフォーマット. 第二引数は無視される.  */
-    f_mount(0, "0:", 0);
-
-    f_mount(&fs, "1:", 0);
-    f_mkfs("1:", 0, 0);       /* 論理ドライブ 0 のフォーマット. 第二引数は無視される.  */
-    f_mount(0, "1:", 0);
-
-
-
- -
-

See Also

-

Volume management, f_mkfs

-
- -

Return

- - diff --git a/stmhal/fatfs/doc/ja/filename.html b/stmhal/fatfs/doc/ja/filename.html deleted file mode 100644 index ab862ffe2..000000000 --- a/stmhal/fatfs/doc/ja/filename.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - -FatFs - 繝代せ蜷阪ョ繝輔か繝シ繝槭ャ繝 - - - -

繝代せ蜷阪ョ繝輔か繝シ繝槭ャ繝

-
-

繝輔ぃ繧、繝ォ繝サ繝繧」繝ャ繧ッ繝医Μ蜷

-

FatFs繝「繧ク繝・繝シ繝ォ縺ァ縺ョ繝輔ぃ繧、繝ォ縲√ョ繧」繝ャ繧ッ繝医Μ縲√ラ繝ゥ繧、繝悶ョ謖螳壽婿豕輔ッDOS/Windows API縺ィ縺サ縺シ蜷後§縺ァ縺吶ゅヱ繧ケ蜷阪ョ繝輔か繝シ繝槭ャ繝医ッ谺。縺ョ騾壹j縺ァ縺吶

-
"[隲也炊繝峨Λ繧、繝也分蜿キ:][/]繝繧」繝ャ繧ッ繝医Μ蜷/繝輔ぃ繧、繝ォ蜷"
-

FatFs繝「繧ク繝・繝シ繝ォ縺ッ髟キ縺繝輔ぃ繧、繝ォ蜷(LFN)縺翫h縺ウ8.3蠖「蠑上ヵ繧。繧、繝ォ蜷(SFN)縺ォ蟇セ蠢懊@縺ヲ縺縺セ縺吶LFN縺ッ縲(_USE_LFN > 0)縺ョ縺ィ縺堺スソ逕ィ蜿ッ閭ス縺ォ縺ェ繧翫∪縺吶ゅョ繧」繝ャ繧ッ繝医Μ繝サ繧サ繝代Ξ繝シ繧ソ縺ォ縺ッDOS/Windows API縺ィ蜷後§縺'/'縺ィ'\'繧剃スソ逕ィ縺励∪縺吶る」邯壹@縺溘そ繝代Ξ繝シ繧ソ縺ッ辟。隕悶&繧1蛟九→縺励※謇ア繧上l縺セ縺吶ょ髪荳縺ョ驕輔>縺ッ縲∬ォ也炊繝峨Λ繧、繝悶ョ謖螳壹□縺代〒縺吶りォ也炊繝峨Λ繧、繝也分蜿キ縺ッ縲'0''9'縺ョ荳譁蟄励ョ謨ー蟄励→繧ウ繝ュ繝ウ縺ァ謖螳壹@縲∫怐逡・縺励◆蝣エ蜷医ッ繝繝輔か繝ォ繝医サ繝峨Λ繧、繝(0縺セ縺溘ッ繧ォ繝ャ繝ウ繝医サ繝峨Λ繧、繝)縺碁∈謚槭&繧後∪縺吶

-

繝後Ν譁蟄励→蛻カ蠕。譁蟄('\0''\x1F')縺ッ縲√ヱ繧ケ蜷阪ョ邨らォッ縺ィ縺励※隱崎ュ倥&繧後∪縺吶ゅヱ繧ケ蜷阪↓蜈郁。後≠繧九>縺ッ荳ュ縺ォ蜷ォ縺セ繧後k繧ケ繝壹シ繧ケ縺ッ縲´FN讒区舌〒縺ッ蜷榊燕縺ョ荳驛ィ縺ィ縺励※譛牙柑縺ァ縺吶′縲髱朖FN讒区舌〒縺ッ繧ケ繝壹シ繧ケ縺ッ繝代せ蜷阪ョ邨らォッ縺ィ縺励※隱崎ュ倥&繧後∪縺吶

-

讓呎コ匁ァ区(_FS_RPATH == 0)縺ョ縺ィ縺阪ッ縲∝ィ縺ヲ縺ョ繧ェ繝悶ず繧ァ繧ッ繝医′繝ォ繝シ繝医サ繝繧」繝ャ繧ッ繝医Μ縺九i霎ソ繧狗オカ蟇セ繝代せ縺ァ謖螳壹&繧後∪縺吶0S謖蜷代↑繧ォ繝ャ繝ウ繝医サ繝繧」繝ャ繧ッ繝医Μ縺ィ縺縺讎ょソオ縺ッ辟。縺上√∪縺溘ラ繝繝医サ繝繧」繝ャ繧ッ繝医Μ("."繧"..")縺ッ菴ソ逕ィ縺ァ縺阪∪縺帙s縲ゅヱ繧ケ蜷榊磯ュ縺ョ繧サ繝代Ξ繝シ繧ソ縺ッ辟。隕悶&繧後∪縺吶ゅョ繝輔か繝ォ繝医サ繝峨Λ繧、繝也分蜿キ縺ッ蟶ク縺ォ0縺ォ縺ェ繧翫∪縺吶

-

逶ク蟇セ繝代せ繧呈怏蜉ケ(_FS_RPATH == 1)縺ォ縺励◆縺ィ縺阪ッ縲∝郁。後☆繧九そ繝代Ξ繝シ繧ソ縺ョ譛臥┌縺ォ繧医▲縺ヲ讀懃エ「髢句ァ九ョ繧」繝ャ繧ッ繝医Μ縺悟、峨o繧翫√そ繝代Ξ繝シ繧ソ縺後≠繧句エ蜷医ッ繝ォ繝シ繝医サ繝繧」繝ャ繧ッ繝医Μ縺九i縲∫┌縺蝣エ蜷医ッf_chdir髢「謨ー縺ァ險ュ螳壹&繧後k繧ォ繝ャ繝ウ繝医サ繝繧」繝ャ繧ッ繝医Μ縺九i縺ォ縺ェ繧翫∪縺吶ゅ∪縺溘ヱ繧ケ蜷阪↓繝峨ャ繝医サ繝繧」繝ャ繧ッ繝医Μ縺御スソ逕ィ縺ァ縺阪∪縺吶ゅョ繝輔か繝ォ繝医サ繝峨Λ繧、繝也分蜿キ縺ッf_chdrive髢「謨ー縺ァ險ュ螳壹&繧後◆蛟、縺ィ縺ェ繧翫∪縺吶

- - - - - - - - - - - - - -
繝代せ蜷阪ョ萓_FS_RPATH == 0_FS_RPATH == 1
file.txt繝峨Λ繧、繝0縺ョ繝ォ繝シ繝医サ繝繧」繝ャ繧ッ繝医Μ荳九ョ繝輔ぃ繧、繝ォ繧ォ繝ャ繝ウ繝医サ繝峨Λ繧、繝悶ョ繧ォ繝ャ繝ウ繝医サ繝繧」繝ャ繧ッ繝医Μ荳九ョ繝輔ぃ繧、繝ォ
/file.txt繝峨Λ繧、繝0縺ョ繝ォ繝シ繝医サ繝繧」繝ャ繧ッ繝医Μ荳九ョ繝輔ぃ繧、繝ォ繧ォ繝ャ繝ウ繝医サ繝峨Λ繧、繝悶ョ繝ォ繝シ繝医サ繝繧」繝ャ繧ッ繝医Μ荳九ョ繝輔ぃ繧、繝ォ
繝峨Λ繧、繝0縺ョ繝ォ繝シ繝医サ繝繧」繝ャ繧ッ繝医Μ繧ォ繝ャ繝ウ繝医サ繝峨Λ繧、繝悶ョ繧ォ繝ャ繝ウ繝医サ繝繧」繝ャ繧ッ繝医Μ
2:繝峨Λ繧、繝2縺ョ繝ォ繝シ繝医サ繝繧」繝ャ繧ッ繝医Μ繝峨Λ繧、繝2縺ョ繧ォ繝ャ繝ウ繝医サ繝繧」繝ャ繧ッ繝医Μ
2:file1.txt繝峨Λ繧、繝2縺ョ繝ォ繝シ繝医サ繝繧」繝ャ繧ッ繝医Μ荳九ョ繝輔ぃ繧、繝ォ繝峨Λ繧、繝2縺ョ繧ォ繝ャ繝ウ繝医サ繝繧」繝ャ繧ッ繝医Μ荳九ョ繝輔ぃ繧、繝ォ
2:/繝峨Λ繧、繝2縺ョ繝ォ繝シ繝医サ繝繧」繝ャ繧ッ繝医Μ繝峨Λ繧、繝2縺ョ繝ォ繝シ繝医サ繝繧」繝ャ繧ッ繝医Μ
../file.txt辟。蜉ケ隕ェ繝繧」繝ャ繧ッ繝医Μ荳九ョ繝輔ぃ繧、繝ォ
.辟。蜉ケ縺薙ョ繝繧」繝ャ繧ッ繝医Μ
..辟。蜉ケ繧ォ繝ャ繝ウ繝医サ繝繧」繝ャ繧ッ繝医Μ縺ョ隕ェ繝繧」繝ャ繧ッ繝医Μ
dir1/..辟。蜉ケ繧ォ繝ャ繝ウ繝医サ繝繧」繝ャ繧ッ繝医Μ
/..辟。蜉ケ繝ォ繝シ繝医サ繝繧」繝ャ繧ッ繝医Μ(縺昴ョ荳翫ッ霎ソ繧後↑縺)
-
- -


-
-

Unicode API

-

繝輔ぃ繧、繝ォ髢「謨ー縺ョ蜈・蜃コ蜉帙ョ縺縺。繝輔ぃ繧、繝ォ蜷阪d繝代せ蜷阪r謖螳壹☆繧句シ墓焚縺ョ蝙九ッ縲TCHAR縺ァ螳夂セゥ縺輔l縺ヲ縺縺セ縺吶′縲√%繧後ッ騾壼クク縺ッchar縺ョ繧ィ繝ェ繧「繧ケ縺ォ縺ェ縺」縺ヲ縺縺セ縺吶ゅ◎縺励※縲_CODE_PAGE縺ァ謖螳壹&繧後kANSI/OEM繧ウ繝シ繝(SBCS縺セ縺溘ッDBCS)縺ョ譁蟄怜励→縺励※謇ア繧上l縺セ縺吶ゅヵ繧。繧、繝ォ蜷榊・蜃コ蜉帙rUnicode縺ィ縺吶k讒区(_LFN_UNICODE == 1)縺ォ縺励◆縺ィ縺阪ッ縲TCHAR縺ッ繝ッ繧、繝画枚蟄(WCHAR, unsigned short)縺ォ蛻繧頑崛繧上j縲√ヱ繧ケ蜷阪ョ蜈・蜃コ蜉帙↓Unicode繧剃スソ逕ィ縺吶k繧医≧縺ォ縺ェ繧翫∪縺吶ゅ%繧後↓繧医jLFN隕乗シ縺ォ螳悟ィ蟇セ蠢懊→縺ェ繧翫、NSI/OEM繧ウ繝シ繝峨↓縺ェ縺譁蟄(縺溘→縺医ー 笨昶亂笨。笘ク笘ュ縺ェ縺ゥ)繧ゆスソ逕ィ縺ァ縺阪∪縺吶ゅ%縺ョ險ュ螳壹ッ譁蟄怜怜・蜃コ蜉幃未謨ー縺ョ繝繝シ繧ソ蝙九→繧ィ繝ウ繧ウ繝シ繝繧」繝ウ繧ー縺ォ繧ょスア髻ソ繧剃ク弱∴縺セ縺吶ゅΜ繝繝ゥ繝ォ譁蟄怜励r螳夂セゥ縺吶k縺ィ縺阪∵ャ。縺ォ遉コ縺吶h縺縺ォ_T(s)縺翫h縺ウ_TEXT(s)繝槭け繝ュ繧剃スソ縺」縺ヲANSI/OEM縺ィUnicode繧定ェ蜍募繧頑崛縺医☆繧九%縺ィ縺後〒縺阪∪縺吶

-
- f_open(fp, "filename.txt", FA_READ);      /* ANSI/OEM蟆ら畑繧ウ繝シ繝 */
- f_open(fp, L"filename.txt", FA_READ);     /* Unicode蟆ら畑繧ウ繝シ繝 */
- f_open(fp, _T("filename.txt"), FA_READ);  /* 荳。逕ィ繧ウ繝シ繝(閾ェ蜍募繧頑崛縺) */
-
-
- -


-
-

繝懊Μ繝・繝シ繝邂。逅

-

繝繝輔か繝ォ繝医ョ讒区舌〒縺ッ縲√◎繧後◇繧後ョ隲也炊繝峨Λ繧、繝悶ッ蜷後§逡ェ蜿キ縺ョ迚ゥ逅繝峨Λ繧、繝悶↓1:1縺ァ邨舌ウ縺、縺代i繧後※縺縺ヲ縲∬ェ蜍墓、懷コ讖溯ス縺ォ繧医j縺昴ョ迚ゥ逅繝峨Λ繧、繝紋ク翫ョ荳縺、縺ョFAT繝懊Μ繝・繝シ繝縺後槭え繝ウ繝医&繧後∪縺吶FAT繝懊Μ繝・繝シ繝縺ョ讀懷コ縺ッ縲√そ繧ッ繧ソ0縲∫ャャ荳蛹コ逕サ縲∫ャャ莠悟玄逕サ縲∫ャャ荳牙玄逕サ縲∫ャャ蝗帛玄逕サ縺ョ鬆縺ォ陦後o繧後∪縺吶

-

_MULTI_PARTITION縺ォ1繧呈欠螳壹☆繧九→縲√◎繧後◇繧後ョ隲也炊繝峨Λ繧、繝悶↓蟇セ縺励※蛟句挨縺ォ迚ゥ逅繝峨Λ繧、繝也分蜿キ縺ィ蛹コ逕サ繧呈欠螳壹〒縺阪k繧医≧縺ォ縺ェ繧翫∪縺吶ゅ%縺ョ讒区舌〒縺ッ縲∬ォ也炊繝峨Λ繧、繝悶→蛹コ逕サ縺ョ蟇セ蠢懊r隗」豎コ縺吶k縺溘a縺ョ繝繝シ繝悶Ν繧呈ャ。縺ォ遉コ縺吶h縺縺ォ螳夂セゥ縺吶k蠢隕√′縺ゅj縺セ縺吶

-
-萓:隲也炊繝峨Λ繧、繝0ス2繧堤黄逅繝峨Λ繧、繝0(髱槭Μ繝繝シ繝舌ヶ繝ォ)縺ョ3縺、縺ョ蝓コ譛ャ蛹コ逕サ縺ォ蜑イ繧雁ス薙※縲
-   隲也炊繝峨Λ繧、繝3繧堤黄逅繝峨Λ繧、繝1(繝ェ繝繝シ繝舌ヶ繝ォ)縺ォ蜑イ繧雁ス薙※繧句エ蜷医
-
-PARTITION VolToPart[] = {
-    {0, 1},     /* 隲也炊繝峨Λ繧、繝 0 ==> 迚ゥ逅繝峨Λ繧、繝 0, 隨ャ1蛹コ逕サ */
-    {0, 2},     /* 隲也炊繝峨Λ繧、繝 1 ==> 迚ゥ逅繝峨Λ繧、繝 0, 隨ャ2蛹コ逕サ */
-    {0, 3},     /* 隲也炊繝峨Λ繧、繝 2 ==> 迚ゥ逅繝峨Λ繧、繝 0, 隨ャ3蛹コ逕サ */
-    {1, 0}      /* 隲也炊繝峨Λ繧、繝 3 ==> 迚ゥ逅繝峨Λ繧、繝 1, 閾ェ蜍墓、懷コ */
-};
-
-隲也炊繝峨Λ繧、繝悶→迚ゥ逅繝峨Λ繧、繝悶ョ髢「菫 -

隍謨ー蛹コ逕サ謖螳壹r菴ソ逕ィ縺吶k蝣エ蜷医∵ャ。縺ョ轤ケ縺ォ豕ィ諢上@縺ェ縺代l縺ー縺ェ繧翫∪縺帙s縲 -

    -
  • 繝槭え繝ウ繝亥庄閭ス縺ェ蛹コ逕サ縺ッ蝓コ譛ャ蛹コ逕サ縺ョ縺ソ縺ァ縲∵僑蠑オ蛹コ逕サ蜀縺ォ縺ッ蟇セ蠢懊@縺ェ縺縲
  • -
  • 隍謨ー縺ョ蛹コ逕サ繧呈戟縺、迚ゥ逅繝峨Λ繧、繝悶ッ縲髱槭Μ繝繝シ繝舌ヶ繝ォ縺ァ縺ェ縺代l縺ー縺ェ繧峨↑縺縲
  • -
-
- - - diff --git a/stmhal/fatfs/doc/ja/forward.html b/stmhal/fatfs/doc/ja/forward.html deleted file mode 100644 index ffb2e60a3..000000000 --- a/stmhal/fatfs/doc/ja/forward.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - -FatFs - f_forward - - - - -
-

f_forward

-

ファイルからデータを読み出し、送信ストリームに直接転送します。

-
-FRESULT f_forward (
-  FIL* fp,                         /* [IN] ファイル・オブジェクト構造体 */
-  UINT (*func)(const BYTE*,UINT),  /* [IN] データ転送関数 */
-  UINT btf,                        /* [IN] 転送するバイト数 */
-  UINT* bf                         /* [OUT] 転送されたバイト数 */
-);
-
-
- -
-

引数

-
-
fp
-
ファイル・オブジェクト構造体へのポインタを指定します。
-
func
-
データを渡すユーザ定義関数へのポインタを指定します。この関数の仕様はサンプルを参照してください。
-
btf
-
転送するバイト数(0〜UINTの最大値)を指定します。
-
bf
-
実際に転送されたバイト数を格納する変数を指すポインタを指定します。
-
-
- - - - - -
-

解説

-

ファイルのデータをバッファに読み出さずに送信ストリームに直接転送します。アプリケーション側でデータ・バッファを必要としないので、メモリの限られた環境で有効です。リード/ライト・ポインタは転送されたバイト数だけ進みます。指定されたバイト数の転送中にファイルの終端に達した場合や送信ストリームがビジーになった場合、*bfbtfよりも小さくなります。

-
- - -
-

対応情報

-

_USE_FORWARD == 1で、且つ_FS_TINY == 1のときに使用可能です。

-
- - -
-

使用例(オーディオ再生)

-
-/*-----------------------------------------------------------------------*/
-/* f_forward関数から呼ばれるデータ送信関数の例                           */
-/*-----------------------------------------------------------------------*/
-
-UINT out_stream (   /* 戻り値: 転送されたバイト数またはストリームの状態 */
-    const BYTE *p,  /* 転送するデータを指すポインタ */
-    UINT btf        /* >0: 転送を行う(バイト数). 0: ストリームの状態を調べる */
-)
-{
-    UINT cnt = 0;
-
-
-    if (btf == 0) {     /* センス要求 */
-        /* ストリームの状態を返す (0: ビジー, 1: レディ) */
-        /* 一旦、レディを返したら、続く転送要求で少なくとも1バイトは */
-        /* 転送されないと f_forward関数は FR_INT_ERR となる。 */
-        if (FIFO_READY) cnt = 1;
-    }
-    else {              /* 転送要求 */
-        do {    /* 全てのバイトを転送するか、ストリームがビジーになるまで繰り返す */
-            FIFO_PORT = *p++;
-            cnt++;
-        } while (cnt < btf && FIFO_READY);
-    }
-
-    return cnt;
-}
-
-
-/*-----------------------------------------------------------------------*/
-/* f_forward関数の使用例                                                 */
-/*-----------------------------------------------------------------------*/
-
-FRESULT play_file (
-    char *fn        /* 再生するオーディオ・ファイル名を指すポインタ */
-)
-{
-    FRESULT rc;
-    FIL fil;
-    UINT dmy;
-
-    /* ファイルを読み出しモードで開く */
-    rc = f_open(&fil, fn, FA_READ);
-    if (rc) return rc;
-
-    /* 全てのデータが転送されるかエラーが発生するまで続ける */
-    while (rc == FR_OK && fil.fptr < fil.fsize) {
-
-        /* ほかの処理... */
-
-        /* 定期的または要求に応じてデータをストリームに送出する */
-        rc = f_forward(&fil, out_stream, 1000, &dmy);
-    }
-
-    /* ファイルを閉じて戻る */
-    f_close(&fil);
-    return rc;
-}
-
-
- - -
-

参照

-

f_open, fgets, f_write, f_close, FIL

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/getcwd.html b/stmhal/fatfs/doc/ja/getcwd.html deleted file mode 100644 index bbc14ab9c..000000000 --- a/stmhal/fatfs/doc/ja/getcwd.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - -FatFs - f_getcwd - - - - -
-

f_getcwd

-

カレント・ディレクトリを得ます

-
-FRESULT f_getcwd (
-  TCHAR* buff, /* [OUT] バッファ */
-  UINT len     /* [IN] バッファ・サイズ */
-);
-
-
- -
-

引数

-
-
buff
-
カレント・ディレクトリの文字列を格納するバッファ
-
len
-
TCHAR単位のバッファ・サイズ
-
-
- - - - - -
-

解説

-

カレント・ドライブのカレント・ディレクトリのフル・パス文字列を取得します。_VOLUMESが2以上のときは、論理ドライブ番号の付加されたフル・パス名となります。

-
- - -
-

対応情報

-

_FS_RPATH == 2のとき使用可能です。

-
- - -
-

参照

-

f_chdrive, f_chdir

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/getfree.html b/stmhal/fatfs/doc/ja/getfree.html deleted file mode 100644 index b1d71b041..000000000 --- a/stmhal/fatfs/doc/ja/getfree.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - -FatFs - f_getfree - - - - -
-

f_getfree

-

論理ドライブ上の未使用クラスタ数を取得します。

-
-FRESULT f_getfree (
-  const TCHAR* path,  /* [IN] 対象ドライブを指定します */
-  DWORD* nclst,       /* [OUT] 空きクラスタ数を格納する変数へのポインタ */
-  FATFS** fatfs       /* [OUT] ファイル・システム・オブジェクトを指すポインタへのポインタ */
-);
-
-
- -
-

引数

-
-
path
-
調べる対象の論理ドライブを示すパス名を示すヌル文字'\0'終端の文字列へのポインタを指定します。ヌル文字列はカレント・ドライブを意味します。
-
nclst
-
空きクラスタ数を格納するDWORD変数へのポインタを指定します。
-
fatfs
-
対象ドライブのファイル・システム・オブジェクトを指すポインタが返されます。
-
-
- - - - - -
-

解説

-

論理ドライブ上の空きクラスタ数を取得します。返されたファイル・システム・オブジェクトのcsizeメンバがクラスタあたりのセクタ数を示しているので、これを元に実際の空きサイズが計算できます。FAT32ボリュームにおいては、FSINFOが実際の状態と同期していない場合、不正確な空きサイズを返す可能性があります。この問題を避けるため、_FS_NOFSINFOオプションでFSINFOを無視して初回はフルFATスキャンをするように設定することもできます。

-
- - -
-

対応情報

-

_FS_READONLY == 0で、且つ_FS_MINIMIZE == 0のとき使用可能です。

-
- - -
-

使用例

-
-    FATFS *fs;
-    DWORD fre_clust, fre_sect, tot_sect;
-
-
-    /* ドライブ1のボリューム情報と空きクラスタ数を得る */
-    res = f_getfree("1:", &fre_clust, &fs);
-    if (res) die(res);
-
-    /* 全セクタ数と空きセクタ数を計算 */
-    tot_sect = (fs->n_fatent - 2) * fs->csize;
-    fre_sect = fre_clust * fs->csize;
-
-    /* ボリューム全体のサイズと空きのサイズを表示 (512バイト/セクタと仮定) */
-    printf("%10lu KiB total drive space.\n%10lu KiB available.\n",
-           tot_sect / 2, fre_sect / 2);
-
-
- - -
-

参照

-FATFS -
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/getlabel.html b/stmhal/fatfs/doc/ja/getlabel.html deleted file mode 100644 index e2df997a9..000000000 --- a/stmhal/fatfs/doc/ja/getlabel.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - -FatFs - f_getlabel - - - - -
-

f_getlabel

-

ボリューム・ラベルを取得します。

-
-FRESULT f_getlabel (
-  const TCHAR* path,  /* [IN] 対象ドライブ */
-  TCHAR* name,        /* [OUT] ボリューム名を格納するバッファ */
-  DWORD* sn           /* [OUT] ボリューム・シリアル番号を格納する変数 */
-);
-
-
- -
-

引数

-
-
path
-
対象となる論理ドライブのパス名を示すヌル文字'\0'終端の文字列へのポインタを指定します。ヌル文字列の場合は、デフォルト・ドライブを指定したことになります。
-
name
-
ボリューム名を格納する配列へのポインタを指定します。少なくとも12要素のサイズが必要です。ボリューム名がない場合はヌル文字列が返されます。この情報が不要なときはヌル・ポインタを指定してください。
-
sn
-
ボリューム・シリアル番号を格納するDWORD変数へのポインタを指定します。この情報が不要なときはヌル・ポインタを指定してください。
-
-
- - - - - -
-

対応情報

-

_USE_LABEL == 1のときに使用可能です。

-
- - -
-

使用例

-
-    char str[12];
-
-    /* デフォルト・ドライブのボリューム名を得る */
-    f_getlabel("", str, 0);
-
-    /* ドライブ2のボリューム名を得る */
-    f_getlabel("2:", str, 0);
-
-
- - -
-

参照

-f_setlabel -
- - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/gets.html b/stmhal/fatfs/doc/ja/gets.html deleted file mode 100644 index 84323534a..000000000 --- a/stmhal/fatfs/doc/ja/gets.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - -FatFs - f_gets - - - - -
-

f_gets

-

ファイルから文字列を読み出します。

-
-TCHAR* f_gets (
-  TCHAR* buff, /* [OUT] バッファ */
-  int len,     /* [IN] バッファのサイズ */
-  FIL* fp      /* [IN] ファイル・オブジェクト */
-);
-
-
- -
-

引数

-
-
buff
-
文字列を読み出すバッファを指すポインタを指定します。
-
len
-
バッファのサイズを要素数で指定します。
-
fp
-
ファイル・オブジェクト構造体へのポインタを指定します。
-
-
- - -
-

戻り値

-

関数が成功するとbuffが返されます。

-
- - -
-

解説

-

この関数はf_read()のラッパー関数です。読み出し動作は、最初の'\n'を読み込むか、ファイル終端に達するか、len - 1文字を読み出すまで続きます。読み込まれた文字列の終端には'\0'が付加されます。既にファイル終端で1文字も読み込まれなかったとき、または何らかのエラーが発生したときは関数は失敗しヌル・ポインタを返します。ファイル終端かエラーかはf_eof(),f_error()マクロで調べられます。

-

APIにUnicodeが選択(_LFN_UNICODEが1)されているときは、buffはUTF-16文字列になりますが、ファイル上のエンコードは、_STRF_ENCODEオプションで選択できます。それ以外の時は無変換(1バイト/1文字)で読み出します。

-
- - -
-

対応情報

-

_USE_STRFUNCが1または2のとき使用可能です。2のときは、ファイルに含まれる'\r'が取り除かれてバッファに読み込まれます。

-
- - - - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/lseek.html b/stmhal/fatfs/doc/ja/lseek.html deleted file mode 100644 index 557885262..000000000 --- a/stmhal/fatfs/doc/ja/lseek.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - -FatFs - f_lseek - - - - -
-

f_lseek

-

ファイルのリード/ライト・ポインタを移動します。また、高速シーク機能使用時にはCLMT(後述)の作成にも使用します。

-
-FRESULT f_lseek (
-  FIL* fp,    /* [IN] ファイル・オブジェクト構造体へのポインタ */
-  DWORD ofs   /* [IN] 移動先オフセット */
-);
-
-
- -
-

引数

-
-
fp
-
対象となるファイル・オブジェクト構造体へのポインタを指定します。
-
ofs
-
移動先のオフセット(リード/ライト・ポインタ)値。ファイル先頭からのオフセットをバイト単位で指定します。
-
-
- - - - - -
-

解説

-

ファイルのリード/ライト・ポインタ(次に読み出し・書き込みされるバイトのオフセット)を移動します。オフセットの原点はファイル先頭です。書き込みモードでファイル・サイズより大きな値を指定すると、そこまでファイル・サイズが拡張され、拡張された部分のデータは未定義となります。データを遅延無く高速に書き込みたいときは、予めこの関数で必要なサイズまでファイル・サイズを拡張しておくと良いでしょう。f_lseek()が正常終了したあとは、リード/ライト・ポインタが正しく移動したかチェックするべきです。リード/ライト・ポインタが指定より小さいときは、次の原因が考えられます。

-
    -
  • 非書き込みモードまたは高速シーク・モードのため、ファイル・サイズでクリップされた。
  • -
  • ファイル拡張中にディスクが満杯になった。
  • -
-

_USE_FASTSEEKが1で、且つファイル・オブジェクトのcltblメンバがNULL以外(f_open()でNULLに設定される)のとき、高速シーク・モードになります。これはファイルのクラスタ配置情報(CLMT)をメモリ上に保持しておくことにより、FATにアクセスすることなく後方シークやロング・シークを高速に行う機能です。高速シーク・モードは、f_read()/f_wtite()の動作にも適用されます。高速シーク・モードではf_wtite()/f_lseek()によるファイル・サイズの拡張はできません。

-

高速シーク動作を行う前に、CLMTを作成しておく必要があります。これを作成するには、まずCLMT格納バッファ(DWORD型配列)を準備し、cltblメンバにそのポインタをセットします。そして、配列の先頭要素にその配列のサイズ(要素数)を入れ、f_lseek()ofsCREATE_LINKMAPを指定して呼び出します。関数が成功するとCLMTが作成され、以降のf_read()/f_write()/f_lseek()ではFATへのアクセスは発生しません。FR_NOT_ENOUGH_COREで失敗したときは配列サイズが不足で、先頭要素には実際に必要となる要素数が返されます。必要な要素数は、(ファイルの分割数 + 1) * 2 です。たとえば、ファイルが5つのフラグメントに分断されているときに必要な要素数は、12となります。

-
- - -
-

対応情報

-

_FS_MINIMIZE < 3のとき使用可能です。

-
- - -
-

使用例

-
-    /* ファイルを開く */
-    fp = malloc(sizeof (FIL));
-    res = f_open(fp, "file.dat", FA_READ|FA_WRITE);
-    if (res) ...
-
-    /* ファイル・オフセット5000へ移動 */
-    res = f_lseek(fp, 5000);
-
-    /* ファイル終端へ移動(ファイル追記の準備) */
-    res = f_lseek(fp, f_size(fp));
-
-    /* 3000バイト進める */
-    res = f_lseek(fp, f_tell(fp) + 3000);
-
-    /* 2000バイト戻す (ラップアラウンドに注意) */
-    res = f_lseek(fp, f_tell(fp) - 2000);
-
-
-/* クラスタ先行割り当て (ストリーミング・ライト時のバッファ・オーバーラン防止) */
-
-    res = f_open(fp, "record.wav", FA_CREATE_NEW | FA_WRITE);    /* ファイル作成 */
-
-    res = f_lseek(fp, MAX_SIZE);             /* 十分なクラスタの先行割り当て */
-    if (res || f_tell(fp) != PRE_SIZE) ...   /* 正しくファイルが拡張されたかチェック */
-
-    res = f_lseek(fp, DATA_START);           /* データ・ストリームの記録(アロケーションディレイ無し) */
-    ...
-
-    res = f_truncate(fp);                    /* 不要領域の切り捨て */
-    res = f_lseek(fp, 0);                    /* ヘッダの記録 */
-    ...
-
-    res = f_close(fp);
-
-
-/* 高速シーク機能を使う */
-
-    DWORD clmt[SZ_TBL];                    /* リンク・マップ・テーブル格納バッファ */
-
-    res = f_lseek(fp, ofs1);               /* 通常シーク (オープン時、cltblはNULLに初期化される) */
-
-    fp->cltbl = clmt;                      /* 高速シーク機能の有効化 */
-    clmt[0] = SZ_TBL;                      /* 先頭要素に配列要素数をセット */
-    res = f_lseek(fp, CREATE_LINKMAP);     /* CLMTの作成 */
-    ...
-
-    res = f_lseek(fp, ofs2);               /* 以降、f_read/f_write/f_lseekでFATアクセスは発生しない */
-
-
- - -
-

参照

-

f_open, FIL

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/mkdir.html b/stmhal/fatfs/doc/ja/mkdir.html deleted file mode 100644 index ef107d3ff..000000000 --- a/stmhal/fatfs/doc/ja/mkdir.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - -FatFs - f_mkdir - - - - -
-

f_mkdir

-

ディレクトリを作成します。

-
-FRESULT f_mkdir (
-  const TCHAR* path /* [IN] 作成するディレクトリ名へのポインタ */
-);
-
-
- -
-

引数

-
-
path
-
作成するディレクトリのパス名を示すヌル文字'\0'終端の文字列へのポインタを指定します。
-
-
- - - - - -
-

解説

-

空のディレクトリを作成します。

-
- - -
-

対応情報

-

_FS_READONLY == 0で、且つ_FS_MINIMIZE == 0のとき使用可能です。

-
- - -
-

使用例

-
-    res = f_mkdir("sub1");
-    if (res) die(res);
-    res = f_mkdir("sub1/sub2");
-    if (res) die(res);
-    res = f_mkdir("sub1/sub2/sub3");
-    if (res) die(res);
-
-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/mkfs.html b/stmhal/fatfs/doc/ja/mkfs.html deleted file mode 100644 index f882dd21e..000000000 --- a/stmhal/fatfs/doc/ja/mkfs.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - -FatFs - f_mkfs - - - - -
-

f_mkfs

-

論理ドライブ上にFATボリュームを作成(フォーマット)します。

-
-FRESULT f_mkfs (
-  const TCHAR* path, /* [IN] 論理ドライブ番号 */
-  BYTE  sfd,         /* [IN] 区画作成方法 */
-  UINT  au           /* [IN] クラス・タサイズ */
-);
-
-
- -
-

引数

-
-
path
-
フォーマット対象の論理ドライブを示すパス名を示すヌル文字'\0'終端の文字列へのポインタを指定します。ドライブ番号を含まない場合は、カレント・ドライブを意味します。
-
sfd
-
パーテーション形式。(0(FDISK) または 1(SFD))
-
au
-
クラスタ・サイズをバイト単位で指定します。対象ドライブのセクタ・サイズのn倍(n = 1〜128で、2の累乗)でなければなりません。0を指定した場合、ボリュームのサイズに応じたデフォルトのクラスタ・サイズが選択されます。
-
-
- - - -
-

説明

-

物理ドライブ上にFATボリュームを作成します。FDISK形式が指定された場合は、物理ドライブ全体を占める基本区画(パーテーション)が作成され、その中にFATボリュームが作成されます。SFD形式では、FATボリュームは物理ドライブの先頭セクタからベタで作成されます。

-

マルチパーテーション機能(_MULTI_PARTITION)により、指定された論理ドライブが特定の区画(1〜4)に結び付けられている場合、その区画の中にFATボリュームが作成されます。この場合、sfdは無視され、また対応する物理ドライブはこれに先立ち、f_fdisk()または他のツールで適切に区画設定されている必要があります。

-

パーテーション形式には、FDISK形式とSFD形式の二通りあります。FDISK形式は、ハードディスク、MMC、SDC、CFC、U Diskなどで標準的に使用されます。FDISK形式では一台の物理ドライブ上に一つまたは複数の区画を作成することができます。管理情報はMBR(物理ドライブの先頭セクタ)に記録されます。SFD形式は単に何の分割も行わない形式で、ボリュームは物理ドライブの先頭セクタから開始します。SFD形式は、フロッピーディスク、マイクロドライブ、光学ディスク、およびその他スーパーフロッピーメディアで標準的に使用されています。

-

FATタイプ(FAT12/FAT16/FAT32)は、その論理ドライブ上のクラスタ数によってのみ決定される決まり[FAT仕様書より]になっていて、それ以外の要因はありません。したがって、どのFATタイプになるかはドライブ・サイズとクラスタ・サイズに依存します。クラスタ・サイズは大きくするほど性能が上がり、ディスク利用効率は落ちます。

-

クラスタ数がFATタイプの境界に近くなるときは、FR_MKFS_ABORTEDで関数が失敗する可能性があります。

-
- - -
-

対応情報

-

_FS_READONLY == 0で、且つ_USE_MKFS == 1のとき使用可能です。

-
- - - - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/mount.html b/stmhal/fatfs/doc/ja/mount.html deleted file mode 100644 index daf845015..000000000 --- a/stmhal/fatfs/doc/ja/mount.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - -FatFs - f_mount - - - - -
-

f_mount

-

論理ドライブにファイル・システム・オブジェクトを登録・抹消します。

-
-FRESULT f_mount (
-  FATFS*       fatfs,  /* [IN] ファイル・システム・オブジェクト */
-  const TCHAR* path,   /* [IN] 論理ドライブ番号 */
-  BYTE         opt     /* [IN] オプション */
-);
-
-
- -
-

引数

-
-
fatfs
-
登録するファイル・システム・オブジェクトへのポインタ。
-
path
-
対象となる論理ドライブのパス名を示すヌル文字'\0'終端の文字列へのポインタを指定します。ドライブ番号を含まない場合は、デフォルト・ドライブを指定したことになります。
-
opt
-
ファイル・システム・オブジェクトの登録と同時にマウント動作を行うかどうかを指定するフラグ。登録抹消のときは意味を持ちません。
-
-
- - - - -
-

解説

-

FatFsモジュールでは、それぞれの論理ドライブにファイル・システム・オブジェクトというワーク・エリアが必要です。この関数は論理ドライブにファイル・システム・オブジェクトを登録したり抹消したりします。何らかのファイル関数を使用する前に、この関数でその論理ドライブのファイル・システム・オブジェクトを与えておかなければなりません。fatfsにヌル・ポインタを指定すると、その論理ドライブのファイル・システム・オブジェクトの登録は抹消されるだけです。登録抹消されたファイル・システム・オブジェクトのメモリは解放できます。操作対象の論理ドライブ上に開かれているファイルやディレクトリがあった場合、それらは全て無効になります。この関数の内部処理は次のような順に行われます。

-
    -
  1. 対象の論理ドライブをpathから得る。
  2. -
  3. 既に登録されているファイル・システム・オブジェクトはクリアし、登録を解除する。
  4. -
  5. fatfsが有効なポインタのときは、そのファイル・システム・オブジェクトをクリアし登録する。
  6. -
  7. マウント動作が指定されているときは、それを実行する。
  8. -
-

optに0を指定すると、マウント動作(物理ドライブの初期化、FATボリュームの検索、BPBを解析しファイル・システム・オブジェクトを初期化)は行われず、関数は物理ドライブの状態に関わらず常に成功します。関数内では下位レイヤへのアクセスは発生せず、指定されたファイル・システム・オブジェクトをクリア(無効化)し、そのアドレスを内部配列に登録するだけです。単に登録済みのファイル・システム・オブジェクトをクリアする目的にも使えます。そして、続いてボリュームへのアクセスが行われたとき次のうちいずれかでも真の場合は、実際のマウント動作が行われます。

-
    -
  • ファイル・システム・オブジェクトがクリア(無効)状態(f_mount()の実行による)
  • -
  • 物理ドライブが未初期化状態(システム・リセットやメディアの取り外しによる)
  • -
-

optに1を指定すると、登録に続いてマウント動作が行われます。マウントに失敗すると対応するエラーを返しますが、登録は有効なので続くボリュームへのアクセスで再びマウント動作が実行されます。

-

下位レイヤの実装上メディア交換の検出がサポートされない(disk_status()に反映されない)ときは、アプリケーションはメディア交換の後この関数でファイル・システム・オブジェクトを明示的にクリアして再マウントが正常に行えるようにする必要があります。

-
- - -
-

対応情報

-

全ての構成で使用可能です。

-
- - -
-

参照

-

f_open, FATFS

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/open.html b/stmhal/fatfs/doc/ja/open.html deleted file mode 100644 index a89a178f7..000000000 --- a/stmhal/fatfs/doc/ja/open.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - -FatFs - f_open - - - - -
-

f_open

-

ファイルをオープンまたは作成します。

-
-FRESULT f_open (
-  FIL* fp,           /* [OUT] 空のファイル・オブジェクト構造体へのポインタ */
-  const TCHAR* path, /* [IN] ファイルのフルパス名へのポインタ */
-  BYTE mode          /* [IN] モードフラグ */
-);
-
-
- -
-

引数

-
-
fp
-
新しく作成するファイル・オブジェクト構造体へのポインタを指定します。以降、そのファイルを閉じるまでこのファイル・オブジェクトを使用してファイル操作をします。
-
path
-
開く(または作成する)ファイルの ファイル名を示すヌル文字'\0'終端の文字列へのポインタを指定します。
-
mode
-
ファイルのアクセス方法やオープン方法を決めるフラグです。このパラメータには次の組み合わせを指定します。
- - - - - - - - -
意味
FA_READ読み出しモードで開きます。読み書きする場合はFA_WRITEと共に指定します。
FA_WRITE書き込みモードで開きます。読み書きする場合はFA_READと共に指定します。
FA_OPEN_EXISTING既存のファイルを開きます。ファイルが無いときはエラーになります。(デフォルト)
FA_OPEN_ALWAYS既存のファイルを開きます。ファイルが無いときはファイルを作成します。追記の場合は、この方法でオープンした後、f_lseek()でファイルの最後尾に移動してください。
FA_CREATE_NEWファイルを作成します。同名のファイルがある場合は、FR_EXISTで失敗します。
FA_CREATE_ALWAYSファイルを作成します。同名のファイルがある場合は、サイズを0にしてから開きます。
-
-
-
- - - - - -
-

解説

-

既存のファイルを開いたり、新しいファイルを作成します。関数が成功するとファイル・オブジェクトが作成され、以降そのファイルに対するアクセスに使用します。ファイルを閉じるときは、f_close()を使用します。何らかの変更が行われたファイルがその後正しく閉じられなかった場合、そのファイルが破損する場合があります。

-

既に開かれているファイルを開く必要がある場合は、多重アクセス制御を参照してください。しかし、一つのファイルに対する書き込みモードを含む重複オープンは常に禁止です。

-

ファイル・アクセスを開始する前に、f_mount()を使ってそれぞれの論理ドライブにワーク・エリア(ファイル・システム・オブジェクト)を与える必要があります。この初期化の後、その論理ドライブに対して全てのファイル関数が使えるようになります。

-
- - -
-

対応情報

-

全ての構成で使用可能です。_FS_READONLY == 1のときは、FA_WRITE, FA_CREATE_ALWAYS, FA_CREATE_NEW, FA_OPEN_ALWAYSの各フラグはサポートされません。

-
- - -
-

使用例

-
-/* テキストファイルを読み出して表示 */
-
-FATFS FatFs;   /* 論理ドライブのワーク・エリア(ファイル・システム・オブジェクト) */
-
-int main (void)
-{
-    FIL fil;       /* ファイル・オブジェクト */
-    char line[82]; /* 行バッファ */
-    FRESULT fr;    /* 戻り値 */
-
-
-    /* デフォルト・ドライブにワークエリアを与える */
-    f_mount(&FatFs, "", 0);
-
-    /* テキスト・ファイルを開く */
-    fr = f_open(&fil, "message.txt", FA_READ);
-    if (fr) return (int)fr;
-
-    /* 1行ずつ読み出して表示 */
-    while (f_gets(line, sizeof line, &fil))
-        printf(line);
-
-    /* ファイルを閉じる */
-    f_close(&fil);
-
-    return 0;
-}
-
-
-/* ドライブ1のファイル "file.bin" をドライブ0へコピー */
-
-int main (void)
-{
-    FATFS fs[2];         /* 論理ドライブのワークエリア(ファイル・システム・オブジェクト) */
-    FIL fsrc, fdst;      /* ファイル・オブジェクト */
-    BYTE buffer[4096];   /* File copy buffer */
-    FRESULT fr;          /* FatFs function common result code */
-    UINT br, bw;         /* File R/W count */
-
-    /* ドライブ0,1にワーク・エリアを与える */
-    f_mount(&fs[0], "0:", 0);
-    f_mount(&fs[1], "1:", 0);
-
-    /* ドライブ1のコピー元ファイルを開く */
-    res = f_open(&fsrc, "1:file.dat", FA_OPEN_EXISTING | FA_READ);
-    if (fr) return (int)fr;
-
-    /* ドライブ0にコピー先ファイルを作成する */
-    res = f_open(&fdst, "0:file.dat", FA_CREATE_ALWAYS | FA_WRITE);
-    if (fr) return (int)fr;
-
-    /* コピー元からコピー先にデータ転送する */
-    for (;;) {
-        res = f_read(&fsrc, buffer, sizeof buffer, &br); /* コピー元からから読み出す */
-        if (res || br == 0) break;   /* エラーかファイル終端 */
-        res = f_write(&fdst, buffer, br, &bw);           /* それをコピー先に書き込む */
-        if (res || bw < br) break;   /* エラーかディスク満杯 */
-    }
-
-    /* 全てのファイルを閉じる */
-    f_close(&fsrc);
-    f_close(&fdst);
-
-    /* ワーク・エリアを開放する */
-    f_mount(NULL, "0:", 0);
-    f_mount(NULL, "1:", 0);
-
-    return (int)fr;
-}
-
-
- - -
-

参照

-

f_read, f_write, f_close, FIL, FATFS

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/opendir.html b/stmhal/fatfs/doc/ja/opendir.html deleted file mode 100644 index ffaf2cac8..000000000 --- a/stmhal/fatfs/doc/ja/opendir.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - -FatFs - f_opendir - - - - -
-

f_opendir

-

ディレクトリを開きます。

-
-FRESULT f_opendir (
-  DIR* dp,           /* [OUT] ディレクトリ・ブジェクト構造体へのポインタ */
-  const TCHAR* path  /* [IN] ディレクトリ名へのポインタ */
-);
-
-
- -
-

引数

-
-
dp
-
空のディレクトリ・オブジェクト構造体へのポインタを指定します。
-
path
-
オープンするディレクトリのパス名を示すヌル文字'\0'終端の文字列へのポインタを指定します。
-
-
- - - - - -
-

解説

-

ディレクトリを開きます。正常終了したら、作成されたDIR構造体を使ってこのディレクトリの項目を順次読み出せます。

-
- - -
-

対応情報

-

_FS_MINIMIZE <= 1のとき使用可能になります。

-
- - -
-

参照

-

f_readdir, f_closedir, DIR

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/printf.html b/stmhal/fatfs/doc/ja/printf.html deleted file mode 100644 index 2f5f73043..000000000 --- a/stmhal/fatfs/doc/ja/printf.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - -FatFs - f_printf - - - - -
-

f_printf

-

ファイルに書式化文字列を書き込みます。

-
-int f_printf (
-  FIL* fp,           /* [IN] ファイル・オブジェクト */
-  const TCHAR* fmt,  /* [IN] 書式制御文字列 */
-  ...
-);
-
-
- -
-

引数

-
-
fp
-
ファイル・オブジェクト構造体へのポインタを指定します。
-
fmt
-
ヌル文字'\0'終端の書式制御文字列を指すポインタを指定します。ヌル文字は書き込まれません。
-
...
-
オプションの引数。
- -
-
- - -
-

戻り値

-

文字列が正常に書き込まれると、書き込まれた文字数が返されます。ディスクが満杯またはその他エラーにより正常に書き込まれなかったときは、関数は失敗しEOF (-1)が返されます。

-
- - -
-

解説

-

この関数は、f_putc()およびf_puts()のラッパー関数です。書式制御機能はC標準ライブラリのサブセットとなっていて、書式制御文字は次に示すものが使用可能です。

-
    -
  • タイプ: c C s S d D u U x X b B
  • -
  • 精度指定: l L
  • -
  • フラグ: 0 -
  • -
-
- - -
-

対応情報

-

_FS_READONLY == 0で、且つ_USE_STRFUNCが 1または 2のとき使用可能になります。2の時は、出力に含まれる'\n'"\r\n"に展開されてファイルに書き込まれます。

-

APIにUnicodeが選択(_LFN_UNICODEが1)されているときは、fmtはUnicode文字列になりますが、ファイル上のエンコードは、_STRF_ENCODEオプションで選択できます。それ以外の時は無変換(1バイト/1文字)で書き込みます。

-
- - -
-

使用例

-
-    f_printf(&fil, "%d", 1234);            /* "1234" */
-    f_printf(&fil, "%6d,%3d%%", -200, 5);  /* "  -200,  5%" */
-    f_printf(&fil, "%-6u", 100);           /* "100   " */
-    f_printf(&fil, "%ld", 12345678L);      /* "12345678" */
-    f_printf(&fil, "%04x", 0xAB);          /* "00ab" */
-    f_printf(&fil, "%08LX", 0x123ABCL);    /* "00123ABC" */
-    f_printf(&fil, "%016b", 0x550F);       /* "0101010100001111" */
-    f_printf(&fil, "%s", "String");        /* "String" */
-    f_printf(&fil, "%5s", "abc");          /* "  abc" */
-    f_printf(&fil, "%-5s", "abc");         /* "abc  " */
-    f_printf(&fil, "%c", 'a');             /* "a" */
-    f_printf(&fil, "%f", 10.0);            /* 浮動小数点は未サポート */
-
-
- - - - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/putc.html b/stmhal/fatfs/doc/ja/putc.html deleted file mode 100644 index f74c0737c..000000000 --- a/stmhal/fatfs/doc/ja/putc.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_putc - - - - -
-

f_putc

-

ファイルに文字を書き込みます。

-
-int f_putc (
-  TCHAR chr,  /* [IN] 書き込む文字 */
-  FIL* fp     /* [IN] ファイル・オブジェクト */
-);
-
-
- -
-

引数

-
-
chr
-
書き込む文字を指定します。
-
fp
-
ファイル・オブジェクト構造体へのポインタを指定します。
-
-
- - -
-

戻り値

-

文字が正常に書き込まれると書き込んだ文字数が返されます。ディスクが満杯またはエラーにより書き込まれなかったときはEOF (-1)が返されます。

-

APIにUnicodeが選択(_LFN_UNICODEが1)されているときは、chrはUTF-16文字になりますが、ファイル上のエンコードは、_STRF_ENCODEオプションで選択できます。それ以外の時は無変換(1バイト/1文字)で書き込みます。

-
- - -
-

解説

-

1文字をファイルに書き込みます。この関数はf_write()のラッパー関数です。

-
- - -
-

対応情報

-

_FS_READONLY == 0で、且つ_USE_STRFUNCが 1または 2のとき使用可能です。2を指定すると、'\n'"\r\n"に展開されてファイルに書き込まれます。

-
- - - - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/puts.html b/stmhal/fatfs/doc/ja/puts.html deleted file mode 100644 index 59ef96d0a..000000000 --- a/stmhal/fatfs/doc/ja/puts.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_puts - - - - -
-

f_puts

-

ファイルに文字列を書き込みます。

-
-int f_puts (
-  const TCHAR* str,  /* [IN] 書き込む文字列 */
-  FIL* fp            /* [IN] ファイル・オブジェクト */
-);
-
-
- -
-

引数

-
-
str
-
書き込むヌル文字'\0'終端の文字列を指すポインタを指定します。ヌル文字は書き込まれません。
-
fp
-
ファイル・オブジェクト構造体へのポインタを指定します。
-
-
- - -
-

戻り値

-

文字列が正常に書き込まれると、書き込まれた文字数が返されます。ディスクが満杯またはエラーにより書き込みが中断されたときはEOF (-1)が返されます。

-

APIにUnicodeが選択(_LFN_UNICODEが1)されているときは、strはUTF-16文字列になりますが、ファイル上のエンコードは、_STRF_ENCODEオプションで選択できます。それ以外の時は無変換(1バイト/1文字)で書き込みます。

-
- - -
-

解説

-

文字列をファイルに書き込みます。この関数はf_write()のラッパー関数です。

-
- - -
-

対応情報

-

_FS_READONLY == 0で、且つ_USE_STRFUNCが 1または 2のとき使用可能です。2を指定すると、文字列に含まれる'\n'"\r\n"に展開されてファイルに書き込まれます。

-
- - - - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/rc.html b/stmhal/fatfs/doc/ja/rc.html deleted file mode 100644 index 368ecb1d6..000000000 --- a/stmhal/fatfs/doc/ja/rc.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - -FatFs - 謌サ繧雁、 - - - -

繝輔ぃ繧、繝ォ髢「謨ー縺ョ謌サ繧雁、

-

FatFs縺ョAPI縺ァ縺ッ縲∽ク驛ィ縺ョ髢「謨ー繧帝勁縺咲オ先棡縺ォ蠢懊§縺溷ア騾壹ョ繝ェ繧カ繝ォ繝医サ繧ウ繝シ繝(FRESULT蝙(enum))繧定ソ斐@縺セ縺吶る未謨ー縺梧仙粥縺励◆蝣エ蜷医ッ0繧定ソ斐@縺セ縺吶ょ、ア謨励@縺溷エ蜷医ッ0莉・螟悶ョ蛟、繧定ソ斐@縲∝、縺ッ繧ィ繝ゥ繝シ縺ョ遞ョ鬘槭r遉コ縺励∪縺吶

- -
-
FR_OK (0)
-
髢「謨ー縺ッ謌仙粥縺励◆縲
-
FR_DISK_ERR
-
荳倶ス阪Ξ繧、繝、(disk_read(), disk_write(), disk_ioctl()髢「謨ー)縺ァ蝗槫セゥ荳崎ス縺ェ繧ィ繝ゥ繝シ縺檎匱逕溘@縺溘
-
FR_INT_ERR
-
蜀驛ィ蜃ヲ逅縺ョ蛛・蜈ィ諤ァ縺ォ逡ー蟶ク縺梧、懷コ縺輔l縺溘ょ次蝗縺ィ縺励※縺ッ谺。縺ョ繧医≧縺ェ縺薙→縺瑚縺医i繧後∪縺吶 -
    -
  • 繝懊Μ繝・繝シ繝荳翫ョFAT讒矩縺ォ繧ィ繝ゥ繝シ縺後≠繧九
  • -
  • 繧ケ繧ソ繝繧ッ荳崎カウ繧莉悶ョ繧ソ繧ケ繧ッ遲峨↓繧医k繝ッ繝シ繧ッ繝サ繧ィ繝ェ繧「(繝輔ぃ繧、繝ォ繝サ繧キ繧ケ繝繝繝サ繧ェ繝悶ず繧ァ繧ッ繝医d繝輔ぃ繧、繝ォ繝サ繧ェ繝悶ず繧ァ繧ッ繝)縺ョ遐エ螢翫ょ、壹¥縺ッ縺薙l縺悟次蝗縲
  • -
  • 縺昴ョ繝輔ぃ繧、繝ォ繧ェ繝悶ず繧ァ繧ッ繝医〒縺ッ驕主悉縺ォFR_DISK_ERR縺檎匱逕溘@縺ヲ縺繧九
  • -
-
-
FR_NOT_READY
-
迚ゥ逅繝峨Λ繧、繝悶′蜍穂ス懷庄閭ス縺ェ迥カ諷九↓縺ェ縺縲ゅ∪縺溘ッ縲√ラ繝ゥ繧、繝悶ョ蛻晄悄蛹悶↓螟ア謨励@縺溘
-
FR_NO_FILE
-
謖螳壹&繧後◆繝輔ぃ繧、繝ォ縺瑚ヲ九▽縺九i縺ェ縺九▲縺溘
-
FR_NO_PATH
-
謖螳壹&繧後◆繝代せ縺瑚ヲ九▽縺九i縺ェ縺九▲縺溘
-
FR_INVALID_NAME
-
謖螳壹&繧後◆譁蟄怜励′繝代せ蜷阪ョ繝輔か繝シ繝槭ャ繝縺ィ縺励※辟。蜉ケ縲
-
FR_DENIED
-
縺昴ョ繧ェ繝悶ず繧ァ繧ッ繝医↓蟇セ縺吶k謫堺ス懊ョ諡貞凄縲ょ次蝗縺ィ縺励※縺ッ谺。縺ョ繧医≧縺ェ縺薙→縺瑚縺医i繧後∪縺吶 -
    -
  • 譖ク縺崎セシ縺ソ遖∵ュ「螻樊ァ(AM_RDO)繧呈戟縺、繝輔ぃ繧、繝ォ繧呈嶌縺崎セシ縺ソ繝「繝シ繝峨〒髢九%縺縺ィ縺励◆縲
  • -
  • 譖ク縺崎セシ縺ソ遖∵ュ「螻樊ァ繧呈戟縺、繝輔ぃ繧、繝ォ繧繝繧」繝ャ繧ッ繝医Μ繧貞炎髯、縺励h縺縺ィ縺励◆縲
  • -
  • 遨コ縺ァ縺ェ縺繝繧」繝ャ繧ッ繝医Μ縺セ縺溘ッ繧ォ繝ャ繝ウ繝医サ繝繧」繝ャ繧ッ繝医Μ繧貞炎髯、縺励h縺縺ィ縺励◆縲
  • -
  • FA_READ繧剃サ倥¢縺壹↓髢九>縺溘ヵ繧。繧、繝ォ縺ォ蟇セ縺励※隱ュ縺ソ蜃コ縺励r陦後▲縺溘
  • -
  • FA_WRITE繧剃サ倥¢縺壹↓髢九>縺溘ヵ繧。繧、繝ォ縺ォ蟇セ縺励※螟画峩謫堺ス懊r陦後▲縺溘
  • -
  • 繝繧」繝ャ繧ッ繝医Μ繝サ繝繝シ繝悶Ν縺梧コ譚ッ縺ァ繝輔ぃ繧、繝ォ繧繝繧」繝ャ繧ッ繝医Μ繧剃ス懈舌〒縺阪↑縺九▲縺溘
  • -
  • 繝懊Μ繝・繝シ繝縺梧コ譚ッ縺ァ繝繧」繝ャ繧ッ繝医Μ繧剃ス懈舌〒縺阪↑縺九▲縺溘
  • -
-
-
FR_EXIST
-
譁ー縺励¥菴懈舌@繧医≧縺ィ縺励◆繧ェ繝悶ず繧ァ繧ッ繝医→蜷後§蜷榊燕縺ョ繧ェ繝悶ず繧ァ繧ッ繝医′譌「縺ォ蟄伜惠縺吶k縲
-
FR_INVALID_OBJECT
-
謖螳壹&繧後◆繝輔ぃ繧、繝ォ繝サ繧ェ繝悶ず繧ァ繧ッ繝医d繝繧」繝ャ繧ッ繝医Μ繝サ繧ェ繝悶ず繧ァ繧ッ繝医′辟。蜉ケ(繧ェ繝シ繝励Φ縺輔l縺ヲ縺縺ェ縺縲∫エ謳阪@縺ヲ縺繧九↑縺ゥ)縲√∪縺溘ッ繝後Ν繝サ繝昴う繝ウ繧ソ縺梧ク。縺輔l縺溘
-
FR_WRITE_PROTECTED
-
迚ゥ逅繝峨Λ繧、繝悶′譖ク縺崎セシ縺ソ遖∵ュ「迥カ諷九ョ縺ィ縺阪∵嶌縺崎セシ縺ソ邉サ縺ョ謫堺ス懊r陦後♀縺縺ィ縺励◆縲
-
FR_INVALID_DRIVE
-
繝代せ蜷阪〒謖螳壹&繧後◆繝峨Λ繧、繝也分蜿キ縺檎┌蜉ケ縲(髢「騾」繧ェ繝励す繝ァ繝ウ: _VOLUMES)
-
FR_NOT_ENABLED
-
縺昴ョ繝懊Μ繝・繝シ繝縺ョ謫堺ス懊↓蠢隕√↑繝ッ繝シ繧ッ繝サ繧ィ繝ェ繧「(繝輔ぃ繧、繝ォ繝サ繧キ繧ケ繝繝繝サ繧ェ繝悶ず繧ァ繧ッ繝域ァ矩菴)縺御ク弱∴繧峨l縺ヲ縺縺ェ縺縲
-
FR_NO_FILESYSTEM
-
迚ゥ逅繝峨Λ繧、繝紋ク翫↓譛牙柑縺ェFAT繝懊Μ繝・繝シ繝縺瑚ヲ九▽縺九i縺ェ縺九▲縺溘
-
FR_MKFS_ABORTED
-
f_mkfs()縺ョ蜃ヲ逅縺碁幕蟋句燕縺ォ荳ュ譁ュ縺輔l縺溘ょ次蝗縺ィ縺励※縺ッ谺。縺ョ繧医≧縺ェ縺薙→縺瑚縺医i繧後∪縺吶 -
    -
  • 繝懊Μ繝・繝シ繝縺悟ー上&縺吶℃繧九
  • -
  • FAT繧ソ繧、繝励ョ險育ョ励↓遏帷崟縺瑚ヲ九▽縺九▲縺溘ゅけ繝ゥ繧ケ繧ソ謨ー縺熊AT繧ソ繧、繝励ョ蠅逡御サ倩ソ代↓縺ェ繧九→縺阪↓逋コ逕溘☆繧句エ蜷医′縺ゅj縺セ縺吶
  • -
  • 隲也炊繝峨Λ繧、繝悶↓蟇セ蠢懊☆繧句玄逕サ縺瑚ヲ九▽縺九i縺ェ縺九▲縺溘(髢「騾」繧ェ繝励す繝ァ繝ウ: _MULTI_PARTITION)
  • -
-
-
FR_TIMEOUT
-
蜀榊・蛻カ蠕。縺ォ繧医k蠕縺。譎る俣縺悟ョ夂セゥ縺輔l縺滓凾髢薙r雜翫∴縺溘◆繧√髢「謨ー縺ッ螳溯。後&繧後↑縺九▲縺溘(髢「騾」繧ェ繝励す繝ァ繝ウ: _TIMEOUT)
-
FR_LOCKED
-
螟夐阪い繧ッ繧サ繧ケ謗剃サ匁ゥ溯ス縺ォ繧医j縲√◎縺ョ繝輔ぃ繧、繝ォ縺ォ蟇セ縺励※陦後♀縺縺ィ縺励◆繧「繧ッ繧サ繧ケ縺梧拠蜷ヲ縺輔l縺溘(髢「騾」繧ェ繝励す繝ァ繝ウ: _FS_LOCK)
-
FR_NOT_ENOUGH_CORE
-
繝。繝「繝ェ荳崎カウ縺ォ繧医k螟ア謨励ょ次蝗縺ィ縺励※縺ッ谺。縺ョ繧医≧縺ェ縺薙→縺瑚縺医i繧後∪縺吶 -
    -
  • LFN謫堺ス懊ヰ繝繝輔ぃ縺ョ蜍慕噪遒コ菫昴↓螟ア謨励@縺溘(髢「騾」繧ェ繝励す繝ァ繝ウ: _USE_LFN)
  • -
  • 荳弱∴繧峨l縺滄榊励ョ繧オ繧、繧コ縺悟ョ滄圀縺ォ蠢隕√↑繧オ繧、繧コ縺ォ蟇セ縺励※荳崎カウ縺励※縺繧九
  • -
-
-
FR_TOO_MANY_OPEN_FILES
-
蜷梧凾繧ェ繝シ繝励Φ蜿ッ閭ス縺ェ繝輔ぃ繧、繝ォ謨ー繧定カ翫∴縺ヲ繝輔ぃ繧、繝ォ繧帝幕縺薙≧縺ィ縺励◆縲(髢「騾」繧ェ繝励す繝ァ繝ウ: _FS_LOCK)
-
FR_INVALID_PARAMETER
-
荳弱∴繧峨l縺溘ヱ繝ゥ繝。繝シ繧ソ縺檎┌蜉ケ縺セ縺溘ッ遏帷崟縺励※縺繧九
-
- - - diff --git a/stmhal/fatfs/doc/ja/read.html b/stmhal/fatfs/doc/ja/read.html deleted file mode 100644 index 04ef8b30f..000000000 --- a/stmhal/fatfs/doc/ja/read.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - -FatFs - f_read - - - - -
-

f_read

-

ファイルからデータを読み出します。

-
-FRESULT f_read (
-  FIL* fp,     /* [IN] ファイル・オブジェクト構造体 */
-  void* buff,  /* [OUT] 読み出したデータを格納するバッファ */
-  UINT btr,    /* [IN] 読み出すバイト数 */
-  UINT* br     /* [OUT] 読み出されたバイト数 */
-);
-
-
- -
-

引数

-
-
fp
-
ファイル・オブジェクト構造体へのポインタを指定します。
-
buff
-
読み出したデータを格納するバッファを指すポインタを指定します。
-
btr
-
読み出すバイト数(0〜UINT型の最大値)を指定します。
-
br
-
実際に読み出されたバイト数を格納する変数を指すポインタを指定します。戻り値は関数の成否にかかわらず常に有効です。
-
-
- - - - - -
-

解説

-

読み込み開始位置は、現在のリード/ライト・ポインタからになります。リード/ライト・ポインタは読み込まれたバイト数だけ進みます。関数が正常終了した後は、*brの値をチェックすべきです。*brbtrよりも小さいときは、読み込み中にファイルの終端に達したことを示しています。

-
- - -
-

対応情報

-

全ての構成で使用可能です。

-
- - -
-

参照

-

f_open, fgets, f_write, f_close, FIL

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/readdir.html b/stmhal/fatfs/doc/ja/readdir.html deleted file mode 100644 index 3844809a6..000000000 --- a/stmhal/fatfs/doc/ja/readdir.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - -FatFs - f_readdir - - - - -
-

f_readdir

-

ディレクトリ項目を読み出します

-
-FRESULT f_readdir (
-  DIR* dp,      /* [IN] ディレクトリ・ブジェクト構造体へのポインタ */
-  FILINFO* fno  /* [OUT] ファイル情報構造体へのポインタ */
-);
-
-
- -
-

引数

-
-
dp
-
有効なディレクトリ・オブジェクト構造体へのポインタを指定します。
-
fno
-
読み出したディレクトリ項目を格納するファイル情報構造体へのポインタを指定します。
-
-
- - - - - -
-

解説

-

ディレクトリの項目(ファイルとディレクトリ)を順次読み出します。この関数を繰り返し実行することによりそのディレクトリの全ての項目を読み出すことができます。全ての項目が読み出され、読み出す項目がもう無いときは、fname[]メンバにヌル文字列が返されます。ドット・エントリ("."、"..")は、相対パスが有効なとき(_FS_RPATH >= 1)にのみ現れます。得られるファイル情報の詳細については FILINFO構造体を参照してください。fnoにヌル・ポインタを指定すると、そのディレクトリのリード・インデックスを先頭に巻き戻します。

-

LFN機能が有効な時は、f_readdir()関数の呼び出しに先立ってFILINFO構造体のlfnamelfsizeが有効な値で初期化されていなければなりません。lfnameはLFNを格納するバッファで、lfsizeはそのバッファの要素数です。LFNを読み出す必要がないときは、lfnameにヌル・ポインタをセットしてください。次の条件に一つでも該当する場合は、LFN格納バッファにヌル文字列が返されます。

-
    -
  • ディレクトリ項目にLFN情報が存在しない。
  • -
  • LFNの長さに対してLFN格納バッファまたはLFN操作バッファのサイズが不十分。
  • -
  • LFNに現在のOEMコードに存在しない文字が含まれている。(非Unicode構成のとき)
  • -
-

また、ディレクトリ項目にLFN情報が存在しない場合は、fname[]に英小文字が含まれる場合があります。

-
- - -
-

対応情報

-

_FS_MINIMIZE <= 1のときに使用可能です。

-
- - -
-

使用例

-
-FRESULT scan_files (
-    char* path        /* 開始ノード (ワークエリアとしても使用) */
-)
-{
-    FRESULT res;
-    FILINFO fno;
-    DIR dir;
-    int i;
-    char *fn;   /* 非Unicode構成を想定 */
-#if _USE_LFN
-    static char lfn[_MAX_LFN + 1];
-    fno.lfname = lfn;
-    fno.lfsize = sizeof lfn;
-#endif
-
-
-    res = f_opendir(&dir, path);                       /* ディレクトリを開く */
-    if (res == FR_OK) {
-        i = strlen(path);
-        for (;;) {
-            res = f_readdir(&dir, &fno);                   /* ディレクトリ項目を1個読み出す */
-            if (res != FR_OK || fno.fname[0] == 0) break;  /* エラーまたは項目無しのときは抜ける */
-            if (fno.fname[0] == '.') continue;             /* ドットエントリは無視 */
-#if _USE_LFN
-            fn = *fno.lfname ? fno.lfname : fno.fname;
-#else
-            fn = fno.fname;
-#endif
-            if (fno.fattrib & AM_DIR) {                    /* ディレクトリ */
-                sprintf(&path[i], "/%s", fn);
-                res = scan_files(path);
-                if (res != FR_OK) break;
-                path[i] = 0;
-            } else {                                       /* ファイル */
-                printf("%s/%s\n", path, fn);
-            }
-        }
-        f_closedir(&dir);
-    }
-
-    return res;
-}
-
-
- - - - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/rename.html b/stmhal/fatfs/doc/ja/rename.html deleted file mode 100644 index c770101cc..000000000 --- a/stmhal/fatfs/doc/ja/rename.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - -FatFs - f_rename - - - - -
-

f_rename

-

ファイルまたはサブ・ディレクトリの名前の変更または移動。

-
-FRESULT f_rename (
-  const TCHAR* old_name, /* [IN] 古いオブジェクト名 */
-  const TCHAR* new_name  /* [IN] 新しいオブジェクト名 */
-);
-
-
- -
-

引数

-
-
old_name
-
変更対象のオブジェクトのパス名を示すヌル文字'\0'終端の文字列へのポインタを指定します。
-
new_name
-
新しいオブジェクトのパス名を示すヌル文字'\0'終端の文字列へのポインタを指定します。既に存在する名前は使えません。また、ドライブ番号は指定できず、old_nameで指定された論理ドライブ上のオブジェクトとして扱われます。
-
-
- - - - - -
-

解説

-

ファイルまたはサブ・ディレクトリの名前を変更します。また、同時に別のディレクトリへの移動も可能です。開かれているオブジェクトに対して使用してはなりません

-
- - -
-

対応情報

-

_FS_READONLY == 0で、且つ_FS_MINIMIZE == 0のときに使用可能です。

-
- - -
-

使用例

-
-    /* ファイルまたはサブディレクトリの名前を変更する */
-    f_rename("oldname.txt", "newname.txt");
-
-    /* ファイルまたはサブディレクトリの名前の変更と別のディレクトリへの移動 */
-    f_rename("oldname.txt", "dir1/newname.txt");
-
-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/sdir.html b/stmhal/fatfs/doc/ja/sdir.html deleted file mode 100644 index e241b72ad..000000000 --- a/stmhal/fatfs/doc/ja/sdir.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - -FatFs - DIR - - - - -
-

DIR

-

DIR構造体は、f_opendir(), f_readdir()のワーク・エリアとして使用されます。アプリケーションは、この構造体のメンバを書き換えてはなりません。

-
-typedef struct {
-    FATFS*  fs;        /* 親ファイル・システム・オブジェクトへのポインタ */
-    WORD    id;        /* 親ファイル・システム・オブジェクトのマウントID */
-    WORD    index;     /* 次に検索開始するディレクトリ・インデックス番号 */
-    DWORD   sclust;    /* テーブル開始クラスタ (0:ルート) */
-    DWORD   clust;     /* 現在のクラスタ番号 */
-    DWORD   sect;      /* 現在のセクタ番号 */
-    BYTE*   dir;       /* 現在のSFNエントリへのポインタ */
-    BYTE*   fn;        /* SFNバッファへのポインタ (in/out) {file[8],ext[3],status[1]} */
-#if _FS_LOCK
-    UINT    lockid;    /* ロックID */
-#endif
-#if _USE_LFN
-    WCHAR*  lfn;       /* LFNバッファへのポインタ */
-    WORD    lfn_idx;   /* 最後にマッチしたLFNエントリの先頭インデックス (0xFFFF:無効) */
-#endif
-} DIR;
-
-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/setlabel.html b/stmhal/fatfs/doc/ja/setlabel.html deleted file mode 100644 index 5adc57b14..000000000 --- a/stmhal/fatfs/doc/ja/setlabel.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - -FatFs - f_setlabel - - - - -
-

f_setlabel

-

ボリューム・ラベルを書き込みます。

-
-FRESULT f_setlabel (
-  const TCHAR* name  /* [IN] 設定するボリューム名へのポインタ */
-);
-
-
- -
-

引数

-
-
name
-
設定するボリューム名を示すヌル文字'\0'終端の文字列へのポインタを指定します。
-
-
- - - - - -
-

解説

-

文字列の先頭にドライブ番号を含む場合は、その論理ドライブに設定されます。含まない場合は、デフォルト・ドライブに設定されます。ボリューム名を削除するときは、ヌル文字列を指定します。名前のフォーマットは、短いファイル名とほぼ同じですが、次の点が異なります。

-
    -
  • ローカル・コード換算で11バイト以下。
  • -
  • ピリオドを含むことはできない。
  • -
  • 任意の位置にスペースを置くことができる。ただし、最後尾のスペースは除去される。
  • -
-
- -
-

対応情報

-

_FS_READONLY == 0で、且つ_USE_LABEL == 1のときに使用可能です。

-
- - -
-

使用例

-
-    /* デフォルト・ドライブにボリューム名を設定 */
-    f_setlabel("DATA DISK");
-
-    /* ドライブ2にボリューム名を設定 */
-    f_setlabel("2:DISK 3 OF 4");
-
-    /* ドライブ2のボリューム名を削除 */
-    f_setlabel("2:");
-
-
- - -
-

参照

-f_getlabel -
- - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/sfatfs.html b/stmhal/fatfs/doc/ja/sfatfs.html deleted file mode 100644 index 14111907a..000000000 --- a/stmhal/fatfs/doc/ja/sfatfs.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - -FatFs - FATFS - - - - -
-

FATFS

-

FATFS構造体(ファイル・システム・オブジェクト)は、個々の論理ドライブのダイナミック・ワーク・エリアを保持し、f_mount()でFatFsモジュールに登録されます。初期化が行われるタイミングは、f_mount()またはメディア交換の後の最初のファイル・アクセスの時です。アプリケーションは、この構造体のメンバを書き換えてはなりません。

- -
-typedef struct {
-    BYTE    fs_type;      /* FATタイプ */
-    BYTE    drv;          /* 物理ドライブ番号 */
-    BYTE    csize;        /* クラスタ当たりのセクタ数 (1,2,4,8,...,128)*/
-    BYTE    n_fats;       /* FATの多重化数 (1,2) */
-    BYTE    wflag;        /* win[]ダーティ・フラグ */
-    BYTE    fsi_flag;     /* FSINFOフラグ (b7:Disabled, b0:Dirty)*/
-    WORD    id;           /* ファイル・システム・マウントID */
-    WORD    n_rootdir;    /* ルート・ディレクトリのエントリ数 (FAT12/16) */
-#if _MAX_SS != 512
-    WORD    ssize;        /* セクタ・サイズ (512, 1024, 2048 or 4096) */
-#endif
-#if _FS_REENTRANT
-    _SYNC_t sobj;         /* 同期オブジェクトID */
-#endif
-#if !_FS_READONLY
-    DWORD   last_clust;   /* FSINFO: 最後に割り当てられたクラスタ番号 */
-    DWORD   free_clust;   /* FSINFO: 空きクラスタ数 */
-#endif
-#if _FS_RPATH
-    DWORD   cdir;         /* カレント・ディレクトリのクラスタ (0:ルート) */
-#endif
-    DWORD   n_fatent;     /* FATエントリ数 (総クラスタ数 + 2) */
-    DWORD   fsize;        /* FAT 1個のセクタ数 */
-    DWORD   volbase;      /* ボリューム開始セクタ */
-    DWORD   fatbase;      /* FAT領域開始セクタ */
-    DWORD   dirbase;      /* ルート・ディレクトリ領域開始セクタ(クラスタ) */
-    DWORD   database;     /* データ領域開始セクタ */
-    DWORD   winsect;      /* win[]に現れているセクタ番号 */
-    BYTE    win[_MAX_SS]; /* ディスク・アクセス・ウィンドウ */
-} FATFS;
-
-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/sfile.html b/stmhal/fatfs/doc/ja/sfile.html deleted file mode 100644 index 36a73b383..000000000 --- a/stmhal/fatfs/doc/ja/sfile.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - -FatFs - FIL - - - - -
-

FIL

-

FIL構造体(ファイル・オブジェクト)は、f_open()で初期化され、以後そのファイルの状態を保持します。また、f_close()でファイルが閉じられると無効化されます。アプリケーションは、この構造体のメンバを書き換えてはなりません(cltblは例外)。非タイニー構成では、内部にセクタ・バッファが確保されるので、占有サイズに注意が必要です。

- -
-typedef struct {
-    FATFS*  fs;           /* 親ファイル・システム・オブジェクトへのポインタ */
-    WORD    id;           /* 親ファイル・システム・オブジェクトのマウントID */
-    BYTE    flag;         /* ファイル・ステータス・フラグ */
-    BYTE    err;          /* エラー中断フラグ */
-    DWORD   fptr;         /* ファイル読み書きポインタ (ファイル先頭からのバイト・オフセット) */
-    DWORD   fsize;        /* ファイル・サイズ(バイト単位) */
-    DWORD   sclust;       /* ファイル開始クラスタ番号 (0:割り当て無し) */
-    DWORD   clust;        /* 現在のクラスタ */
-    DWORD   dsect;        /* 現在のデータ・セクタ */
-#if !_FS_READONLY
-    DWORD   dir_sect;     /* このファイルのディレクトリ・エントリのあるセクタ */
-    BYTE*   dir_ptr;      /* このファイルのディレクトリへのポインタ */
-#endif
-#if _USE_FASTSEEK
-    DWORD*  cltbl;        /* ファイルのクラスタ・リンク情報へのポインタ (オープン時にNULLがセットされる) */
-#endif
-#if _FS_LOCK
-    UINT    lockid;       /* ファイル・ロックID */
-#endif
-#if !_FS_TINY
-    BYTE    buf[_MAX_SS]; /* ファイル・プライベート・データ転送バッファ */
-#endif
-} FIL;
-
-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/sfileinfo.html b/stmhal/fatfs/doc/ja/sfileinfo.html deleted file mode 100644 index 1a3db24dc..000000000 --- a/stmhal/fatfs/doc/ja/sfileinfo.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - -FatFs - FILINFO - - - - -
-

FILINFO

-

FILINFO構造体は、f_stat(), f_readdir()で返されるファイル情報を保持します。

-
-typedef struct {
-    DWORD fsize;     /* ファイル・サイズ */
-    WORD fdate;      /* 最後に更新された日付 */
-    WORD ftime;      /* 最後に更新された時刻  */
-    BYTE fattrib;    /* アトリビュート */
-    TCHAR fname[13]; /* 短いファイル名 (8.3フォーマット) */
-#if _USE_LFN
-    TCHAR* lfname;   /* 長いファイル名のバッファへのポインタ */
-    int lfsize;      /* 長いファイル名のバッファのサイズ [文字数] */
-#endif
-} FILINFO;
-
-
- -

メンバ

-
-
fsize
-
ファイルのバイト単位のサイズが格納されます。ディレクトリの場合は常に0です。
-
fdate
-
ファイルの変更された日付、またはディレクトリの作成された日付が格納されます。
-
-
bit15:9
-
1980年を起点とした年が 0..127 で入ります。
-
bit8:5
-
月が 1..12 の値で入ります。
-
bit4:0
-
日が 1..31 の値で入ります。
-
-
-
ftime
-
ファイルの変更された時刻、またはディレクトリの作成された時刻が格納されます。
-
-
bit15:11
-
時が 0..23 の値で入ります。
-
bit10:5
-
分が 0..59 の値で入ります。
-
bit4:0
-
秒/2が 0..29 の値で入ります。
-
-
-
fattrib
-
属性フラグが格納されます。フラグはAM_DIR, AM_RDO, AM_HID, AM_SYS, AM_ARCの組み合わせとなります。
-
fname[]
-
8.3形式の名前が'\0'で終わる文字列として格納されます。非LFN構成のときは、常に大文字で返されます。LFN構成のときは短い名前が返されますが、ASCII英字が小文字になる場合があります。
-
lfname
-
返される長いファイル名を格納するバッファへのポインタ。この構造体を使用する前にアプリケーションにより初期化されなければなりません。このメンバにNULLが設定されるとLFNは返されません。非LFN構成のときはこのメンバは存在しません。
-
lfsize
-
長いファイル名を格納するバッファのサイズ(要素数)。この構造体を使用する前にアプリケーションにより初期化されなければなりません。非LFN構成のときはこのメンバは存在しません。
-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/size.html b/stmhal/fatfs/doc/ja/size.html deleted file mode 100644 index caff05da1..000000000 --- a/stmhal/fatfs/doc/ja/size.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_size - - - - -
-

f_size

-

ファイルのサイズを取得します。

-
-DWORD f_size (
-  FIL* fp   /* [IN] ファイル・オブジェクト */
-);
-
-
- - -
-

引数

-
-
fp
-
ファイル・オブジェクト構造体へのポインタを指定します。
-
-
- - -
-

戻り値

-

バイト単位のファイル・サイズが返ります。

-
- - -
-

解説

-

f_size関数は、現リビジョンではマクロとして実装されています。

-
-#define f_size(fp) ((fp)->fsize)
-
-
- - -
-

対応情報

-

常に使用可能。

-
- - -
-

参照

-

f_open, f_lseek, FIL

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/stat.html b/stmhal/fatfs/doc/ja/stat.html deleted file mode 100644 index c441c64f0..000000000 --- a/stmhal/fatfs/doc/ja/stat.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - -FatFs - f_stat - - - - -
-

f_stat

-

ファイルまたはサブ・ディレクトリの存在を調べ、またその情報を取得します。

-
-FRESULT f_stat (
-  const TCHAR* path,  /* [IN] オブジェクト名へのポインタ */
-  FILINFO* fno        /* [OUT] ファイル情報構造体へのポインタ */
-);
-
-
- -
-

引数

-
-
path
-
チェックするオブジェクト名を示すヌル文字'\0'終端の文字列を指すポインタを指定します。
-
fno
-
オブジェクトが存在したときにその情報を格納するファイル情報構造体へのポインタを指定します。この情報が不要なときはヌル・ポインタを指定してください。
-
-
- - - - - -
-

解説

-

指定されたファイルまたはサブ・ディレクトリの存在を調べ、それ関する情報(サイズ、タイムスタンプおよび属性)を得ます。存在する場合はFR_OKが帰り、ファイル情報構造体にその情報がストアされます。存在しない場合は、FR_NO_FILEが帰ります。

-
- - -
-

対応情報

-

_FS_MINIMIZE == 0のときに使用可能です。

-
- - - - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/sync.html b/stmhal/fatfs/doc/ja/sync.html deleted file mode 100644 index e08280861..000000000 --- a/stmhal/fatfs/doc/ja/sync.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - -FatFs - f_sync - - - - -
-

f_sync

-

書き込み中のファイルのキャッシュされた情報をフラッシュします。

-
-FRESULT f_sync (
-  FIL* fp     /* [IN] ファイル・オブジェクト構造体へのポインタ */
-);
-
-
- -
-

引数

-
-
fp
-
syncするファイルのファイル・オブジェクト構造体へのポインタを指定します。
-
-
- - - - - -
-

解説

-

この関数はf_close()と同じ処理を実行しますが、ファイルは引き続き開かれたままになり、読み書きを続行できます。ロギングなど、書き込みモードで長時間ファイルが開かれているアプリケーションにおいて、定期的または区切りの良いところでこの関数を使用することにより、不意の電源断やメディアの取り外しにより失われるデータを最小にすることができます。この背景については、アプリケーション・ノートも参照してください。

-

実際のところ、f_close()内ではこの関数を呼び出した後ファイル・オブジェクトを無効化しているだけなので、f_close()直前のf_sync()は意味がありません。

-
- - -
-

対応情報

-

_FS_READONLY == 0のときに使用可能です。

-
- - -
-

参照

-

f_close

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/tell.html b/stmhal/fatfs/doc/ja/tell.html deleted file mode 100644 index 1dee98253..000000000 --- a/stmhal/fatfs/doc/ja/tell.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -FatFs - f_tell - - - - -
-

f_tell

-

現在のリード/ライト・ポインタを取得します。

-
-DWORD f_tell (
-  FIL* fp   /* [IN] ファイル・オブジェクト */
-);
-
-
- - -
-

引数

-
-
fp
-
ファイル・オブジェクト構造体へのポインタを指定します。
-
-
- - -
-

戻り値

-

現在のリード/ライト・ポインタ(ファイル先頭からのバイト単位のオフセット)が返ります。

-
- - -
-

解説

-

f_tell関数は、現リビジョンではマクロとして実装されています。

-
-#define f_tell(fp) ((fp)->fptr)
-
-
- - -
-

対応情報

-

常に使用可能。

-
- - -
-

参照

-

f_open, f_lseek, FIL

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/truncate.html b/stmhal/fatfs/doc/ja/truncate.html deleted file mode 100644 index 29bf480a2..000000000 --- a/stmhal/fatfs/doc/ja/truncate.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - -FatFs - f_truncate - - - - -
-

f_truncate

-

ファイル長を切り詰めます。

-
-FRESULT f_truncate (
-  FIL* fp     /* [IN] ファイル・オブジェクトへのポインタ */
-);
-
-
- -
-

引数

-
-
fp
-
切り詰め対象ファイルのファイル・オブジェクトへのポインタ
-
-
- - - - - -
-

解説

-

ファイルの長さが現在のリード/ライト・ポインタに切り詰められます。リード/ライト・ポインタが既にファイルの終端を指しているときは、この関数は何の効果も持ちません。

-
- - -
-

対応情報

-

_FS_READONLY == 0で、且つ_FS_MINIMIZE == 0のときに使用可能です。

-
- - -
-

参照

-

f_open, f_lseek, FIL

-
- - -

Return

- - diff --git a/stmhal/fatfs/doc/ja/unlink.html b/stmhal/fatfs/doc/ja/unlink.html deleted file mode 100644 index d5b18a85e..000000000 --- a/stmhal/fatfs/doc/ja/unlink.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - -FatFs - f_unlink - - - - -
-

f_unlink

-

ファイルまたはサブ・ディレクトリを削除します。

-
-FRESULT f_unlink (
-  const TCHAR* path  /* [IN] オブジェクト名へのポインタ */
-);
-
-
- -
-

引数

-
-
path
-
削除対象のパス名を示すヌル文字'\0'終端の文字列へのポインタを指定します。
-
-
- - - - - -
-

解説

-

削除対象のオブジェクトが次の条件に当てはまる場合、そのアクセスは拒否(FR_DENIEDまたはFR_LOCKED)され関数は失敗します。 -

    -
  • リード・オンリー属性(AM_RDO)を持っている。
  • -
  • 空でないサブ・ディレクトリまたはカレント・ディレクトリ。
  • -
  • 開かれているファイルまたはサブ・ディレクトリ。多重アクセス制御が有効なときは安全に拒否されますが、そうでないときは不正な操作となり、FAT構造が破壊される可能性があります。
  • -
-

-
- -
-

対応情報

-

_FS_READONLY == 0で、且つ_FS_MINIMIZE == 0のときに使用可能です。

-
- - -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/utime.html b/stmhal/fatfs/doc/ja/utime.html deleted file mode 100644 index 382defbb9..000000000 --- a/stmhal/fatfs/doc/ja/utime.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - -FatFs - f_utime - - - - -
-

f_utime

-

ファイルまたはサブ・ディレクトリのタイムスタンプを変更します。

-
-FRESULT f_utime (
-  const TCHAR* path,  /* [IN] オブジェクト名へのポインタ */
-  const FILINFO* fno  /* [IN] 設定する日付 */
-);
-
-
- -
-

引数

-
-
path
-
変更対象のオブジェクトのパス名を示すヌル文字'\0'終端の文字列を指定します。
-
fno
-
設定する日付と時間をfdateftimeメンバに設定されたFILINFO構造体へのポインタ。他のメンバはこの関数では意味を持ちません。
-
-
- - - - - -
-

解説

-

オブジェクトのタイムスタンプを変更します。

-
- - -
-

使用例

-
-FRESULT set_timestamp (
-    char *obj,     /* ファイル名へのポインタ */
-    int year,
-    int month,
-    int mday,
-    int hour,
-    int min,
-    int sec
-)
-{
-    FILINFO fno;
-
-    fno.fdate = (WORD)(((year - 1980) * 512U) | month * 32U | mday);
-    fno.ftime = (WORD)(hour * 2048U | min * 32U | sec / 2U);
-
-    return f_utime(obj, &fno);
-}
-
-
- - -
-

対応情報

-

_FS_READONLY == 0で、且つ_FS_MINIMIZE == 0のときに使用可能です。

-
- - -
-

参照

-

f_stat, FILINFO

-
- -

戻る

- - diff --git a/stmhal/fatfs/doc/ja/write.html b/stmhal/fatfs/doc/ja/write.html deleted file mode 100644 index 35da3fa94..000000000 --- a/stmhal/fatfs/doc/ja/write.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - -FatFs - f_write - - - - -
-

f_write

-

ファイルにデータを書き込みます。

-
-FRESULT f_write (
-  FIL* fp,           /* [IN] ファイル・オブジェクト */
-  const void* buff,  /* [IN] 書き込みデータ */
-  UINT btw,          /* [IN] 書き込むバイト数 */
-  UINT* bw           /* [OUT] 書き込まれたバイト数 */
-);
-
-
- -
-

引数

-
-
fp
-
ファイル・オブジェクト構造体へのポインタを指定します。
-
buff
-
書き込むデータを格納したバッファを指すポインタを指定します。
-
btw
-
書き込むバイト数(0〜UINT型の最大値)を指定します。
-
bw
-
書き込まれたバイト数を格納する変数を指すポインタを指定します。戻り値は関数の成否にかかわらず常に有効です。
-
-
- - - - - -
-

解説

-

書き込み開始位置は、リード/ライト・ポインタの位置からになります。リード/ライト・ポインタは実際に書き込まれたバイト数だけ進みます。関数が正常終了した後、要求したバイト数が書き込まれたかどうか*bwをチェックすべきです。*bwbtwより小さいときは、ディスク・フルを意味します。ディスク・フルが発生しているときまたはそれに近いときは、制御が帰るまで時間がかかる場合があります。

-
- - -
-

対応情報

-

_FS_READONLY == 0のときに使用可能です。

-
- - - - -

戻る

- - diff --git a/stmhal/fatfs/doc/updates.txt b/stmhal/fatfs/doc/updates.txt deleted file mode 100644 index fff559610..000000000 --- a/stmhal/fatfs/doc/updates.txt +++ /dev/null @@ -1,133 +0,0 @@ -R0.10, Oct 02,'13 - Added selection of character encoding on the file. (_STRF_ENCODE) - Added f_closedir(). - Added forced full FAT scan for f_getfree(). (_FS_NOFSINFO) - Added forced mount feature with changes of f_mount(). - Improved behavior of volume auto detection. - Improved write throughput of f_puts() and f_printf(). - Changed argument of f_chdrive(), f_mkfs(), disk_read() and disk_write(). - Fixed f_write() can be truncated when the file size is close to 4GB. - Fixed f_open(), f_mkdir() and f_setlabel() can return incorrect error code. - -R0.09b, Jan 24, 2013 - Added f_getlabel() and f_setlabel(). (_USE_LABEL = 1) - -R0.09a, Aug 27, 2012 - Fixed assertion failure due to OS/2 EA on FAT12/16. - Changed API rejects null object pointer to avoid crash. - Changed option name _FS_SHARE to _FS_LOCK. - -R0.09, Sep 06, 2011 - f_mkfs() supports multiple partition to finish the multiple partition feature. - Added f_fdisk(). (_MULTI_PARTITION = 2) - -R0.08b, Jan 15, 2011 - Fast seek feature is also applied to f_read() and f_write(). - f_lseek() reports required table size on creating CLMP. - Extended format syntax of f_printf(). - Ignores duplicated directory separators in given path names. - -R0.08a, Aug 16, 2010 - Added f_getcwd(). (_FS_RPATH = 2) - Added sector erase feature. (_USE_ERASE) - Moved file lock semaphore table from fs object to the bss. - Fixed a wrong directory entry is created on non-LFN cfg when the given name contains ';'. - Fixed f_mkfs() creates wrong FAT32 volume. - -R0.08, May 15, 2010 - Added a memory configuration option. (_USE_LFN) - Added file lock feature. (_FS_SHARE) - Added fast seek feature. (_USE_FASTSEEK) - Changed some types on the API, XCHAR->TCHAR. - Changed fname member in the FILINFO structure on Unicode cfg. - String functions support UTF-8 encoding files on Unicode cfg. - -R0.07e, Nov 3, 2009 - Separated out configuration options from ff.h to ffconf.h. - Added a configuration option, _LFN_UNICODE. - Fixed f_unlink() fails to remove a sub-dir on _FS_RPATH. - Fixed name matching error on the 13 char boundary. - Changed f_readdir() to return the SFN with always upper case on non-LFN cfg. - -R0.07c, Jun 21, 2009 - Fixed f_unlink() may return FR_OK on error. - Fixed wrong cache control in f_lseek(). - Added relative path feature. - Added f_chdir(). - Added f_chdrive(). - Added proper case conversion to extended characters. - -R0.07a, Apr 14, 2009 - Separated out OS dependent code on re-entrant configuration. - Added multiple sector size support. - -R0.07, Apr 01, 2009 - Merged Tiny-FatFs into FatFs as a buffer configuration option. - Added long file name support. - Added multiple code page support. - Added re-entrancy for multitask operation. - Added auto cluster size selection to f_mkfs(). - Added rewind option to f_readdir(). - Changed result code of critical errors. - Renamed string functions to avoid name collision. - -R0.06, Apr 01, 2008 - Added f_forward. (Tiny-FatFs) - Added string functions: fgets, fputc, fputs and fprintf. - Improved performance of f_lseek on moving to the same or following cluster. - -R0.05a, Feb 03, 2008 - Added f_truncate. - Added f_utime. - Fixed off by one error at FAT sub-type determination. - Fixed btr in f_read can be mistruncated. - Fixed cached sector is left not flushed when create and close without write. - -R0.05, Aug 26, 2007 - Changed arguments of f_read, f_write. - Changed arguments of f_mkfs. (FatFs) - Fixed f_mkfs on FAT32 creates incorrect FSInfo. (FatFs) - Fixed f_mkdir on FAT32 creates incorrect directory. (FatFs) - -R0.04b, May 05, 2007 - Added _USE_NTFLAG option. - Added FSInfo support. - Fixed some problems corresponds to FAT32. (Tiny-FatFs) - Fixed DBCS name can result FR_INVALID_NAME. - Fixed short seek (<= csize) collapses the file object. - -R0.04a, Apr 01, 2007 - Supported multiple partitions on a plysical drive. (FatFs) - Added minimization level 3. - Added a capability of extending file size to f_lseek. - Fixed an endian sensitive code in f_mkfs. (FatFs) - Fixed a problem corresponds to FAT32 support. (Tiny-FatFs) - -R0.04, Feb 04, 2007 - Supported multiple drive system. (FatFs) - Changed some APIs for multiple drive system. - Added f_mkfs. (FatFs) - Added _USE_FAT32 option. (Tiny-FatFs) - -R0.03a, Dec 11, 2006 - Improved cluster scan algolithm to write files fast. - Fixed f_mkdir creates incorrect directory on FAT32. - -R0.03, Sep 22, 2006 - Added f_rename. - Changed option _FS_MINIMUM to _FS_MINIMIZE. - -R0.02a, Jun 10, 2006 - Added a configuration option _FS_MINIMUM. - -R0.02, Jun 01, 2006 - Added FAT12. - Removed unbuffered mode. - Fixed a problem on small (<32M) patition. - -R0.01, Apr 29, 2006 - First release - -R0.00, Feb 26, 2006 - Prototype (not released) - -- cgit v1.2.3