|
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.10"/>
- <title>SdFat: FatCache Class Reference</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <script type="text/javascript">
- $(document).ready(function() { init_search(); });
- </script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">SdFat
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.10 -->
- <script type="text/javascript">
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- </script>
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
- <li><a href="files.html"><span>Files</span></a></li>
- <li>
- <div id="MSearchBox" class="MSearchBoxInactive">
- <span class="left">
- <img id="MSearchSelect" src="search/mag_sel.png"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- alt=""/>
- <input type="text" id="MSearchField" value="Search" accesskey="S"
- onfocus="searchBox.OnSearchFieldFocus(true)"
- onblur="searchBox.OnSearchFieldFocus(false)"
- onkeyup="searchBox.OnSearchFieldChange(event)"/>
- </span><span class="right">
- <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
- </span>
- </div>
- </li>
- </ul>
- </div>
- <div id="navrow2" class="tabs2">
- <ul class="tablist">
- <li><a href="annotated.html"><span>Class List</span></a></li>
- <li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
- <li><a href="functions.html"><span>Class Members</span></a></li>
- </ul>
- </div>
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
-
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
-
- </div><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#pub-methods">Public Member Functions</a> |
- <a href="#pub-static-attribs">Static Public Attributes</a> |
- <a href="class_fat_cache-members.html">List of all members</a> </div>
- <div class="headertitle">
- <div class="title">FatCache Class Reference</div> </div>
- </div><!--header-->
- <div class="contents">
-
- <p>Block cache.
- <a href="class_fat_cache.html#details">More...</a></p>
-
- <p><code>#include <FatVolume.h></code></p>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
- Public Member Functions</h2></td></tr>
- <tr class="memitem:ab3d9c4f94af61065b6d6d0892827fd8a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="unioncache__t.html">cache_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#ab3d9c4f94af61065b6d6d0892827fd8a">block</a> ()</td></tr>
- <tr class="separator:ab3d9c4f94af61065b6d6d0892827fd8a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab4d3b0c16bb6a116c7d01afff2dcb307"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#ab4d3b0c16bb6a116c7d01afff2dcb307">dirty</a> ()</td></tr>
- <tr class="separator:ab4d3b0c16bb6a116c7d01afff2dcb307"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae1d8a2da1493b5ffca0520184daaddf1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#ae1d8a2da1493b5ffca0520184daaddf1">init</a> (<a class="el" href="class_fat_volume.html">FatVolume</a> *vol)</td></tr>
- <tr class="separator:ae1d8a2da1493b5ffca0520184daaddf1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a70071a128d647b49b523dbb2f5f944a5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#a70071a128d647b49b523dbb2f5f944a5">invalidate</a> ()</td></tr>
- <tr class="separator:a70071a128d647b49b523dbb2f5f944a5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9f981b53e212f79937e5f6381b169374"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#a9f981b53e212f79937e5f6381b169374">lbn</a> ()</td></tr>
- <tr class="separator:a9f981b53e212f79937e5f6381b169374"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac2bb0b8f2ce3ab5cd86cf30b4a663cea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="unioncache__t.html">cache_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#ac2bb0b8f2ce3ab5cd86cf30b4a663cea">read</a> (uint32_t <a class="el" href="class_fat_cache.html#a9f981b53e212f79937e5f6381b169374">lbn</a>, uint8_t option)</td></tr>
- <tr class="separator:ac2bb0b8f2ce3ab5cd86cf30b4a663cea"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4d76d4f46ce5994f6fc4678a7b4f8cf1"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#a4d76d4f46ce5994f6fc4678a7b4f8cf1">sync</a> ()</td></tr>
- <tr class="separator:a4d76d4f46ce5994f6fc4678a7b4f8cf1"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
- Static Public Attributes</h2></td></tr>
- <tr class="memitem:ab4b446515ff9a0cebc747630ddd10c93"><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#ab4b446515ff9a0cebc747630ddd10c93">CACHE_FOR_READ</a> = 0</td></tr>
- <tr class="separator:ab4b446515ff9a0cebc747630ddd10c93"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a81cb572f33443bd6aee9aa33ec395d0f"><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#a81cb572f33443bd6aee9aa33ec395d0f">CACHE_FOR_WRITE</a> = <a class="el" href="class_fat_cache.html#aac8c38e5c545d0f80b13d816117f626e">CACHE_STATUS_DIRTY</a></td></tr>
- <tr class="separator:a81cb572f33443bd6aee9aa33ec395d0f"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:adf974f55e53ee0aaa85abb0d7d67181c"><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#adf974f55e53ee0aaa85abb0d7d67181c">CACHE_OPTION_NO_READ</a> = 4</td></tr>
- <tr class="separator:adf974f55e53ee0aaa85abb0d7d67181c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a49d2896ff525ab77852f76df5c2a09c2"><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#a49d2896ff525ab77852f76df5c2a09c2">CACHE_RESERVE_FOR_WRITE</a> = <a class="el" href="class_fat_cache.html#aac8c38e5c545d0f80b13d816117f626e">CACHE_STATUS_DIRTY</a> | <a class="el" href="class_fat_cache.html#adf974f55e53ee0aaa85abb0d7d67181c">CACHE_OPTION_NO_READ</a></td></tr>
- <tr class="separator:a49d2896ff525ab77852f76df5c2a09c2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aac8c38e5c545d0f80b13d816117f626e"><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#aac8c38e5c545d0f80b13d816117f626e">CACHE_STATUS_DIRTY</a> = 1</td></tr>
- <tr class="separator:aac8c38e5c545d0f80b13d816117f626e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab70dc4a2e387f0e9bf392044c702ae32"><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#ab70dc4a2e387f0e9bf392044c702ae32">CACHE_STATUS_MASK</a> = <a class="el" href="class_fat_cache.html#aac8c38e5c545d0f80b13d816117f626e">CACHE_STATUS_DIRTY</a> | <a class="el" href="class_fat_cache.html#a45236e1c0a2a098f08d3add0e4b1467a">CACHE_STATUS_MIRROR_FAT</a></td></tr>
- <tr class="separator:ab70dc4a2e387f0e9bf392044c702ae32"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a45236e1c0a2a098f08d3add0e4b1467a"><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_fat_cache.html#a45236e1c0a2a098f08d3add0e4b1467a">CACHE_STATUS_MIRROR_FAT</a> = 2</td></tr>
- <tr class="separator:a45236e1c0a2a098f08d3add0e4b1467a"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>Block cache. </p>
- </div><h2 class="groupheader">Member Function Documentation</h2>
- <a class="anchor" id="ab3d9c4f94af61065b6d6d0892827fd8a"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="unioncache__t.html">cache_t</a>* FatCache::block </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <dl class="section return"><dt>Returns</dt><dd>Cache block address. </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="ab4d3b0c16bb6a116c7d01afff2dcb307"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void FatCache::dirty </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Set current block dirty. </p>
-
- </div>
- </div>
- <a class="anchor" id="ae1d8a2da1493b5ffca0520184daaddf1"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void FatCache::init </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="class_fat_volume.html">FatVolume</a> * </td>
- <td class="paramname"><em>vol</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Initialize the cache. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">vol</td><td><a class="el" href="class_fat_volume.html" title="Access FAT16 and FAT32 volumes on raw file devices. ">FatVolume</a> that owns this <a class="el" href="class_fat_cache.html" title="Block cache. ">FatCache</a>. </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="a70071a128d647b49b523dbb2f5f944a5"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void FatCache::invalidate </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Invalidate current cache block. </p>
-
- </div>
- </div>
- <a class="anchor" id="a9f981b53e212f79937e5f6381b169374"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">uint32_t FatCache::lbn </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <dl class="section return"><dt>Returns</dt><dd>Logical block number for cached block. </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="ac2bb0b8f2ce3ab5cd86cf30b4a663cea"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="unioncache__t.html">cache_t</a> * FatCache::read </td>
- <td>(</td>
- <td class="paramtype">uint32_t </td>
- <td class="paramname"><em>lbn</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>option</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Read a block into the cache. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">lbn</td><td>Block to read. </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">option</td><td>mode for cached block. </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Address of cached block. </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a4d76d4f46ce5994f6fc4678a7b4f8cf1"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool FatCache::sync </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Write current block if dirty. </p><dl class="section return"><dt>Returns</dt><dd>true for success else false. </dd></dl>
-
- </div>
- </div>
- <h2 class="groupheader">Member Data Documentation</h2>
- <a class="anchor" id="ab4b446515ff9a0cebc747630ddd10c93"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">const uint8_t FatCache::CACHE_FOR_READ = 0</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Cache block for read. </p>
-
- </div>
- </div>
- <a class="anchor" id="a81cb572f33443bd6aee9aa33ec395d0f"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">const uint8_t FatCache::CACHE_FOR_WRITE = <a class="el" href="class_fat_cache.html#aac8c38e5c545d0f80b13d816117f626e">CACHE_STATUS_DIRTY</a></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Cache block for write. </p>
-
- </div>
- </div>
- <a class="anchor" id="adf974f55e53ee0aaa85abb0d7d67181c"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">const uint8_t FatCache::CACHE_OPTION_NO_READ = 4</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sync existing block but do not read new block. </p>
-
- </div>
- </div>
- <a class="anchor" id="a49d2896ff525ab77852f76df5c2a09c2"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">const uint8_t FatCache::CACHE_RESERVE_FOR_WRITE = <a class="el" href="class_fat_cache.html#aac8c38e5c545d0f80b13d816117f626e">CACHE_STATUS_DIRTY</a> | <a class="el" href="class_fat_cache.html#adf974f55e53ee0aaa85abb0d7d67181c">CACHE_OPTION_NO_READ</a></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Reserve cache block for write - do not read from block device. </p>
-
- </div>
- </div>
- <a class="anchor" id="aac8c38e5c545d0f80b13d816117f626e"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">const uint8_t FatCache::CACHE_STATUS_DIRTY = 1</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Cached block is dirty </p>
-
- </div>
- </div>
- <a class="anchor" id="ab70dc4a2e387f0e9bf392044c702ae32"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">const uint8_t FatCache::CACHE_STATUS_MASK = <a class="el" href="class_fat_cache.html#aac8c38e5c545d0f80b13d816117f626e">CACHE_STATUS_DIRTY</a> | <a class="el" href="class_fat_cache.html#a45236e1c0a2a098f08d3add0e4b1467a">CACHE_STATUS_MIRROR_FAT</a></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Cache block status bits </p>
-
- </div>
- </div>
- <a class="anchor" id="a45236e1c0a2a098f08d3add0e4b1467a"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">const uint8_t FatCache::CACHE_STATUS_MIRROR_FAT = 2</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Cashed block is FAT entry and must be mirrored in second FAT. </p>
-
- </div>
- </div>
- <hr/>The documentation for this class was generated from the following files:<ul>
- <li>Arduino/libraries/SdFat/src/FatLib/<a class="el" href="_fat_volume_8h.html">FatVolume.h</a></li>
- <li>Arduino/libraries/SdFat/src/FatLib/FatVolume.cpp</li>
- </ul>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Mon Sep 5 2016 10:18:52 for SdFat by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.10
- </small></address>
- </body>
- </html>
|