|
- <!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.6"/>
- <title>SdFat: Sd2Card 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="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.6 -->
- <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>
- </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>
- </div><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#pub-methods">Public Member Functions</a> |
- <a href="class_sd2_card-members.html">List of all members</a> </div>
- <div class="headertitle">
- <div class="title">Sd2Card Class Reference</div> </div>
- </div><!--header-->
- <div class="contents">
-
- <p>Raw access to SD and SDHC flash memory cards.
- <a href="class_sd2_card.html#details">More...</a></p>
-
- <p><code>#include <Sd2Card.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:a4e55e83403be452b10b0564ca63896f1"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a4e55e83403be452b10b0564ca63896f1">begin</a> (uint8_t chipSelectPin=<a class="el" href="_sd_spi_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">SD_CHIP_SELECT_PIN</a>, uint8_t <a class="el" href="class_sd2_card.html#a6bcfd1bf665bf4ff88a46c07741fac43">sckDivisor</a>=SPI_FULL_SPEED)</td></tr>
- <tr class="separator:a4e55e83403be452b10b0564ca63896f1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a21ef1c5321041d4d73107b84e2db5189"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a21ef1c5321041d4d73107b84e2db5189">cardSize</a> ()</td></tr>
- <tr class="separator:a21ef1c5321041d4d73107b84e2db5189"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2d73473118c5692e0f7d13db7da3570f"><td class="memItemLeft" align="right" valign="top">bool </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 class="separator:a2d73473118c5692e0f7d13db7da3570f"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aceacbe30077e41ab84a34e629a03bb33"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#aceacbe30077e41ab84a34e629a03bb33">eraseSingleBlockEnable</a> ()</td></tr>
- <tr class="separator:aceacbe30077e41ab84a34e629a03bb33"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af03e574590524f93a61641604e02f79f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#af03e574590524f93a61641604e02f79f">error</a> (uint8_t code)</td></tr>
- <tr class="separator:af03e574590524f93a61641604e02f79f"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3549d1878c0134171e399fd2d60b96f7"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a3549d1878c0134171e399fd2d60b96f7">errorCode</a> () const </td></tr>
- <tr class="separator:a3549d1878c0134171e399fd2d60b96f7"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1736acdbf194c6a2fd923c0a5049c016"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a1736acdbf194c6a2fd923c0a5049c016">errorData</a> () const </td></tr>
- <tr class="separator:a1736acdbf194c6a2fd923c0a5049c016"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a71523097165fce957c7f65b033471fc7"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a71523097165fce957c7f65b033471fc7">init</a> (uint8_t <a class="el" href="class_sd2_card.html#a6bcfd1bf665bf4ff88a46c07741fac43">sckDivisor</a>=SPI_FULL_SPEED, uint8_t chipSelectPin=<a class="el" href="_sd_spi_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">SD_CHIP_SELECT_PIN</a>)</td></tr>
- <tr class="separator:a71523097165fce957c7f65b033471fc7"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a28eafda720598dcb2923955776199e19"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a28eafda720598dcb2923955776199e19">isBusy</a> ()</td></tr>
- <tr class="separator:a28eafda720598dcb2923955776199e19"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6b015ee1c94004b8b16639910e5a3466"><td class="memItemLeft" align="right" valign="top">bool </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 class="separator:a6b015ee1c94004b8b16639910e5a3466"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:abaf488d56f653efa8e3349bf803ce2b0"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#abaf488d56f653efa8e3349bf803ce2b0">readCID</a> (cid_t *cid)</td></tr>
- <tr class="separator:abaf488d56f653efa8e3349bf803ce2b0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1b0c68df7f508f876d56fc1270536c87"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a1b0c68df7f508f876d56fc1270536c87">readCSD</a> (csd_t *csd)</td></tr>
- <tr class="separator:a1b0c68df7f508f876d56fc1270536c87"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a7d6e8a504f8525afd6d36a22ee5b8cc0"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a7d6e8a504f8525afd6d36a22ee5b8cc0">readData</a> (uint8_t *dst)</td></tr>
- <tr class="separator:a7d6e8a504f8525afd6d36a22ee5b8cc0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3259be9721e14a2edf8b549e4aeb2e40"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a3259be9721e14a2edf8b549e4aeb2e40">readStart</a> (uint32_t blockNumber)</td></tr>
- <tr class="separator:a3259be9721e14a2edf8b549e4aeb2e40"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae133ad5a80c2652a964afd2320cc7c94"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#ae133ad5a80c2652a964afd2320cc7c94">readStop</a> ()</td></tr>
- <tr class="separator:ae133ad5a80c2652a964afd2320cc7c94"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6bcfd1bf665bf4ff88a46c07741fac43"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a6bcfd1bf665bf4ff88a46c07741fac43">sckDivisor</a> ()</td></tr>
- <tr class="separator:a6bcfd1bf665bf4ff88a46c07741fac43"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a17c8713ae610106567679a8685696375"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a17c8713ae610106567679a8685696375">Sd2Card</a> ()</td></tr>
- <tr class="separator:a17c8713ae610106567679a8685696375"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:adcee026d613619414e2b6d3eca2c6537"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#adcee026d613619414e2b6d3eca2c6537">type</a> () const </td></tr>
- <tr class="separator:adcee026d613619414e2b6d3eca2c6537"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ad5eecc3e1e68b9e5a43edfb8e4205469"><td class="memItemLeft" align="right" valign="top">bool </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 class="separator:ad5eecc3e1e68b9e5a43edfb8e4205469"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:afb96025babf92878213dd691263d93ef"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#afb96025babf92878213dd691263d93ef">writeData</a> (const uint8_t *src)</td></tr>
- <tr class="separator:afb96025babf92878213dd691263d93ef"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1039df4f6620213a98b317d11da2014e"><td class="memItemLeft" align="right" valign="top">bool </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 class="separator:a1039df4f6620213a98b317d11da2014e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a7e1ec48b0a83d13415841da870290f64"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a7e1ec48b0a83d13415841da870290f64">writeStop</a> ()</td></tr>
- <tr class="separator:a7e1ec48b0a83d13415841da870290f64"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>Raw access to SD and SDHC flash memory cards. </p>
- </div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
- <a class="anchor" id="a17c8713ae610106567679a8685696375"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">Sd2Card::Sd2Card </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>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>
- <h2 class="groupheader">Member Function Documentation</h2>
- <a class="anchor" id="a4e55e83403be452b10b0564ca63896f1"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool Sd2Card::begin </td>
- <td>(</td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>chipSelectPin</em> = <code><a class="el" href="_sd_spi_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">SD_CHIP_SELECT_PIN</a></code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>sckDivisor</em> = <code>SPI_FULL_SPEED</code> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Initialize an SD flash memory card.</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">chipSelectPin</td><td>SD chip select pin number. </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">sckDivisor</td><td>SPI SCK clock rate divisor.</td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</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="a21ef1c5321041d4d73107b84e2db5189"></a>
- <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="section return"><dt>Returns</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>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool Sd2Card::erase </td>
- <td>(</td>
- <td class="paramtype">uint32_t </td>
- <td class="paramname"><em>firstBlock</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">uint32_t </td>
- <td class="paramname"><em>lastBlock</em> </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 class="params"><dt>Parameters</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="section note"><dt>Note</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="section return"><dt>Returns</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>
- <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="section return"><dt>Returns</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>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void Sd2Card::error </td>
- <td>(</td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>code</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>Set SD error code. </p>
- <dl class="params"><dt>Parameters</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>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">int Sd2Card::errorCode </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td> const</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>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>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">int Sd2Card::errorData </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td> const</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>error data for last error. </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a71523097165fce957c7f65b033471fc7"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">bool Sd2Card::init </td>
- <td>(</td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>sckDivisor</em> = <code>SPI_FULL_SPEED</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>chipSelectPin</em> = <code><a class="el" href="_sd_spi_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">SD_CHIP_SELECT_PIN</a></code> </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>Initialize an SD flash memory card.</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">chipSelectPin</td><td>SD chip select pin number. </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">sckDivisor</td><td>SPI SCK clock rate divisor.</td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</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="a28eafda720598dcb2923955776199e19"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool Sd2Card::isBusy </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Check for busy. MISO low indicates the card is busy.</p>
- <dl class="section return"><dt>Returns</dt><dd>true if busy else false. </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a6b015ee1c94004b8b16639910e5a3466"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool Sd2Card::readBlock </td>
- <td>(</td>
- <td class="paramtype">uint32_t </td>
- <td class="paramname"><em>blockNumber</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">uint8_t * </td>
- <td class="paramname"><em>dst</em> </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 class="params"><dt>Parameters</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="section return"><dt>Returns</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>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">bool Sd2Card::readCID </td>
- <td>(</td>
- <td class="paramtype">cid_t * </td>
- <td class="paramname"><em>cid</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>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 class="params"><dt>Parameters</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="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a1b0c68df7f508f876d56fc1270536c87"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">bool Sd2Card::readCSD </td>
- <td>(</td>
- <td class="paramtype">csd_t * </td>
- <td class="paramname"><em>csd</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>Read a card's CSD register. The CSD contains Card-Specific Data that provides information regarding access to the card's contents.</p>
- <dl class="params"><dt>Parameters</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="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a7d6e8a504f8525afd6d36a22ee5b8cc0"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool Sd2Card::readData </td>
- <td>(</td>
- <td class="paramtype">uint8_t * </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 class="params"><dt>Parameters</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="section return"><dt>Returns</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>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool Sd2Card::readStart </td>
- <td>(</td>
- <td class="paramtype">uint32_t </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 class="params"><dt>Parameters</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="section note"><dt>Note</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="section return"><dt>Returns</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>
- <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="section return"><dt>Returns</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="a6bcfd1bf665bf4ff88a46c07741fac43"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">uint8_t Sd2Card::sckDivisor </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>Return SCK divisor.</p>
- <dl class="section return"><dt>Returns</dt><dd>Requested SCK divisor. </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="adcee026d613619414e2b6d3eca2c6537"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">int Sd2Card::type </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td> const</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>Return the card type: SD V1, SD V2 or SDHC </p>
- <dl class="section return"><dt>Returns</dt><dd>0 - SD V1, 1 - SD V2, or 3 - SDHC. </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="ad5eecc3e1e68b9e5a43edfb8e4205469"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool Sd2Card::writeBlock </td>
- <td>(</td>
- <td class="paramtype">uint32_t </td>
- <td class="paramname"><em>blockNumber</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const uint8_t * </td>
- <td class="paramname"><em>src</em> </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 class="params"><dt>Parameters</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="section return"><dt>Returns</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>
- <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 * </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 class="params"><dt>Parameters</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="section return"><dt>Returns</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>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool Sd2Card::writeStart </td>
- <td>(</td>
- <td class="paramtype">uint32_t </td>
- <td class="paramname"><em>blockNumber</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">uint32_t </td>
- <td class="paramname"><em>eraseCount</em> </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 class="params"><dt>Parameters</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="section note"><dt>Note</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="section return"><dt>Returns</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>
- <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="section return"><dt>Returns</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/<a class="el" href="_sd2_card_8cpp.html">Sd2Card.cpp</a></li>
- </ul>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Sun Aug 24 2014 09:37:38 for SdFat by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.6
- </small></address>
- </body>
- </html>
|