This repository has been archived on 2020-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
arduino_universal_serial_ad.../Libraries/SdFat/html/class_sd2_card.html

593 lines
28 KiB
HTML
Raw Normal View History

<!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"/>
<title>SdFat: Sd2Card Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<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>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;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>
</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>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">Sd2Card Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="Sd2Card" -->
<p>Raw access to SD and SDHC flash memory cards.
<a href="class_sd2_card.html#details">More...</a></p>
<p><code>#include &lt;Sd2Card.h&gt;</code></p>
<p><a href="class_sd2_card-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a21ef1c5321041d4d73107b84e2db5189">cardSize</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a2d73473118c5692e0f7d13db7da3570f">erase</a> (uint32_t firstBlock, uint32_t lastBlock)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#aceacbe30077e41ab84a34e629a03bb33">eraseSingleBlockEnable</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#af03e574590524f93a61641604e02f79f">error</a> (uint8_t code)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a3549d1878c0134171e399fd2d60b96f7">errorCode</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a1736acdbf194c6a2fd923c0a5049c016">errorData</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a9aa3e3d0919b5270d65f3171b952962e">init</a> (uint8_t sckRateID=<a class="el" href="_sd2_card_8h.html#a6c091c07d1eb82a94b1c5738f720264b">SPI_FULL_SPEED</a>, uint8_t chipSelectPin=<a class="el" href="_sd2_card_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">SD_CHIP_SELECT_PIN</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a6b015ee1c94004b8b16639910e5a3466">readBlock</a> (uint32_t block, uint8_t *dst)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#abaf488d56f653efa8e3349bf803ce2b0">readCID</a> (cid_t *cid)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a1b0c68df7f508f876d56fc1270536c87">readCSD</a> (csd_t *csd)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a7d6e8a504f8525afd6d36a22ee5b8cc0">readData</a> (uint8_t *dst)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a3259be9721e14a2edf8b549e4aeb2e40">readStart</a> (uint32_t blockNumber)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#ae133ad5a80c2652a964afd2320cc7c94">readStop</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a17c8713ae610106567679a8685696375">Sd2Card</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#adc6566016a5c4f459d123bee64730051">setSckRate</a> (uint8_t sckRateID)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#adcee026d613619414e2b6d3eca2c6537">type</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#ad5eecc3e1e68b9e5a43edfb8e4205469">writeBlock</a> (uint32_t blockNumber, const uint8_t *src)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#afb96025babf92878213dd691263d93ef">writeData</a> (const uint8_t *src)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a1039df4f6620213a98b317d11da2014e">writeStart</a> (uint32_t blockNumber, uint32_t eraseCount)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a7e1ec48b0a83d13415841da870290f64">writeStop</a> ()</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Raw access to SD and SDHC flash memory cards. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a17c8713ae610106567679a8685696375"></a><!-- doxytag: member="Sd2Card::Sd2Card" ref="a17c8713ae610106567679a8685696375" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Sd2Card::Sd2Card </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Construct an instance of <a class="el" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a>. </p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a21ef1c5321041d4d73107b84e2db5189"></a><!-- doxytag: member="Sd2Card::cardSize" ref="a21ef1c5321041d4d73107b84e2db5189" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t Sd2Card::cardSize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Determine the size of an SD flash memory card.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of 512 byte data blocks in the card or zero if an error occurs. </dd></dl>
</div>
</div>
<a class="anchor" id="a2d73473118c5692e0f7d13db7da3570f"></a><!-- doxytag: member="Sd2Card::erase" ref="a2d73473118c5692e0f7d13db7da3570f" args="(uint32_t firstBlock, uint32_t lastBlock)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::erase </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>firstBlock</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>lastBlock</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Erase a range of blocks.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">firstBlock</td><td>The address of the first block in the range. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">lastBlock</td><td>The address of the last block in the range.</td></tr>
</table>
</dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>This function requests the SD card to do a flash erase for a range of blocks. The data on the card after an erase operation is either 0 or 1, depends on the card vendor. The card must support single block erase.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="aceacbe30077e41ab84a34e629a03bb33"></a><!-- doxytag: member="Sd2Card::eraseSingleBlockEnable" ref="aceacbe30077e41ab84a34e629a03bb33" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::eraseSingleBlockEnable </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Determine if card supports single block erase.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned if single block erase is supported. The value zero, false, is returned if single block erase is not supported. </dd></dl>
</div>
</div>
<a class="anchor" id="af03e574590524f93a61641604e02f79f"></a><!-- doxytag: member="Sd2Card::error" ref="af03e574590524f93a61641604e02f79f" args="(uint8_t code)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Sd2Card::error </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>code</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set SD error code. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>value for error code. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a3549d1878c0134171e399fd2d60b96f7"></a><!-- doxytag: member="Sd2Card::errorCode" ref="a3549d1878c0134171e399fd2d60b96f7" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Sd2Card::errorCode </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>error code for last error. See <a class="el" href="_sd2_card_8h.html" title="Sd2Card class for V2 SD/SDHC cards.">Sd2Card.h</a> for a list of error codes. </dd></dl>
</div>
</div>
<a class="anchor" id="a1736acdbf194c6a2fd923c0a5049c016"></a><!-- doxytag: member="Sd2Card::errorData" ref="a1736acdbf194c6a2fd923c0a5049c016" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Sd2Card::errorData </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>error data for last error. </dd></dl>
</div>
</div>
<a class="anchor" id="a9aa3e3d0919b5270d65f3171b952962e"></a><!-- doxytag: member="Sd2Card::init" ref="a9aa3e3d0919b5270d65f3171b952962e" args="(uint8_t sckRateID=SPI_FULL_SPEED, uint8_t chipSelectPin=SD_CHIP_SELECT_PIN)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::init </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>sckRateID</em> = <code><a class="el" href="_sd2_card_8h.html#a6c091c07d1eb82a94b1c5738f720264b">SPI_FULL_SPEED</a></code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>chipSelectPin</em> = <code><a class="el" href="_sd2_card_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">SD_CHIP_SELECT_PIN</a></code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Initialize an SD flash memory card with default clock rate and chip select pin. See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin).</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true for success or false for failure.</dd></dl>
<p>Initialize an SD flash memory card.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">sckRateID</td><td>SPI clock rate selector. See <a class="el" href="class_sd2_card.html#adc6566016a5c4f459d123bee64730051">setSckRate()</a>. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">chipSelectPin</td><td>SD chip select pin number.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. The reason for failure can be determined by calling <a class="el" href="class_sd2_card.html#a3549d1878c0134171e399fd2d60b96f7">errorCode()</a> and <a class="el" href="class_sd2_card.html#a1736acdbf194c6a2fd923c0a5049c016">errorData()</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="a6b015ee1c94004b8b16639910e5a3466"></a><!-- doxytag: member="Sd2Card::readBlock" ref="a6b015ee1c94004b8b16639910e5a3466" args="(uint32_t block, uint8_t *dst)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::readBlock </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>blockNumber</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>dst</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read a 512 byte block from an SD card.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Logical block to be read. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location that will receive the data.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="abaf488d56f653efa8e3349bf803ce2b0"></a><!-- doxytag: member="Sd2Card::readCID" ref="abaf488d56f653efa8e3349bf803ce2b0" args="(cid_t *cid)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::readCID </td>
<td>(</td>
<td class="paramtype">cid_t *&#160;</td>
<td class="paramname"><em>cid</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read a card's CID register. The CID contains card identification information such as Manufacturer ID, Product name, Product serial number and Manufacturing date.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">cid</td><td>pointer to area for returned data.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true for success or false for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a1b0c68df7f508f876d56fc1270536c87"></a><!-- doxytag: member="Sd2Card::readCSD" ref="a1b0c68df7f508f876d56fc1270536c87" args="(csd_t *csd)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::readCSD </td>
<td>(</td>
<td class="paramtype">csd_t *&#160;</td>
<td class="paramname"><em>csd</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read a card's CSD register. The CSD contains Card-Specific Data that provides information regarding access to the card's contents.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">csd</td><td>pointer to area for returned data.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true for success or false for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a7d6e8a504f8525afd6d36a22ee5b8cc0"></a><!-- doxytag: member="Sd2Card::readData" ref="a7d6e8a504f8525afd6d36a22ee5b8cc0" args="(uint8_t *dst)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::readData </td>
<td>(</td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>dst</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read one data block in a multiple block read sequence</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">dst</td><td>Pointer to the location for the data to be read.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a3259be9721e14a2edf8b549e4aeb2e40"></a><!-- doxytag: member="Sd2Card::readStart" ref="a3259be9721e14a2edf8b549e4aeb2e40" args="(uint32_t blockNumber)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::readStart </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>blockNumber</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Start a read multiple blocks sequence.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Address of first block in sequence.</td></tr>
</table>
</dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>This function is used with <a class="el" href="class_sd2_card.html#a7d6e8a504f8525afd6d36a22ee5b8cc0">readData()</a> and <a class="el" href="class_sd2_card.html#ae133ad5a80c2652a964afd2320cc7c94">readStop()</a> for optimized multiple block reads. SPI chipSelect must be low for the entire sequence.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="ae133ad5a80c2652a964afd2320cc7c94"></a><!-- doxytag: member="Sd2Card::readStop" ref="ae133ad5a80c2652a964afd2320cc7c94" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::readStop </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>End a read multiple blocks sequence.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="adc6566016a5c4f459d123bee64730051"></a><!-- doxytag: member="Sd2Card::setSckRate" ref="adc6566016a5c4f459d123bee64730051" args="(uint8_t sckRateID)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::setSckRate </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>sckRateID</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the SPI clock rate.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">sckRateID</td><td>A value in the range [0, 14].</td></tr>
</table>
</dd>
</dl>
<p>The SPI clock divisor will be set to approximately</p>
<p>(2 + (sckRateID &amp; 1)) &lt;&lt; ( sckRateID/2)</p>
<p>The maximum SPI rate is F_CPU/2 for <em>sckRateID</em> = 0 and the rate is F_CPU/128 for <em>scsRateID</em> = 12.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for an invalid value of <em>sckRateID</em>. </dd></dl>
</div>
</div>
<a class="anchor" id="adcee026d613619414e2b6d3eca2c6537"></a><!-- doxytag: member="Sd2Card::type" ref="adcee026d613619414e2b6d3eca2c6537" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Sd2Card::type </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the card type: SD V1, SD V2 or SDHC </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 - SD V1, 1 - SD V2, or 3 - SDHC. </dd></dl>
</div>
</div>
<a class="anchor" id="ad5eecc3e1e68b9e5a43edfb8e4205469"></a><!-- doxytag: member="Sd2Card::writeBlock" ref="ad5eecc3e1e68b9e5a43edfb8e4205469" args="(uint32_t blockNumber, const uint8_t *src)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::writeBlock </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>blockNumber</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>src</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Writes a 512 byte block to an SD card.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Logical block to be written. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="afb96025babf92878213dd691263d93ef"></a><!-- doxytag: member="Sd2Card::writeData" ref="afb96025babf92878213dd691263d93ef" args="(const uint8_t *src)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::writeData </td>
<td>(</td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>src</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Write one data block in a multiple block write sequence </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a1039df4f6620213a98b317d11da2014e"></a><!-- doxytag: member="Sd2Card::writeStart" ref="a1039df4f6620213a98b317d11da2014e" args="(uint32_t blockNumber, uint32_t eraseCount)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::writeStart </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>blockNumber</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>eraseCount</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Start a write multiple blocks sequence.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Address of first block in sequence. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">eraseCount</td><td>The number of blocks to be pre-erased.</td></tr>
</table>
</dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>This function is used with <a class="el" href="class_sd2_card.html#afb96025babf92878213dd691263d93ef">writeData()</a> and <a class="el" href="class_sd2_card.html#a7e1ec48b0a83d13415841da870290f64">writeStop()</a> for optimized multiple block writes.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a7e1ec48b0a83d13415841da870290f64"></a><!-- doxytag: member="Sd2Card::writeStop" ref="a7e1ec48b0a83d13415841da870290f64" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Sd2Card::writeStop </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>End a write multiple blocks sequence.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value one, true, is returned for success and the value zero, false, is returned for failure. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>Arduino/libraries/SdFat/<a class="el" href="_sd2_card_8h.html">Sd2Card.h</a></li>
<li>Arduino/libraries/SdFat/Sd2Card.cpp</li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Feb 7 2013 12:51:22 for SdFat by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>