|
- <!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.8"/>
- <title>SdFat: Fast Pin I/O</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/search.js"></script>
- <script type="text/javascript">
- $(document).ready(function() { searchBox.OnSelectItem(0); });
- </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 style="padding-left: 0.5em;">
- <div id="projectname">SdFat
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.8 -->
- <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><a href="modules.html"><span>Modules</span></a></li>
- <li><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><!-- top -->
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Modules</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Pages</a></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 class="header">
- <div class="summary">
- <a href="#nested-classes">Classes</a> |
- <a href="#func-members">Functions</a> |
- <a href="#var-members">Variables</a> </div>
- <div class="headertitle">
- <div class="title">Fast Pin I/O</div> </div>
- </div><!--header-->
- <div class="contents">
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
- Classes</h2></td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_digital_pin.html">DigitalPin< PinNumber ></a></td></tr>
- <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Fast digital port I/O. <a href="class_digital_pin.html#details">More...</a><br /></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="structpin__map__t.html">pin_map_t</a></td></tr>
- <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">struct for mapping digital pins <a href="structpin__map__t.html#details">More...</a><br /></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:ga107992311bca47c7ebee5afdedc280e0"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital_pin.html#ga107992311bca47c7ebee5afdedc280e0">badPinCheck</a> (uint8_t pin)</td></tr>
- <tr class="separator:ga107992311bca47c7ebee5afdedc280e0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ga2a50c39692fdc6a7be0f614f6d730bfe"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital_pin.html#ga2a50c39692fdc6a7be0f614f6d730bfe">badPinNumber</a> (void)</td></tr>
- <tr class="separator:ga2a50c39692fdc6a7be0f614f6d730bfe"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:gac074e589cd04dca057b403dd3781ee45"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital_pin.html#gac074e589cd04dca057b403dd3781ee45">fastBitWriteSafe</a> (volatile uint8_t *address, uint8_t bit, bool level)</td></tr>
- <tr class="separator:gac074e589cd04dca057b403dd3781ee45"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ga618a9ee1c3d1b9fc5c8a2c6a43014b08"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital_pin.html#ga618a9ee1c3d1b9fc5c8a2c6a43014b08">fastDigitalRead</a> (uint8_t pin)</td></tr>
- <tr class="separator:ga618a9ee1c3d1b9fc5c8a2c6a43014b08"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ga5314f1aaede89a4090b44779c8c551f1"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital_pin.html#ga5314f1aaede89a4090b44779c8c551f1">fastDigitalToggle</a> (uint8_t pin)</td></tr>
- <tr class="separator:ga5314f1aaede89a4090b44779c8c551f1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:gac4f52b5038c366dd4ac081b18709f19c"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital_pin.html#gac4f52b5038c366dd4ac081b18709f19c">fastDigitalWrite</a> (uint8_t pin, bool level)</td></tr>
- <tr class="separator:gac4f52b5038c366dd4ac081b18709f19c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ga6d022f02ed0a7d69d56521346bb81457"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital_pin.html#ga6d022f02ed0a7d69d56521346bb81457">fastPinConfig</a> (uint8_t pin, bool mode, bool level)</td></tr>
- <tr class="separator:ga6d022f02ed0a7d69d56521346bb81457"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:gac66bd0bc3332b7a08f257058034cdba8"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital_pin.html#gac66bd0bc3332b7a08f257058034cdba8">fastPinMode</a> (uint8_t pin, bool mode)</td></tr>
- <tr class="separator:gac66bd0bc3332b7a08f257058034cdba8"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
- Variables</h2></td></tr>
- <tr class="memitem:ga3ba5f4d8ff10e60ec2d424722dd9fe92"><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital_pin.html#ga3ba5f4d8ff10e60ec2d424722dd9fe92">digitalPinCount</a> = sizeof(pinMap)/sizeof(<a class="el" href="structpin__map__t.html">pin_map_t</a>)</td></tr>
- <tr class="separator:ga3ba5f4d8ff10e60ec2d424722dd9fe92"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <p>Fast Digital I/O functions and template class. </p>
- <h2 class="groupheader">Function Documentation</h2>
- <a class="anchor" id="ga107992311bca47c7ebee5afdedc280e0"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static void badPinCheck </td>
- <td>(</td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>pin</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Check for valid pin number </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>Number of pin to be checked. </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="ga2a50c39692fdc6a7be0f614f6d730bfe"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void badPinNumber </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>generate bad pin number error </p>
-
- </div>
- </div>
- <a class="anchor" id="gac074e589cd04dca057b403dd3781ee45"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static void fastBitWriteSafe </td>
- <td>(</td>
- <td class="paramtype">volatile uint8_t * </td>
- <td class="paramname"><em>address</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>bit</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>level</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>fast write helper </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>I/O register address </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">bit</td><td>bit number to write </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">level</td><td>value for bit </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="ga618a9ee1c3d1b9fc5c8a2c6a43014b08"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static bool fastDigitalRead </td>
- <td>(</td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>pin</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>read pin value </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>Arduino pin number </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>value read </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="ga5314f1aaede89a4090b44779c8c551f1"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static void fastDigitalToggle </td>
- <td>(</td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>pin</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>toggle a pin </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>Arduino pin number</td></tr>
- </table>
- </dd>
- </dl>
- <p>If the pin is in output mode toggle the pin level. If the pin is in input mode toggle the state of the 20K pull-up. </p>
-
- </div>
- </div>
- <a class="anchor" id="gac4f52b5038c366dd4ac081b18709f19c"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static void fastDigitalWrite </td>
- <td>(</td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>pin</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>level</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Set pin value </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>Arduino pin number </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">level</td><td>value to write </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="ga6d022f02ed0a7d69d56521346bb81457"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static void fastPinConfig </td>
- <td>(</td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>pin</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>mode</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>level</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>set pin configuration </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>Arduino pin number </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>If true set output mode else input mode </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">level</td><td>If mode is output, set level high/low. If mode is input, enable or disable the pin's 20K pull-up. </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="gac66bd0bc3332b7a08f257058034cdba8"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static void fastPinMode </td>
- <td>(</td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>pin</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>mode</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>set pin mode </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>Arduino pin number </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>if true set output mode else input mode</td></tr>
- </table>
- </dd>
- </dl>
- <p>fastPinMode does not enable or disable the 20K pull-up for input mode. </p>
-
- </div>
- </div>
- <h2 class="groupheader">Variable Documentation</h2>
- <a class="anchor" id="ga3ba5f4d8ff10e60ec2d424722dd9fe92"></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 digitalPinCount = sizeof(pinMap)/sizeof(<a class="el" href="structpin__map__t.html">pin_map_t</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>count of pins </p>
-
- </div>
- </div>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Sun Feb 1 2015 10:21:39 for SdFat by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.8
- </small></address>
- </body>
- </html>
|