ugfx/3rdparty/fatfs-0.10b/doc/ja/forward.html

141 lines
5.0 KiB
HTML
Raw Normal View History

<!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/forward.html">
<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_forward</title>
</head>
<body>
<div class="para func">
<h2>f_forward</h2>
<p><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>f<EFBFBD>[<5B>^<5E><><EFBFBD>ǂݏo<DD8F><6F><EFBFBD>A<EFBFBD><41><EFBFBD>M<EFBFBD>X<EFBFBD>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD>ɒ<EFBFBD><C992>ړ]<5D><><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</p>
<pre>
FRESULT f_forward (
FIL* <span class="arg">fp</span>, <span class="c">/* [IN] <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD>\<5C><><EFBFBD><EFBFBD> */</span>
UINT (*<span class="arg">func</span>)(const BYTE*,UINT), <span class="c">/* [IN] <20>f<EFBFBD>[<5B>^<5E>]<5D><><EFBFBD>֐<EFBFBD> */</span>
UINT <span class="arg">btf</span>, <span class="c">/* [IN] <20>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>C<EFBFBD>g<EFBFBD><67> */</span>
UINT* <span class="arg">bf</span> <span class="c">/* [OUT] <20>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>C<EFBFBD>g<EFBFBD><67> */</span>
);
</pre>
</div>
<div class="para arg">
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<dl class="par">
<dt>fp</dt>
<dd><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD>\<5C><><EFBFBD>̂ւ̃|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</dd>
<dt>func</dt>
<dd><EFBFBD>f<EFBFBD>[<5B>^<5E><><EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD>[<5B>U<EFBFBD><55><EFBFBD>`<60>֐<EFBFBD><D690>ւ̃|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD><42><EFBFBD>̊֐<CC8A><D690>̎d<CC8E>l<EFBFBD>̓T<CD83><54><EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>Q<EFBFBD>Ƃ<EFBFBD><C682>Ă<EFBFBD><C482><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B</dd>
<dt>btf</dt>
<dd><EFBFBD>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>C<EFBFBD>g<EFBFBD><67>(0<>`UINT<4E>̍ő<CC8D><C591>l)<29><><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</dd>
<dt>bf</dt>
<dd><EFBFBD><EFBFBD><EFBFBD>ۂɓ]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>C<EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>ϐ<EFBFBD><CF90><EFBFBD><EFBFBD>w<EFBFBD><77><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</dd>
</dl>
</div>
<div class="para ret">
<h4><EFBFBD>߂<EFBFBD><EFBFBD>l</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#ie">FR_INT_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#de">FR_DENIED</a>,
<a href="rc.html#io">FR_INVALID_OBJECT</a>,
<a href="rc.html#tm">FR_TIMEOUT</a>
</p>
</div>
<div class="para desc">
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<p><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>̃f<CC83>[<5B>^<5E><><EFBFBD>o<EFBFBD>b<EFBFBD>t<EFBFBD>@<40>ɓǂݏo<DD8F><6F><EFBFBD><EFBFBD><EFBFBD>ɑ<EFBFBD><C991>M<EFBFBD>X<EFBFBD>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD>ɒ<EFBFBD><C992>ړ]<5D><><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>A<EFBFBD>v<EFBFBD><76><EFBFBD>P<EFBFBD>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ńf<C583>[<5B>^<5E>E<EFBFBD>o<EFBFBD>b<EFBFBD>t<EFBFBD>@<40><><EFBFBD>K<EFBFBD>v<EFBFBD>Ƃ<EFBFBD><C682>Ȃ<EFBFBD><C882>̂ŁA<C581><41><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̌<EFBFBD><CC8C><EFBFBD><EFBFBD><EFBFBD>‹<EFBFBD><C28B>ŗL<C597><4C><EFBFBD>ł<EFBFBD><C582>B<EFBFBD><42><EFBFBD>[<5B>h/<2F><><EFBFBD>C<EFBFBD>g<EFBFBD>E<EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>^<5E>͓]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>C<EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>݂܂<DD82><DC82>B<EFBFBD>w<EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>C<EFBFBD>g<EFBFBD><67><EFBFBD>̓]<5D><><EFBFBD><EFBFBD><EFBFBD>Ƀt<C983>@<40>C<EFBFBD><43><EFBFBD>̏I<CC8F>[<5B>ɒB<C992><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>M<EFBFBD>X<EFBFBD>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>r<EFBFBD>W<EFBFBD>[<5B>ɂȂ<C982><C882><EFBFBD><EFBFBD><EFBFBD>A<tt class="arg">*bf</tt><EFBFBD><EFBFBD><tt class="arg">btf</tt><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B</p>
</div>
<div class="para comp">
<h4><EFBFBD>Ή<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<p><tt>_USE_FORWARD == 1</tt><EFBFBD>ŁA<EFBFBD><EFBFBD><EFBFBD><EFBFBD><tt>_FS_TINY == 1</tt><EFBFBD>̂Ƃ<EFBFBD><EFBFBD>Ɏg<EFBFBD>p<EFBFBD>”\<5C>ł<EFBFBD><C582>B</p>
</div>
<div class="para use">
<h4><EFBFBD>g<EFBFBD>p<EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>I<EFBFBD>[<5B>f<EFBFBD>B<EFBFBD>I<EFBFBD>Đ<EFBFBD><C490>j</h4>
<pre>
<span class="c">/*-----------------------------------------------------------------------*/</span>
<span class="c">/* f_forward<72>֐<EFBFBD><D690><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă΂<C482><CE82><EFBFBD><EFBFBD>f<EFBFBD>[<5B>^<5E><><EFBFBD>M<EFBFBD>֐<EFBFBD><D690>̗<EFBFBD> */</span>
<span class="c">/*-----------------------------------------------------------------------*/</span>
UINT out_stream ( <span class="c">/* <20>߂<EFBFBD><DF82>l: <20>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>C<EFBFBD>g<EFBFBD><67><EFBFBD>܂<EFBFBD><DC82>̓X<CD83>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD>̏<EFBFBD><CC8F><EFBFBD> */</span>
const BYTE *p, <span class="c">/* <20>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>f<EFBFBD>[<5B>^<5E><><EFBFBD>w<EFBFBD><77><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>^ */</span>
UINT btf <span class="c">/* &gt;0: <20>]<5D><><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><73>(<28>o<EFBFBD>C<EFBFBD>g<EFBFBD><67>). 0: <20>X<EFBFBD>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD>̏<EFBFBD><CC8F>Ԃ𒲂ׂ<F092B282> */</span>
)
{
UINT cnt = 0;
if (btf == 0) { <span class="c">/* <20>Z<EFBFBD><5A><EFBFBD>X<EFBFBD>v<EFBFBD><76> */</span>
<span class="c">/* <20>X<EFBFBD>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD>̏<EFBFBD><CC8F>Ԃ<EFBFBD><D482>Ԃ<EFBFBD> (0: <20>r<EFBFBD>W<EFBFBD>[, 1: <20><><EFBFBD>f<EFBFBD>B) */</span>
<span class="c">/* <20><><EFBFBD>U<EFBFBD>A<EFBFBD><41><EFBFBD>f<EFBFBD>B<EFBFBD><42><EFBFBD>Ԃ<EFBFBD><D482><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>]<5D><><EFBFBD>v<EFBFBD><76><EFBFBD>ŏ<EFBFBD><C58F>Ȃ<EFBFBD><C882>Ƃ<EFBFBD>1<EFBFBD>o<EFBFBD>C<EFBFBD>g<EFBFBD><67> */</span>
<span class="c">/* <20>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882><EFBFBD> f_forward<72>֐<EFBFBD><D690><EFBFBD> FR_INT_ERR <20>ƂȂ<C682><C882>B */</span>
if (FIFO_READY) cnt = 1;
}
else { <span class="c">/* <20>]<5D><><EFBFBD>v<EFBFBD><76> */</span>
do { <span class="c">/* <20>S<EFBFBD>Ẵo<CC83>C<EFBFBD>g<EFBFBD><67><EFBFBD>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>X<EFBFBD>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>r<EFBFBD>W<EFBFBD>[<5B>ɂȂ<C982><C882>܂ŌJ<C58C><4A><EFBFBD>Ԃ<EFBFBD> */</span>
FIFO_PORT = *p++;
cnt++;
} while (cnt &lt; btf &amp;&amp; FIFO_READY);
}
return cnt;
}
<span class="c">/*-----------------------------------------------------------------------*/</span>
<span class="c">/* f_forward<72>֐<EFBFBD><D690>̎g<CC8E>p<EFBFBD><70> */</span>
<span class="c">/*-----------------------------------------------------------------------*/</span>
FRESULT play_file (
char *fn <span class="c">/* <20>Đ<EFBFBD><C490><EFBFBD><EFBFBD><EFBFBD><EFBFBD>I<EFBFBD>[<5B>f<EFBFBD>B<EFBFBD>I<EFBFBD>E<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>w<EFBFBD><77><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>^ */</span>
)
{
FRESULT rc;
FIL fil;
UINT dmy;
<span class="c">/* <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>ǂݏo<DD8F><6F><EFBFBD><EFBFBD><EFBFBD>[<5B>h<EFBFBD>ŊJ<C58A><4A> */</span>
rc = f_open(&amp;fil, fn, FA_READ);
if (rc) return rc;
<span class="c">/* <20>S<EFBFBD>Ẵf<CC83>[<5B>^<5E><><EFBFBD>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>G<EFBFBD><47><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂ő<DC82><C591><EFBFBD><EFBFBD><EFBFBD> */</span>
while (rc == FR_OK &amp;&amp; fil.fptr &lt; fil.fsize) {
<span class="c">/* <20>ق<EFBFBD><D982>̏<EFBFBD><CC8F><EFBFBD>... */</span>
<span class="c">/* <20><><EFBFBD><EFBFBD><EFBFBD>I<EFBFBD>܂<EFBFBD><DC82>͗v<CD97><76><EFBFBD>ɉ<EFBFBD><C989><EFBFBD><EFBFBD>ăf<C483>[<5B>^<5E><><EFBFBD>X<EFBFBD>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD>ɑ<EFBFBD><C991>o<EFBFBD><6F><EFBFBD><EFBFBD> */</span>
rc = f_forward(&amp;fil, out_stream, 1000, &amp;dmy);
}
<span class="c">/* <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>‚<EFBFBD><C282>Ė߂<C496> */</span>
f_close(&amp;fil);
return rc;
}
</pre>
</div>
<div class="para ref">
<h4><EFBFBD>Q<EFBFBD><EFBFBD></h4>
<p><tt><a href="open.html">f_open</a>, <a href="gets.html">fgets</a>, <a href="write.html">f_write</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"><EFBFBD>߂<EFBFBD></a></p>
</body>
</html>