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.
397 lines
16 KiB
397 lines
16 KiB
5 years ago
|
<!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: SdSpiAltDriver 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 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 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="class_sd_spi_alt_driver-members.html">List of all members</a> </div>
|
||
|
<div class="headertitle">
|
||
|
<div class="title">SdSpiAltDriver Class Reference</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
|
||
|
<p>Optimized SPI class for access to SD and SDHC flash memory cards.
|
||
|
<a href="class_sd_spi_alt_driver.html#details">More...</a></p>
|
||
|
|
||
|
<p><code>#include <SdSpiDriver.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:a53cb88d35df119828ec3702a39552e93"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_alt_driver.html#a53cb88d35df119828ec3702a39552e93">activate</a> ()</td></tr>
|
||
|
<tr class="separator:a53cb88d35df119828ec3702a39552e93"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a2f8bd4ead9808574c2652fe44deb149e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_alt_driver.html#a2f8bd4ead9808574c2652fe44deb149e">begin</a> (<a class="el" href="class_sd_spi_config.html">SdSpiConfig</a> spiConfig)</td></tr>
|
||
|
<tr class="separator:a2f8bd4ead9808574c2652fe44deb149e"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ae6ce25d124e31a8762375ae548a92818"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_alt_driver.html#ae6ce25d124e31a8762375ae548a92818">deactivate</a> ()</td></tr>
|
||
|
<tr class="separator:ae6ce25d124e31a8762375ae548a92818"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a699a82eb31d5637c42f77495af8ee3b5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_alt_driver.html#a699a82eb31d5637c42f77495af8ee3b5">end</a> ()</td></tr>
|
||
|
<tr class="separator:a699a82eb31d5637c42f77495af8ee3b5"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a639cae65cc4f66e70a39c5b3fc00aa76"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_alt_driver.html#a639cae65cc4f66e70a39c5b3fc00aa76">receive</a> ()</td></tr>
|
||
|
<tr class="separator:a639cae65cc4f66e70a39c5b3fc00aa76"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:accca10152516408100e890e9abb2bc64"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_alt_driver.html#accca10152516408100e890e9abb2bc64">receive</a> (uint8_t *buf, size_t n)</td></tr>
|
||
|
<tr class="separator:accca10152516408100e890e9abb2bc64"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a1e52a39ab018b5c07089befbec21ada5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_alt_driver.html#a1e52a39ab018b5c07089befbec21ada5">select</a> ()</td></tr>
|
||
|
<tr class="separator:a1e52a39ab018b5c07089befbec21ada5"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a872ec7667a758f2fbcb8bf987ea825c4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_alt_driver.html#a872ec7667a758f2fbcb8bf987ea825c4">send</a> (uint8_t data)</td></tr>
|
||
|
<tr class="separator:a872ec7667a758f2fbcb8bf987ea825c4"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a9399a2957507a822f3b1b2630b81c510"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_alt_driver.html#a9399a2957507a822f3b1b2630b81c510">send</a> (const uint8_t *buf, size_t n)</td></tr>
|
||
|
<tr class="separator:a9399a2957507a822f3b1b2630b81c510"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a91d7ef40a801ae73d0e0b5f440ab0eef"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_alt_driver.html#a91d7ef40a801ae73d0e0b5f440ab0eef">setSpiSettings</a> (SPISettings spiSettings)</td></tr>
|
||
|
<tr class="separator:a91d7ef40a801ae73d0e0b5f440ab0eef"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a731497cc1efc4bd0875d61b0d84979ff"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_alt_driver.html#a731497cc1efc4bd0875d61b0d84979ff">unselect</a> ()</td></tr>
|
||
|
<tr class="separator:a731497cc1efc4bd0875d61b0d84979ff"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
</table>
|
||
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||
|
<div class="textblock"><p>Optimized SPI class for access to SD and SDHC flash memory cards. </p>
|
||
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
||
|
<a class="anchor" id="a53cb88d35df119828ec3702a39552e93"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void SdSpiAltDriver::activate </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>Activate SPI hardware. </p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a2f8bd4ead9808574c2652fe44deb149e"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void SdSpiAltDriver::begin </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="class_sd_spi_config.html">SdSpiConfig</a> </td>
|
||
|
<td class="paramname"><em>spiConfig</em></td><td>)</td>
|
||
|
<td></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="ae6ce25d124e31a8762375ae548a92818"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void SdSpiAltDriver::deactivate </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>Deactivate SPI hardware. </p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a699a82eb31d5637c42f77495af8ee3b5"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void SdSpiAltDriver::end </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>deactivate SPI driver. </p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a639cae65cc4f66e70a39c5b3fc00aa76"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">uint8_t SdSpiAltDriver::receive </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></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="accca10152516408100e890e9abb2bc64"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">uint8_t SdSpiAltDriver::receive </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">uint8_t * </td>
|
||
|
<td class="paramname"><em>buf</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">size_t </td>
|
||
|
<td class="paramname"><em>n</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></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="a1e52a39ab018b5c07089befbec21ada5"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void SdSpiAltDriver::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="a872ec7667a758f2fbcb8bf987ea825c4"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void SdSpiAltDriver::send </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">uint8_t </td>
|
||
|
<td class="paramname"><em>data</em></td><td>)</td>
|
||
|
<td></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="a9399a2957507a822f3b1b2630b81c510"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void SdSpiAltDriver::send </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">const uint8_t * </td>
|
||
|
<td class="paramname"><em>buf</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">size_t </td>
|
||
|
<td class="paramname"><em>n</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></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="a91d7ef40a801ae73d0e0b5f440ab0eef"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void SdSpiAltDriver::setSpiSettings </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">SPISettings </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="a731497cc1efc4bd0875d61b0d84979ff"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void SdSpiAltDriver::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  <a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||
|
</a> 1.8.10
|
||
|
</small></address>
|
||
|
</body>
|
||
|
</html>
|