1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-10 20:52:11 +01:00

102 lines
3.1 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_getfree</title>
</head>
<body>
<div class="para">
<h2>f_getfree</h2>
<p><EFBFBD>_<EFBFBD><EFBFBD><EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD><EFBFBD><EFBFBD>̖<EFBFBD><EFBFBD>g<EFBFBD>p<EFBFBD>N<EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>^<5E><><EFBFBD>𓾂܂<F093BE82><DC82>B</p>
<pre>
FRESULT f_getfree (
const XCHAR* <em>Path</em>, /* <20>Ώۃh<DB83><68><EFBFBD>C<EFBFBD>u<EFBFBD>̃<EFBFBD><CC83>[<5B>g<EFBFBD>E<EFBFBD>f<EFBFBD>B<EFBFBD><42><EFBFBD>N<EFBFBD>g<EFBFBD><67> */
DWORD* <em>Clusters</em>, /* <20>󂫃N<F382AB83><4E><EFBFBD>X<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>ϐ<EFBFBD><CF90>ւ̃|<7C>C<EFBFBD><43><EFBFBD>^ */
FATFS** <em>FileSystemObject</em> /* <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>V<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD>w<EFBFBD><77><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>^<5E>ւ̃|<7C>C<EFBFBD><43><EFBFBD>^ */
);
</pre>
</div>
<div class="para">
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<dl class="par">
<dt>Path</dt>
<dd><EFBFBD>Ώۂ̘_<EFBFBD><EFBFBD><EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD>̃<EFBFBD><EFBFBD>[<5B>g<EFBFBD>f<EFBFBD>B<EFBFBD><42><EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><a href="filename.html"><EFBFBD>p<EFBFBD>X<EFBFBD><EFBFBD></a><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><tt>'\0'</tt><EFBFBD>ŏI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ւ̃|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</dd>
<dt>Clusters</dt>
<dd><EFBFBD>󂫃N<EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>[<5B><><EFBFBD><EFBFBD><tt>DWORD</tt><EFBFBD>ϐ<EFBFBD><EFBFBD>ւ̃|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</dd>
<dt>FileSystemObject</dt>
<dd><EFBFBD>Ώۃh<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD>̃t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>V<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD>w<EFBFBD><77><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>Ԃ<EFBFBD><D482><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<tt>*Clusters</tt><EFBFBD>ɋ󂫃N<EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD>Ԃ<EFBFBD><D482><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</dd>
<dt>FR_INVALID_DRIVE</dt>
<dd><EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD>ԍ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><EFBFBD><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>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD>\<5C><><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_ENABLED</dt>
<dd><EFBFBD><EFBFBD><EFBFBD>̘_<EFBFBD><EFBFBD><EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD>Ƀ<EFBFBD><EFBFBD>[<5B>N<EFBFBD>E<EFBFBD>G<EFBFBD><47><EFBFBD>A<EFBFBD><41><EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>Ȃ<EFBFBD><C882>B</dd>
<dt>FR_NO_FILESYSTEM</dt>
<dd><EFBFBD>f<EFBFBD>B<EFBFBD>X<EFBFBD>N<EFBFBD><EFBFBD><EFBFBD>ɗL<EFBFBD><EFBFBD><EFBFBD><EFBFBD>FAT<EFBFBD>p<EFBFBD>[<5B>e<EFBFBD>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>‚<EFBFBD><C282><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>B</dd>
</dl>
</div>
<div class="para">
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<p><EFBFBD>_<EFBFBD><EFBFBD><EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD><EFBFBD><EFBFBD>̋󂫃N<EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E693BE><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>Ԃ<EFBFBD><D482><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>V<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD><67><tt>csize</tt><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD><EFBFBD><EFBFBD>N<EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̃Z<CC83>N<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>̂ŁA<C581><41><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ɏ<EFBFBD><C98E>ۂ̋󂫃T<F382AB83>C<EFBFBD>Y<EFBFBD><59><EFBFBD>v<EFBFBD>Z<EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82>BFAT32<33>{<7B><><EFBFBD><EFBFBD><EFBFBD>[<5B><><EFBFBD>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>ẮAFSINFO<46>̏<EFBFBD><CC8F>Ԃɂ<D482><C982><EFBFBD><EFBFBD>Ă͕s<CD95><73><EFBFBD>m<EFBFBD>Ȓl<C892><6C><EFBFBD>Ԃ<EFBFBD><D482><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>Ɏ<EFBFBD><C98E>Ԃ<EFBFBD><D482><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E882B7><EFBFBD>”\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</p>
</div>
<div class="para">
<h4><EFBFBD>Ή<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<p><tt>_FS_READONLY == 0</tt><EFBFBD>ŁA<EFBFBD><EFBFBD><EFBFBD><EFBFBD><tt>_FS_MINIMIZE == 0</tt><EFBFBD>̂Ƃ<EFBFBD><EFBFBD>g<EFBFBD>p<EFBFBD>”\<5C>ł<EFBFBD><C582>B</p>
</div>
<div class="para">
<h4><EFBFBD>g<EFBFBD>p<EFBFBD><EFBFBD></h4>
<pre>
FATFS *fs;
DWORD fre_clust, fre_sect, tot_sect;
// Get drive information and free clusters
res = f_getfree("/", &amp;fre_clust, &amp;fs);
if (res) die(res);
// Get total sectors and free sectors
tot_sect = (fs->max_clust - 2) * fs->csize;
fre_sect = fre_clust * fs->csize;
// Print free space in unit of KB (assuming 512B/sector)
printf("%lu KB total drive space.\n"
"%lu KB available.\n",
fre_sect / 2, tot_sect / 2);
</pre>
</div>
<div class="para">
<h4><EFBFBD>Q<EFBFBD><EFBFBD></h4>
<tt><a href="sfatfs.html">FATFS</a></tt>
</div>
<p class="foot"><a href="../00index_j.html"><EFBFBD>߂<EFBFBD></a></p>
</body>
</html>