⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__fat16.html

📁 MMC/SD操作
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>sd-reader: FAT16 support</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.6 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="modules.html"><span>Modules</span></a></li>    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>    <li><a href="files.html"><span>Files</span></a></li>  </ul></div><h1>FAT16 support</h1><hr><a name="_details"></a><h2>Detailed Description</h2>This module implements FAT16 read and write access. <p>The following features are supported:<ul><li>File names up to 31 characters long.</li><li>Unlimited depth of subdirectories.</li><li>Short 8.3 and long filenames.</li><li>Creating and deleting files.</li><li>Reading and writing from and to files.</li><li>File resizing.</li><li>File sizes of up to 4 gigabytes. </li></ul><p><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Files</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat16_8c.html">fat16.c</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">FAT16 implementation. <br></td></tr><p><tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat16_8h.html">fat16.h</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">FAT16 header. <br></td></tr><p><tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat16__config_8h.html">fat16_config.h</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">FAT16 configuration. <br></td></tr><p><tr><td colspan="2"><br><h2>Modules</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html">FAT16 configuration</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Preprocessor defines to configure the FAT16 implementation. <br></td></tr><p><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__fs.html">FAT16 access</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Basic functions for handling a FAT16 filesystem. <br></td></tr><p><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html">FAT16 file functions</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Functions for managing files. <br></td></tr><p><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html">FAT16 directory functions</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Functions for managing directories. <br></td></tr><p><tr><td colspan="2"><br><h2>Data Structures</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Describes a directory entry.  <a href="structfat16__dir__entry__struct.html#_details">More...</a><br></td></tr><tr><td colspan="2"><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">fat16_fs_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gc176ec2f1bfa8c81972ea741a941e579">fat16_open</a> (struct <a class="el" href="structpartition__struct.html">partition_struct</a> *partition)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a FAT16 filesystem.  <a href="#gc176ec2f1bfa8c81972ea741a941e579"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g6588833571e6ef0f5d094b8ff56a5985">fat16_close</a> (struct fat16_fs_struct *fs)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a FAT16 filesystem.  <a href="#g6588833571e6ef0f5d094b8ff56a5985"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">fat16_file_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g3a43c9943251749978645ad8e3f16757">fat16_open_file</a> (struct fat16_fs_struct *fs, const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a file on a FAT16 filesystem.  <a href="#g3a43c9943251749978645ad8e3f16757"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g2b2812041f489bc7913bfa5cbcf0172b">fat16_close_file</a> (struct fat16_file_struct *fd)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a file.  <a href="#g2b2812041f489bc7913bfa5cbcf0172b"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g0af2ef3d690626a5640a334cefbb27a6">fat16_read_file</a> (struct fat16_file_struct *fd, uint8_t *buffer, uint16_t buffer_len)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads data from a file.  <a href="#g0af2ef3d690626a5640a334cefbb27a6"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g4f0c785a47b1cf070839b5edec2c6f65">fat16_write_file</a> (struct fat16_file_struct *fd, const uint8_t *buffer, uint16_t buffer_len)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes data to a file.  <a href="#g4f0c785a47b1cf070839b5edec2c6f65"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gf1511fd1a5419d0828265566dc5d33e4">fat16_seek_file</a> (struct fat16_file_struct *fd, int32_t *offset, uint8_t whence)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Repositions the read/write file offset.  <a href="#gf1511fd1a5419d0828265566dc5d33e4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g23740742fa60ca148ef098caac7085c0">fat16_resize_file</a> (struct fat16_file_struct *fd, uint32_t size)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resizes a file to have a specific size.  <a href="#g23740742fa60ca148ef098caac7085c0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">fat16_dir_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g9704120fef030632a76d91cfbbef78b0">fat16_open_dir</a> (struct fat16_fs_struct *fs, const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a directory.  <a href="#g9704120fef030632a76d91cfbbef78b0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g95f491a5a0b6438781aefaedc250e926">fat16_close_dir</a> (struct fat16_dir_struct *dd)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a directory descriptor.  <a href="#g95f491a5a0b6438781aefaedc250e926"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g73c8f0598e8224736b09644c48cf2970">fat16_read_dir</a> (struct fat16_dir_struct *dd, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads the next directory entry contained within a parent directory.  <a href="#g73c8f0598e8224736b09644c48cf2970"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gaed63addc9b9a3d5137f3b552abb42d8">fat16_reset_dir</a> (struct fat16_dir_struct *dd)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets a directory handle.  <a href="#gaed63addc9b9a3d5137f3b552abb42d8"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gf8029e3ec633902d08e8204d13afc350">fat16_create_file</a> (struct fat16_dir_struct *parent, const char *file, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a file.  <a href="#gf8029e3ec633902d08e8204d13afc350"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#ge060faccbbeca802afe86be2f4d5b485">fat16_delete_file</a> (struct fat16_fs_struct *fs, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a file or directory.  <a href="#ge060faccbbeca802afe86be2f4d5b485"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g0045fe378de2f7c52b528f985e1891a6">fat16_get_dir_entry_of_path</a> (struct fat16_fs_struct *fs, const char *path, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the directory entry of a path.  <a href="#g0045fe378de2f7c52b528f985e1891a6"></a><br></td></tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="g6588833571e6ef0f5d094b8ff56a5985"></a><!-- doxytag: member="fat16.h::fat16_close" ref="g6588833571e6ef0f5d094b8ff56a5985" args="(struct fat16_fs_struct *fs)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void fat16_close           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">struct fat16_fs_struct *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>fs</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Closes a FAT16 filesystem. <p>When this function returns, the given filesystem descriptor will be invalid.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem to close. </td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#gc176ec2f1bfa8c81972ea741a941e579">fat16_open</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="g95f491a5a0b6438781aefaedc250e926"></a><!-- doxytag: member="fat16.h::fat16_close_dir" ref="g95f491a5a0b6438781aefaedc250e926" args="(struct fat16_dir_struct *dd)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void fat16_close_dir           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">struct fat16_dir_struct *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>dd</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Closes a directory descriptor. <p>This function destroys a directory descriptor which was previously obtained by calling <a class="el" href="group__fat16__dir.html#g9704120fef030632a76d91cfbbef78b0">fat16_open_dir()</a>. When this function returns, the given descriptor will be invalid.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dd</em>&nbsp;</td><td>The directory descriptor to close. </td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g9704120fef030632a76d91cfbbef78b0">fat16_open_dir</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="g2b2812041f489bc7913bfa5cbcf0172b"></a><!-- doxytag: member="fat16.h::fat16_close_file" ref="g2b2812041f489bc7913bfa5cbcf0172b" args="(struct fat16_file_struct *fd)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void fat16_close_file           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">struct fat16_file_struct *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>fd</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Closes a file. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file handle of the file to close. </td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g3a43c9943251749978645ad8e3f16757">fat16_open_file</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="gf8029e3ec633902d08e8204d13afc350"></a><!-- doxytag: member="fat16.h::fat16_create_file" ref="gf8029e3ec633902d08e8204d13afc350" args="(struct fat16_dir_struct *parent, const char *file, struct fat16_dir_entry_struct *dir_entry)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">uint8_t fat16_create_file           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">struct fat16_dir_struct *&nbsp;</td>          <td class="mdname" nowrap> <em>parent</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const char *&nbsp;</td>          <td class="mdname" nowrap> <em>file</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>dir_entry</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Creates a file. <p>Creates a file and obtains the directory entry of the new file. If the file to create already exists, the directory entry of the existing file will be returned within the dir_entry parameter.<p><dl compact><dt><b>Note:</b></dt><dd>The file name is not checked for invalid characters.<p>The generation of the short 8.3 file name is quite simple. The first eight characters are used for the filename. The extension, if any, is made up of the first three characters following the last dot within the long filename. If the filename (without the extension) is longer than eight characters, the lower byte of the cluster number replaces the last two characters to avoid name clashes. In any other case, it is your responsibility to avoid name clashes.</dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>parent</em>&nbsp;</td><td>The handle of the directory in which to create the file. </td></tr>    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>file</em>&nbsp;</td><td>The name of the file to create. </td></tr>    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry to fill for the new file. </td></tr>  </table></dl>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -