1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-09 20:46:07 +01:00
LibrePilot/flight/Libraries/FatFS/doc/ja/forward.html

142 lines
4.6 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="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_forward</title>
</head>
<body>
<div class="para">
<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* <em>FileObject</em>, /* <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> */
UINT (*<em>Func</em>)(const BYTE*,UINT), /* <20>f<EFBFBD>[<5B>^<5E>]<5D><><EFBFBD>֐<EFBFBD> */
UINT <em>ByteToFwd</em>, /* <20>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>C<EFBFBD>g<EFBFBD><67> */
UINT* <em>ByteFwd</em> /* <20>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>C<EFBFBD>g<EFBFBD><67> */
);
</pre>
</div>
<div class="para">
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<dl class="par">
<dt>FileObject</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>ByteToRead</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>ByteRead</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">
<h4><EFBFBD>߂<EFBFBD><EFBFBD>l</h4>
<dl class="ret">
<dt>FR_OK (0)</dt>
<dd><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>I<EFBFBD><EFBFBD><EFBFBD>B</dd>
<dt>FR_DENIED</dt>
<dd><EFBFBD><EFBFBD><EFBFBD>ǂݍ<EFBFBD><EFBFBD>݃<EFBFBD><EFBFBD>[<5B>h<EFBFBD>ŊJ<C58A><4A><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǂݍ<C782><DD8D><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD>B</dd>
<dt>FR_DISK_ERR</dt>
<dd><EFBFBD>f<EFBFBD>B<EFBFBD>X<EFBFBD>N<EFBFBD>E<EFBFBD>G<EFBFBD><EFBFBD><EFBFBD>[<5B>ɂ<EFBFBD><C982><EFBFBD>s<EFBFBD>B</dd>
<dt>FR_INT_ERR</dt>
<dd><EFBFBD>s<EFBFBD><EFBFBD><EFBFBD><EFBFBD>FAT<EFBFBD>\<5C><><EFBFBD>܂<EFBFBD><DC82>͓<EFBFBD><CD93><EFBFBD><EFBFBD>G<EFBFBD><47><EFBFBD>[<5B>ɂ<EFBFBD><C982><EFBFBD>s<EFBFBD>B</dd>
<dt>FR_NOT_READY</dt>
<dd><EFBFBD><EFBFBD><EFBFBD>f<EFBFBD>B<EFBFBD>A<EFBFBD><EFBFBD><EFBFBD>Z<EFBFBD>b<EFBFBD>g<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><EFBFBD>Ȃ<EFBFBD><EFBFBD>ȂǁA<EFBFBD>f<EFBFBD>B<EFBFBD>X<EFBFBD>N<EFBFBD>E<EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD>\<5C><><EFBFBD>ԁB</dd>
<dt>FR_INVALID_OBJECT</dt>
<dd><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȃt<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD>B</dd>
</dl>
</div>
<div class="para">
<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>]<5D><><EFBFBD>J<EFBFBD>n<EFBFBD>ʒu<CA92>́A<CD81><41><EFBFBD>݂̃t<CC83>@<40>C<EFBFBD><43>R/W<>|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD>ɂȂ<C982><C882>܂<EFBFBD><DC82>B<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43>R/W<>|<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>*ByteFwd</tt><EFBFBD><EFBFBD><tt>ByteToFwd</tt><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B</p>
</div>
<div class="para">
<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">
<h4><EFBFBD>g<EFBFBD>p<EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>I<EFBFBD>[<5B>f<EFBFBD>B<EFBFBD>I<EFBFBD>Đ<EFBFBD><C490>j</h4>
<pre>
/*-----------------------------------------------------------------------*/
/* f_forward<72>֐<EFBFBD><D690><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă΂<C482><CE82><EFBFBD><EFBFBD>f<EFBFBD>[<5B>^<5E><><EFBFBD>M<EFBFBD>֐<EFBFBD><D690>̗<EFBFBD> */
/*-----------------------------------------------------------------------*/
UINT out_stream ( /* <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> */
const BYTE *p, /* <20>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>f<EFBFBD>[<5B>^<5E><><EFBFBD>w<EFBFBD><77><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>^ */
UINT btf /* &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> */
)
{
UINT cnt = 0;
if (btf == 0) { /* <20>Z<EFBFBD><5A><EFBFBD>X<EFBFBD>v<EFBFBD><76> */
/* <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) */
/* <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> */
/* <20>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882><EFBFBD> f_forward<72>֐<EFBFBD><D690><EFBFBD> FR_RW_ERROR <20>ƂȂ<C682><C882>B */
if (FIFO_READY) cnt = 1;
}
else { /* <20>]<5D><><EFBFBD>v<EFBFBD><76> */
do { /* <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> */
FIFO_PORT = *p++;
cnt++;
} while (cnt &lt; btf &amp;&amp; FIFO_READY);
}
return cnt;
}
/*-----------------------------------------------------------------------*/
/* f_forward<72>֐<EFBFBD><D690>̎g<CC8E>p<EFBFBD><70> */
/*-----------------------------------------------------------------------*/
FRESULT play_file (
char *fn /* <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>^ */
)
{
FRESULT rc;
FIL fil;
UINT dmy;
/* <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>ǂݏo<DD8F><6F><EFBFBD><EFBFBD><EFBFBD>[<5B>h<EFBFBD>ŊJ<C58A><4A> */
rc = f_open(&amp;fil, fn, FA_READ);
/* <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> */
while (rc == FR_OK &amp;&amp; fil.fptr &lt; fil.fsize) {
/* <20>ق<EFBFBD><D982>̏<EFBFBD><CC8F><EFBFBD>... */
/* <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> */
rc = f_forward(&amp;fil, out_stream, 1000, &amp;dmy);
}
return rc; /* FR_OK: <20><><EFBFBD><EFBFBD><EFBFBD>I<EFBFBD><49>, <20>ق<EFBFBD>:<3A>ُ<EFBFBD><D98F>I<EFBFBD><49> */
}
</pre>
</div>
<div class="para">
<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>