aboutsummaryrefslogtreecommitdiff
path: root/stmhal/fatfs/doc/ja/printf.html
diff options
context:
space:
mode:
authorDave Hylands2014-03-11 23:55:41 -0700
committerDave Hylands2014-03-11 23:55:41 -0700
commitdd38d907244bc0e483c3d760f2ba464a394ec229 (patch)
tree05869a4757c5a1b11b8baf206595551c7650f6e7 /stmhal/fatfs/doc/ja/printf.html
parent8bfec2b53822e2b62c4577b32e0beae398a16297 (diff)
Initial checkin with STM HAL
This compiles and links, but hasn't been tested on a board yet and even if it was run, it doesn't currently do anything.
Diffstat (limited to 'stmhal/fatfs/doc/ja/printf.html')
-rw-r--r--stmhal/fatfs/doc/ja/printf.html90
1 files changed, 90 insertions, 0 deletions
diff --git a/stmhal/fatfs/doc/ja/printf.html b/stmhal/fatfs/doc/ja/printf.html
new file mode 100644
index 000000000..2f5f73043
--- /dev/null
+++ b/stmhal/fatfs/doc/ja/printf.html
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/printf.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_printf</title>
+</head>
+
+<body>
+
+<div class="para func">
+<h2>f_printf</h2>
+<p>ファイルに書式化文字列を書き込みます。</p>
+<pre>
+int f_printf (
+ FIL* <span class="arg">fp</span>, <span class="c">/* [IN] ファイル・オブジェクト */</span>
+ const TCHAR* <span class="arg">fmt</span>, <span class="c">/* [IN] 書式制御文字列 */</span>
+ ...
+);
+</pre>
+</div>
+
+<div class="para arg">
+<h4>引数</h4>
+<dl class="par">
+<dt>fp</dt>
+<dd>ファイル・オブジェクト構造体へのポインタを指定します。</dd>
+<dt>fmt</dt>
+<dd>ヌル文字<tt>'\0'</tt>終端の書式制御文字列を指すポインタを指定します。ヌル文字は書き込まれません。</dd>
+<dt>...</dt>
+<dd>オプションの引数。</dd>
+
+</dl>
+</div>
+
+
+<div class="para ret">
+<h4>戻り値</h4>
+<p>文字列が正常に書き込まれると、書き込まれた文字数が返されます。ディスクが満杯またはその他エラーにより正常に書き込まれなかったときは、関数は失敗し<tt>EOF (-1)</tt>が返されます。</p>
+</div>
+
+
+<div class="para desc">
+<h4>解説</h4>
+<p>この関数は、<a href="putc.html"><tt>f_putc()</tt></a>および<a href="puts.html"><tt>f_puts()</tt></a>のラッパー関数です。書式制御機能はC標準ライブラリのサブセットとなっていて、書式制御文字は次に示すものが使用可能です。</p>
+<ul>
+<li>タイプ: <tt>c C s S d D u U x X b B</tt></li>
+<li>精度指定: <tt>l L</tt></li>
+<li>フラグ: <tt>0 -</tt></li>
+</ul>
+</div>
+
+
+<div class="para comp">
+<h4>対応情報</h4>
+<p><tt>_FS_READONLY == 0</tt>で、且つ<tt>_USE_STRFUNC</tt>が 1または 2のとき使用可能になります。2の時は、出力に含まれる<tt>'\n'</tt>が<tt>"\r\n"</tt>に展開されてファイルに書き込まれます。</p>
+<p>APIにUnicodeが選択(<tt>_LFN_UNICODE</tt>が1)されているときは、<span class="arg">fmt</span>はUnicode文字列になりますが、ファイル上のエンコードは、<tt>_STRF_ENCODE</tt>オプションで選択できます。それ以外の時は無変換(1バイト/1文字)で書き込みます。</p>
+</div>
+
+
+<div class="para use">
+<h4>使用例</h4>
+<pre>
+ f_printf(&amp;fil, "%d", 1234); <span class="c">/* "1234" */</span>
+ f_printf(&amp;fil, "%6d,%3d%%", -200, 5); <span class="c">/* " -200, 5%" */</span>
+ f_printf(&amp;fil, "%-6u", 100); <span class="c">/* "100 " */</span>
+ f_printf(&amp;fil, "%ld", 12345678L); <span class="c">/* "12345678" */</span>
+ f_printf(&amp;fil, "%04x", 0xAB); <span class="c">/* "00ab" */</span>
+ f_printf(&amp;fil, "%08LX", 0x123ABCL); <span class="c">/* "00123ABC" */</span>
+ f_printf(&amp;fil, "%016b", 0x550F); <span class="c">/* "0101010100001111" */</span>
+ f_printf(&amp;fil, "%s", "String"); <span class="c">/* "String" */</span>
+ f_printf(&amp;fil, "%5s", "abc"); <span class="c">/* " abc" */</span>
+ f_printf(&amp;fil, "%-5s", "abc"); <span class="c">/* "abc " */</span>
+ f_printf(&amp;fil, "%c", 'a'); <span class="c">/* "a" */</span>
+ f_printf(&amp;fil, "%f", 10.0); <span class="c">/* 浮動小数点は未サポート */</span>
+</pre>
+</div>
+
+
+<div class="para ref">
+<h4>参照</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="putc.html">f_putc</a>, <a href="puts.html">f_puts</a>, <a href="gets.html">f_gets</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">戻る</a></p>
+</body>
+</html>