You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
MicroDexed/third-party/SdFs/doc/html/class_sd_spi_lib_driver.html

435 lines
17 KiB

<!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>SdFs: SdSpiLibDriver 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">SdFs
</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&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</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&#160;List</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;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> &#124;
<a href="class_sd_spi_lib_driver-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">SdSpiLibDriver Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="class_sd_spi_lib_driver.html" title="SdSpiLibDriver - use standard SPI library. ">SdSpiLibDriver</a> - use standard SPI library.
<a href="class_sd_spi_lib_driver.html#details">More...</a></p>
<p><code>#include &lt;SdSpiDriver.h&gt;</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:aeb8263fb0eaca724af90830e90ddd044"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#aeb8263fb0eaca724af90830e90ddd044">activate</a> ()</td></tr>
<tr class="separator:aeb8263fb0eaca724af90830e90ddd044"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b4dbeacb36a55abd7ad8d0dd1cd1a01"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a1b4dbeacb36a55abd7ad8d0dd1cd1a01">begin</a> (<a class="el" href="class_sd_spi_config.html">SdSpiConfig</a> spiConfig)</td></tr>
<tr class="separator:a1b4dbeacb36a55abd7ad8d0dd1cd1a01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a120d6b78f9dad6837d10b45b76d32c82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a120d6b78f9dad6837d10b45b76d32c82">deactivate</a> ()</td></tr>
<tr class="separator:a120d6b78f9dad6837d10b45b76d32c82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acab44a1709ed382264e0844a544526d7"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#acab44a1709ed382264e0844a544526d7">receive</a> ()</td></tr>
<tr class="separator:acab44a1709ed382264e0844a544526d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a961697c166b9965ab495e22b12f01ae9"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a961697c166b9965ab495e22b12f01ae9">receive</a> (uint8_t *buf, size_t n)</td></tr>
<tr class="separator:a961697c166b9965ab495e22b12f01ae9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af24e0b0555b068d059b895314a77785d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#af24e0b0555b068d059b895314a77785d">select</a> ()</td></tr>
<tr class="separator:af24e0b0555b068d059b895314a77785d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed31a7a2cc1b07200f6b295659b39a26"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#aed31a7a2cc1b07200f6b295659b39a26">send</a> (uint8_t data)</td></tr>
<tr class="separator:aed31a7a2cc1b07200f6b295659b39a26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dc6c188ff9be18aa46234c4bdc4e536"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a2dc6c188ff9be18aa46234c4bdc4e536">send</a> (const uint8_t *buf, size_t n)</td></tr>
<tr class="separator:a2dc6c188ff9be18aa46234c4bdc4e536"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99fb51a9a567923fa7f87374e0aa124f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a99fb51a9a567923fa7f87374e0aa124f">setSpiSettings</a> (SPISettings spiSettings)</td></tr>
<tr class="separator:a99fb51a9a567923fa7f87374e0aa124f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a593b443dca85fe4de76ab06547233429"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a593b443dca85fe4de76ab06547233429">unselect</a> ()</td></tr>
<tr class="separator:a593b443dca85fe4de76ab06547233429"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_sd_spi_lib_driver.html" title="SdSpiLibDriver - use standard SPI library. ">SdSpiLibDriver</a> - use standard SPI library. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aeb8263fb0eaca724af90830e90ddd044"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SdSpiLibDriver::activate </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>Activate SPI hardware. </p>
</div>
</div>
<a class="anchor" id="a1b4dbeacb36a55abd7ad8d0dd1cd1a01"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SdSpiLibDriver::begin </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_sd_spi_config.html">SdSpiConfig</a>&#160;</td>
<td class="paramname"><em>spiConfig</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 SPI bus.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">spiConfig</td><td>SD card configuration. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a120d6b78f9dad6837d10b45b76d32c82"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SdSpiLibDriver::deactivate </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>Deactivate SPI hardware. </p>
</div>
</div>
<a class="anchor" id="acab44a1709ed382264e0844a544526d7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint8_t SdSpiLibDriver::receive </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>Receive a byte.</p>
<dl class="section return"><dt>Returns</dt><dd>The byte. </dd></dl>
</div>
</div>
<a class="anchor" id="a961697c166b9965ab495e22b12f01ae9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint8_t SdSpiLibDriver::receive </td>
<td>(</td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>buf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>n</em>&#160;</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> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Receive multiple bytes.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Buffer to receive the data. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to receive.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Zero for no error or nonzero error code. </dd></dl>
</div>
</div>
<a class="anchor" id="af24e0b0555b068d059b895314a77785d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SdSpiLibDriver::select </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 CS low. </p>
</div>
</div>
<a class="anchor" id="aed31a7a2cc1b07200f6b295659b39a26"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SdSpiLibDriver::send </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>data</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>Send a byte.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Byte to send </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a2dc6c188ff9be18aa46234c4bdc4e536"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SdSpiLibDriver::send </td>
<td>(</td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>buf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>n</em>&#160;</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> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Send multiple bytes.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Buffer for data to be sent. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to send. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a99fb51a9a567923fa7f87374e0aa124f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SdSpiLibDriver::setSpiSettings </td>
<td>(</td>
<td class="paramtype">SPISettings&#160;</td>
<td class="paramname"><em>spiSettings</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>Save SPISettings.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">spiSettings</td><td>SPI speed, mode, and byte order. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a593b443dca85fe4de76ab06547233429"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SdSpiLibDriver::unselect </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 CS high. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ArduinoSdFs/libraries/SdFs/src/SpiDriver/<a class="el" href="_sd_spi_driver_8h.html">SdSpiDriver.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Sep 1 2017 03:20:54 for SdFs by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>