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.

1007 satır
44KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.8"/>
  7. <title>SdFat: Sd2Card Class Reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/search.js"></script>
  13. <script type="text/javascript">
  14. $(document).ready(function() { searchBox.OnSelectItem(0); });
  15. </script>
  16. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  17. </head>
  18. <body>
  19. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  20. <div id="titlearea">
  21. <table cellspacing="0" cellpadding="0">
  22. <tbody>
  23. <tr style="height: 56px;">
  24. <td style="padding-left: 0.5em;">
  25. <div id="projectname">SdFat
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.8 -->
  34. <script type="text/javascript">
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. </script>
  37. <div id="navrow1" class="tabs">
  38. <ul class="tablist">
  39. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  40. <li><a href="modules.html"><span>Modules</span></a></li>
  41. <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
  42. <li><a href="files.html"><span>Files</span></a></li>
  43. <li>
  44. <div id="MSearchBox" class="MSearchBoxInactive">
  45. <span class="left">
  46. <img id="MSearchSelect" src="search/mag_sel.png"
  47. onmouseover="return searchBox.OnSearchSelectShow()"
  48. onmouseout="return searchBox.OnSearchSelectHide()"
  49. alt=""/>
  50. <input type="text" id="MSearchField" value="Search" accesskey="S"
  51. onfocus="searchBox.OnSearchFieldFocus(true)"
  52. onblur="searchBox.OnSearchFieldFocus(false)"
  53. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  54. </span><span class="right">
  55. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  56. </span>
  57. </div>
  58. </li>
  59. </ul>
  60. </div>
  61. <div id="navrow2" class="tabs2">
  62. <ul class="tablist">
  63. <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
  64. <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
  65. <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
  66. </ul>
  67. </div>
  68. <!-- window showing the filter options -->
  69. <div id="MSearchSelectWindow"
  70. onmouseover="return searchBox.OnSearchSelectShow()"
  71. onmouseout="return searchBox.OnSearchSelectHide()"
  72. onkeydown="return searchBox.OnSearchSelectKey(event)">
  73. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Modules</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  74. <!-- iframe showing the search results (closed by default) -->
  75. <div id="MSearchResultsWindow">
  76. <iframe src="javascript:void(0)" frameborder="0"
  77. name="MSearchResults" id="MSearchResults">
  78. </iframe>
  79. </div>
  80. </div><!-- top -->
  81. <div class="header">
  82. <div class="summary">
  83. <a href="#pub-types">Public Types</a> &#124;
  84. <a href="#pub-methods">Public Member Functions</a> &#124;
  85. <a href="class_sd2_card-members.html">List of all members</a> </div>
  86. <div class="headertitle">
  87. <div class="title">Sd2Card Class Reference</div> </div>
  88. </div><!--header-->
  89. <div class="contents">
  90. <p>Raw access to SD and SDHC card using default SPI library.
  91. <a href="class_sd2_card.html#details">More...</a></p>
  92. <p><code>#include &lt;SdSpiCard.h&gt;</code></p>
  93. <div class="dynheader">
  94. Inheritance diagram for Sd2Card:</div>
  95. <div class="dyncontent">
  96. <div class="center"><img src="class_sd2_card__inherit__graph.png" border="0" usemap="#_sd2_card_inherit__map" alt="Inheritance graph"/></div>
  97. <map name="_sd2_card_inherit__map" id="_sd2_card_inherit__map">
  98. <area shape="rect" id="node2" href="class_sd_spi_card.html" title="Raw access to SD and SDHC flash memory cards via SPI protocol. " alt="" coords="5,5,88,32"/> </map>
  99. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  100. <div class="dynheader">
  101. Collaboration diagram for Sd2Card:</div>
  102. <div class="dyncontent">
  103. <div class="center"><img src="class_sd2_card__coll__graph.png" border="0" usemap="#_sd2_card_coll__map" alt="Collaboration graph"/></div>
  104. <map name="_sd2_card_coll__map" id="_sd2_card_coll__map">
  105. <area shape="rect" id="node2" href="class_sd_spi_card.html" title="Raw access to SD and SDHC flash memory cards via SPI protocol. " alt="" coords="5,5,88,32"/> </map>
  106. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  107. <table class="memberdecls">
  108. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
  109. Public Types</h2></td></tr>
  110. <tr class="memitem:a31a561750501b6635ad2b85c8c960381"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="_sd_spi_8h.html#ad2c24f6ae166193062e50d14c5342b95">SpiDefault_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a31a561750501b6635ad2b85c8c960381">m_spi_t</a></td></tr>
  111. <tr class="separator:a31a561750501b6635ad2b85c8c960381"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. </table><table class="memberdecls">
  113. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  114. Public Member Functions</h2></td></tr>
  115. <tr class="memitem:a53eb48d9dae77c711460ed79d3fced4b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a53eb48d9dae77c711460ed79d3fced4b">begin</a> (uint8_t chipSelectPin=SS, uint8_t <a class="el" href="class_sd_spi_card.html#a0c2acfc8cdde3d35245b34018efcc6c7">sckDivisor</a>=2)</td></tr>
  116. <tr class="separator:a53eb48d9dae77c711460ed79d3fced4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:afca8bd6b7e465bf9c475ba375c4deec8"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#afca8bd6b7e465bf9c475ba375c4deec8">cardSize</a> ()</td></tr>
  118. <tr class="separator:afca8bd6b7e465bf9c475ba375c4deec8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. <tr class="memitem:a1caa13d19df6596b2c0dd62365c75362"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a1caa13d19df6596b2c0dd62365c75362">erase</a> (uint32_t firstBlock, uint32_t lastBlock)</td></tr>
  120. <tr class="separator:a1caa13d19df6596b2c0dd62365c75362"><td class="memSeparator" colspan="2">&#160;</td></tr>
  121. <tr class="memitem:aed4591884254c9f58daa8738d7c1ccdd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#aed4591884254c9f58daa8738d7c1ccdd">eraseSingleBlockEnable</a> ()</td></tr>
  122. <tr class="separator:aed4591884254c9f58daa8738d7c1ccdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:aa12ad53111abcb187d3c6119a3a77592"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#aa12ad53111abcb187d3c6119a3a77592">error</a> (uint8_t code)</td></tr>
  124. <tr class="separator:aa12ad53111abcb187d3c6119a3a77592"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. <tr class="memitem:a50bf5f92223222beacec2b203a6b7a95"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a50bf5f92223222beacec2b203a6b7a95">errorCode</a> () const </td></tr>
  126. <tr class="separator:a50bf5f92223222beacec2b203a6b7a95"><td class="memSeparator" colspan="2">&#160;</td></tr>
  127. <tr class="memitem:a7b1abdb8dd5254cd4af0df19ba59ce4a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a7b1abdb8dd5254cd4af0df19ba59ce4a">errorData</a> () const </td></tr>
  128. <tr class="separator:a7b1abdb8dd5254cd4af0df19ba59ce4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:aa415ea708e5212a5b4154b7eb5c1a304"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#aa415ea708e5212a5b4154b7eb5c1a304">init</a> (uint8_t <a class="el" href="class_sd_spi_card.html#a0c2acfc8cdde3d35245b34018efcc6c7">sckDivisor</a>=2, uint8_t chipSelectPin=SS)</td></tr>
  130. <tr class="separator:aa415ea708e5212a5b4154b7eb5c1a304"><td class="memSeparator" colspan="2">&#160;</td></tr>
  131. <tr class="memitem:aa3cb9139dbc1e6596c6717da2b486328"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#aa3cb9139dbc1e6596c6717da2b486328">isBusy</a> ()</td></tr>
  132. <tr class="separator:aa3cb9139dbc1e6596c6717da2b486328"><td class="memSeparator" colspan="2">&#160;</td></tr>
  133. <tr class="memitem:a2973091eeab7b6ba528f6442bc5df36e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a2973091eeab7b6ba528f6442bc5df36e">readBlock</a> (uint32_t block, uint8_t *dst)</td></tr>
  134. <tr class="separator:a2973091eeab7b6ba528f6442bc5df36e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <tr class="memitem:a5a7e12a5a076cc690885378932fa289f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a5a7e12a5a076cc690885378932fa289f">readBlocks</a> (uint32_t block, uint8_t *dst, size_t count)</td></tr>
  136. <tr class="separator:a5a7e12a5a076cc690885378932fa289f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  137. <tr class="memitem:aa073dc42828164883db1b9faeff909ea"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#aa073dc42828164883db1b9faeff909ea">readCID</a> (cid_t *cid)</td></tr>
  138. <tr class="separator:aa073dc42828164883db1b9faeff909ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
  139. <tr class="memitem:a9fbea9525e70f6e3602fe5153a5a1290"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a9fbea9525e70f6e3602fe5153a5a1290">readCSD</a> (csd_t *csd)</td></tr>
  140. <tr class="separator:a9fbea9525e70f6e3602fe5153a5a1290"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <tr class="memitem:a3a1d1b4b4ceb42fcd41aaf6649482770"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a3a1d1b4b4ceb42fcd41aaf6649482770">readData</a> (uint8_t *dst)</td></tr>
  142. <tr class="separator:a3a1d1b4b4ceb42fcd41aaf6649482770"><td class="memSeparator" colspan="2">&#160;</td></tr>
  143. <tr class="memitem:ab446e49338b3ce834a750ac6dae35f61"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#ab446e49338b3ce834a750ac6dae35f61">readOCR</a> (uint32_t *ocr)</td></tr>
  144. <tr class="separator:ab446e49338b3ce834a750ac6dae35f61"><td class="memSeparator" colspan="2">&#160;</td></tr>
  145. <tr class="memitem:a3b1710d11496c32ba4323831e00ac6d1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a3b1710d11496c32ba4323831e00ac6d1">readStart</a> (uint32_t blockNumber)</td></tr>
  146. <tr class="separator:a3b1710d11496c32ba4323831e00ac6d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  147. <tr class="memitem:afdac7c399fa1ba3f904cf503526e007e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#afdac7c399fa1ba3f904cf503526e007e">readStop</a> ()</td></tr>
  148. <tr class="separator:afdac7c399fa1ba3f904cf503526e007e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  149. <tr class="memitem:a0c2acfc8cdde3d35245b34018efcc6c7"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a0c2acfc8cdde3d35245b34018efcc6c7">sckDivisor</a> ()</td></tr>
  150. <tr class="separator:a0c2acfc8cdde3d35245b34018efcc6c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  151. <tr class="memitem:a061d92bf154a1863a6321385b7505f6e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a061d92bf154a1863a6321385b7505f6e">type</a> () const </td></tr>
  152. <tr class="separator:a061d92bf154a1863a6321385b7505f6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  153. <tr class="memitem:acdf8c7fe62ab091971cd546c00714cee"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#acdf8c7fe62ab091971cd546c00714cee">writeBlock</a> (uint32_t blockNumber, const uint8_t *src)</td></tr>
  154. <tr class="separator:acdf8c7fe62ab091971cd546c00714cee"><td class="memSeparator" colspan="2">&#160;</td></tr>
  155. <tr class="memitem:aa5ca6901525dce4b1bc1f94a95441d88"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#aa5ca6901525dce4b1bc1f94a95441d88">writeBlocks</a> (uint32_t block, const uint8_t *src, size_t count)</td></tr>
  156. <tr class="separator:aa5ca6901525dce4b1bc1f94a95441d88"><td class="memSeparator" colspan="2">&#160;</td></tr>
  157. <tr class="memitem:a9495c0b148eb380358bb4a9721c0dffa"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a9495c0b148eb380358bb4a9721c0dffa">writeData</a> (const uint8_t *src)</td></tr>
  158. <tr class="separator:a9495c0b148eb380358bb4a9721c0dffa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  159. <tr class="memitem:a8bf0dc991308dcd2a7427bad89a9e2ba"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a8bf0dc991308dcd2a7427bad89a9e2ba">writeStart</a> (uint32_t blockNumber, uint32_t eraseCount)</td></tr>
  160. <tr class="separator:a8bf0dc991308dcd2a7427bad89a9e2ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  161. <tr class="memitem:aef9154785a4de5560fb807e4f9316fb0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#aef9154785a4de5560fb807e4f9316fb0">writeStop</a> ()</td></tr>
  162. <tr class="separator:aef9154785a4de5560fb807e4f9316fb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  163. </table>
  164. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  165. <div class="textblock"><p>Raw access to SD and SDHC card using default SPI library. </p>
  166. </div><h2 class="groupheader">Member Typedef Documentation</h2>
  167. <a class="anchor" id="a31a561750501b6635ad2b85c8c960381"></a>
  168. <div class="memitem">
  169. <div class="memproto">
  170. <table class="mlabels">
  171. <tr>
  172. <td class="mlabels-left">
  173. <table class="memname">
  174. <tr>
  175. <td class="memname">typedef <a class="el" href="_sd_spi_8h.html#ad2c24f6ae166193062e50d14c5342b95">SpiDefault_t</a> <a class="el" href="class_sd_spi_card.html#a31a561750501b6635ad2b85c8c960381">SdSpiCard::m_spi_t</a></td>
  176. </tr>
  177. </table>
  178. </td>
  179. <td class="mlabels-right">
  180. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  181. </tr>
  182. </table>
  183. </div><div class="memdoc">
  184. <p>typedef for SPI class. </p>
  185. </div>
  186. </div>
  187. <h2 class="groupheader">Member Function Documentation</h2>
  188. <a class="anchor" id="a53eb48d9dae77c711460ed79d3fced4b"></a>
  189. <div class="memitem">
  190. <div class="memproto">
  191. <table class="mlabels">
  192. <tr>
  193. <td class="mlabels-left">
  194. <table class="memname">
  195. <tr>
  196. <td class="memname">bool Sd2Card::begin </td>
  197. <td>(</td>
  198. <td class="paramtype">uint8_t&#160;</td>
  199. <td class="paramname"><em>chipSelectPin</em> = <code>SS</code>, </td>
  200. </tr>
  201. <tr>
  202. <td class="paramkey"></td>
  203. <td></td>
  204. <td class="paramtype">uint8_t&#160;</td>
  205. <td class="paramname"><em>sckDivisor</em> = <code>2</code>&#160;</td>
  206. </tr>
  207. <tr>
  208. <td></td>
  209. <td>)</td>
  210. <td></td><td></td>
  211. </tr>
  212. </table>
  213. </td>
  214. <td class="mlabels-right">
  215. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  216. </tr>
  217. </table>
  218. </div><div class="memdoc">
  219. <p>Initialize the SD card. </p><dl class="params"><dt>Parameters</dt><dd>
  220. <table class="params">
  221. <tr><td class="paramdir">[in]</td><td class="paramname">chipSelectPin</td><td>SD chip select pin. </td></tr>
  222. <tr><td class="paramdir">[in]</td><td class="paramname">sckDivisor</td><td>SPI clock divisor. </td></tr>
  223. </table>
  224. </dd>
  225. </dl>
  226. <dl class="section return"><dt>Returns</dt><dd>true for success else false. </dd></dl>
  227. </div>
  228. </div>
  229. <a class="anchor" id="afca8bd6b7e465bf9c475ba375c4deec8"></a>
  230. <div class="memitem">
  231. <div class="memproto">
  232. <table class="mlabels">
  233. <tr>
  234. <td class="mlabels-left">
  235. <table class="memname">
  236. <tr>
  237. <td class="memname">uint32_t SdSpiCard::cardSize </td>
  238. <td>(</td>
  239. <td class="paramname"></td><td>)</td>
  240. <td></td>
  241. </tr>
  242. </table>
  243. </td>
  244. <td class="mlabels-right">
  245. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  246. </tr>
  247. </table>
  248. </div><div class="memdoc">
  249. <p>Determine the size of an SD flash memory card.</p>
  250. <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>
  251. </div>
  252. </div>
  253. <a class="anchor" id="a1caa13d19df6596b2c0dd62365c75362"></a>
  254. <div class="memitem">
  255. <div class="memproto">
  256. <table class="mlabels">
  257. <tr>
  258. <td class="mlabels-left">
  259. <table class="memname">
  260. <tr>
  261. <td class="memname">bool SdSpiCard::erase </td>
  262. <td>(</td>
  263. <td class="paramtype">uint32_t&#160;</td>
  264. <td class="paramname"><em>firstBlock</em>, </td>
  265. </tr>
  266. <tr>
  267. <td class="paramkey"></td>
  268. <td></td>
  269. <td class="paramtype">uint32_t&#160;</td>
  270. <td class="paramname"><em>lastBlock</em>&#160;</td>
  271. </tr>
  272. <tr>
  273. <td></td>
  274. <td>)</td>
  275. <td></td><td></td>
  276. </tr>
  277. </table>
  278. </td>
  279. <td class="mlabels-right">
  280. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  281. </tr>
  282. </table>
  283. </div><div class="memdoc">
  284. <p>Erase a range of blocks.</p>
  285. <dl class="params"><dt>Parameters</dt><dd>
  286. <table class="params">
  287. <tr><td class="paramdir">[in]</td><td class="paramname">firstBlock</td><td>The address of the first block in the range. </td></tr>
  288. <tr><td class="paramdir">[in]</td><td class="paramname">lastBlock</td><td>The address of the last block in the range.</td></tr>
  289. </table>
  290. </dd>
  291. </dl>
  292. <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>
  293. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  294. </div>
  295. </div>
  296. <a class="anchor" id="aed4591884254c9f58daa8738d7c1ccdd"></a>
  297. <div class="memitem">
  298. <div class="memproto">
  299. <table class="mlabels">
  300. <tr>
  301. <td class="mlabels-left">
  302. <table class="memname">
  303. <tr>
  304. <td class="memname">bool SdSpiCard::eraseSingleBlockEnable </td>
  305. <td>(</td>
  306. <td class="paramname"></td><td>)</td>
  307. <td></td>
  308. </tr>
  309. </table>
  310. </td>
  311. <td class="mlabels-right">
  312. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  313. </tr>
  314. </table>
  315. </div><div class="memdoc">
  316. <p>Determine if card supports single block erase.</p>
  317. <dl class="section return"><dt>Returns</dt><dd>true is returned if single block erase is supported. false is returned if single block erase is not supported. </dd></dl>
  318. </div>
  319. </div>
  320. <a class="anchor" id="aa12ad53111abcb187d3c6119a3a77592"></a>
  321. <div class="memitem">
  322. <div class="memproto">
  323. <table class="mlabels">
  324. <tr>
  325. <td class="mlabels-left">
  326. <table class="memname">
  327. <tr>
  328. <td class="memname">void SdSpiCard::error </td>
  329. <td>(</td>
  330. <td class="paramtype">uint8_t&#160;</td>
  331. <td class="paramname"><em>code</em></td><td>)</td>
  332. <td></td>
  333. </tr>
  334. </table>
  335. </td>
  336. <td class="mlabels-right">
  337. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  338. </tr>
  339. </table>
  340. </div><div class="memdoc">
  341. <p>Set SD error code. </p><dl class="params"><dt>Parameters</dt><dd>
  342. <table class="params">
  343. <tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>value for error code. </td></tr>
  344. </table>
  345. </dd>
  346. </dl>
  347. </div>
  348. </div>
  349. <a class="anchor" id="a50bf5f92223222beacec2b203a6b7a95"></a>
  350. <div class="memitem">
  351. <div class="memproto">
  352. <table class="mlabels">
  353. <tr>
  354. <td class="mlabels-left">
  355. <table class="memname">
  356. <tr>
  357. <td class="memname">int SdSpiCard::errorCode </td>
  358. <td>(</td>
  359. <td class="paramname"></td><td>)</td>
  360. <td> const</td>
  361. </tr>
  362. </table>
  363. </td>
  364. <td class="mlabels-right">
  365. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  366. </tr>
  367. </table>
  368. </div><div class="memdoc">
  369. <dl class="section return"><dt>Returns</dt><dd>code for the last error. See <a class="el" href="_sd_spi_card_8h.html" title="SdSpiCard class for V2 SD/SDHC cards. ">SdSpiCard.h</a> for a list of error codes. </dd></dl>
  370. </div>
  371. </div>
  372. <a class="anchor" id="a7b1abdb8dd5254cd4af0df19ba59ce4a"></a>
  373. <div class="memitem">
  374. <div class="memproto">
  375. <table class="mlabels">
  376. <tr>
  377. <td class="mlabels-left">
  378. <table class="memname">
  379. <tr>
  380. <td class="memname">int SdSpiCard::errorData </td>
  381. <td>(</td>
  382. <td class="paramname"></td><td>)</td>
  383. <td> const</td>
  384. </tr>
  385. </table>
  386. </td>
  387. <td class="mlabels-right">
  388. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  389. </tr>
  390. </table>
  391. </div><div class="memdoc">
  392. <dl class="section return"><dt>Returns</dt><dd>error data for last error. </dd></dl>
  393. </div>
  394. </div>
  395. <a class="anchor" id="aa415ea708e5212a5b4154b7eb5c1a304"></a>
  396. <div class="memitem">
  397. <div class="memproto">
  398. <table class="mlabels">
  399. <tr>
  400. <td class="mlabels-left">
  401. <table class="memname">
  402. <tr>
  403. <td class="memname">bool Sd2Card::init </td>
  404. <td>(</td>
  405. <td class="paramtype">uint8_t&#160;</td>
  406. <td class="paramname"><em>sckDivisor</em> = <code>2</code>, </td>
  407. </tr>
  408. <tr>
  409. <td class="paramkey"></td>
  410. <td></td>
  411. <td class="paramtype">uint8_t&#160;</td>
  412. <td class="paramname"><em>chipSelectPin</em> = <code>SS</code>&#160;</td>
  413. </tr>
  414. <tr>
  415. <td></td>
  416. <td>)</td>
  417. <td></td><td></td>
  418. </tr>
  419. </table>
  420. </td>
  421. <td class="mlabels-right">
  422. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  423. </tr>
  424. </table>
  425. </div><div class="memdoc">
  426. <p>Initialize the SD card. Obsolete form. </p><dl class="params"><dt>Parameters</dt><dd>
  427. <table class="params">
  428. <tr><td class="paramdir">[in]</td><td class="paramname">chipSelectPin</td><td>SD chip select pin. </td></tr>
  429. <tr><td class="paramdir">[in]</td><td class="paramname">sckDivisor</td><td>SPI clock divisor. </td></tr>
  430. </table>
  431. </dd>
  432. </dl>
  433. <dl class="section return"><dt>Returns</dt><dd>true for success else false. </dd></dl>
  434. </div>
  435. </div>
  436. <a class="anchor" id="aa3cb9139dbc1e6596c6717da2b486328"></a>
  437. <div class="memitem">
  438. <div class="memproto">
  439. <table class="mlabels">
  440. <tr>
  441. <td class="mlabels-left">
  442. <table class="memname">
  443. <tr>
  444. <td class="memname">bool SdSpiCard::isBusy </td>
  445. <td>(</td>
  446. <td class="paramname"></td><td>)</td>
  447. <td></td>
  448. </tr>
  449. </table>
  450. </td>
  451. <td class="mlabels-right">
  452. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  453. </tr>
  454. </table>
  455. </div><div class="memdoc">
  456. <p>Check for busy. MISO low indicates the card is busy.</p>
  457. <dl class="section return"><dt>Returns</dt><dd>true if busy else false. </dd></dl>
  458. </div>
  459. </div>
  460. <a class="anchor" id="a2973091eeab7b6ba528f6442bc5df36e"></a>
  461. <div class="memitem">
  462. <div class="memproto">
  463. <table class="mlabels">
  464. <tr>
  465. <td class="mlabels-left">
  466. <table class="memname">
  467. <tr>
  468. <td class="memname">bool SdSpiCard::readBlock </td>
  469. <td>(</td>
  470. <td class="paramtype">uint32_t&#160;</td>
  471. <td class="paramname"><em>block</em>, </td>
  472. </tr>
  473. <tr>
  474. <td class="paramkey"></td>
  475. <td></td>
  476. <td class="paramtype">uint8_t *&#160;</td>
  477. <td class="paramname"><em>dst</em>&#160;</td>
  478. </tr>
  479. <tr>
  480. <td></td>
  481. <td>)</td>
  482. <td></td><td></td>
  483. </tr>
  484. </table>
  485. </td>
  486. <td class="mlabels-right">
  487. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  488. </tr>
  489. </table>
  490. </div><div class="memdoc">
  491. <p>Read a 512 byte block from an SD card.</p>
  492. <dl class="params"><dt>Parameters</dt><dd>
  493. <table class="params">
  494. <tr><td class="paramdir">[in]</td><td class="paramname">block</td><td>Logical block to be read. </td></tr>
  495. <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location that will receive the data. </td></tr>
  496. </table>
  497. </dd>
  498. </dl>
  499. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  500. </div>
  501. </div>
  502. <a class="anchor" id="a5a7e12a5a076cc690885378932fa289f"></a>
  503. <div class="memitem">
  504. <div class="memproto">
  505. <table class="mlabels">
  506. <tr>
  507. <td class="mlabels-left">
  508. <table class="memname">
  509. <tr>
  510. <td class="memname">bool SdSpiCard::readBlocks </td>
  511. <td>(</td>
  512. <td class="paramtype">uint32_t&#160;</td>
  513. <td class="paramname"><em>block</em>, </td>
  514. </tr>
  515. <tr>
  516. <td class="paramkey"></td>
  517. <td></td>
  518. <td class="paramtype">uint8_t *&#160;</td>
  519. <td class="paramname"><em>dst</em>, </td>
  520. </tr>
  521. <tr>
  522. <td class="paramkey"></td>
  523. <td></td>
  524. <td class="paramtype">size_t&#160;</td>
  525. <td class="paramname"><em>count</em>&#160;</td>
  526. </tr>
  527. <tr>
  528. <td></td>
  529. <td>)</td>
  530. <td></td><td></td>
  531. </tr>
  532. </table>
  533. </td>
  534. <td class="mlabels-right">
  535. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  536. </tr>
  537. </table>
  538. </div><div class="memdoc">
  539. <p>Read multiple 512 byte blocks from an SD card.</p>
  540. <dl class="params"><dt>Parameters</dt><dd>
  541. <table class="params">
  542. <tr><td class="paramdir">[in]</td><td class="paramname">block</td><td>Logical block to be read. </td></tr>
  543. <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Number of blocks to be read. </td></tr>
  544. <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location that will receive the data. </td></tr>
  545. </table>
  546. </dd>
  547. </dl>
  548. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  549. </div>
  550. </div>
  551. <a class="anchor" id="aa073dc42828164883db1b9faeff909ea"></a>
  552. <div class="memitem">
  553. <div class="memproto">
  554. <table class="mlabels">
  555. <tr>
  556. <td class="mlabels-left">
  557. <table class="memname">
  558. <tr>
  559. <td class="memname">bool SdSpiCard::readCID </td>
  560. <td>(</td>
  561. <td class="paramtype">cid_t *&#160;</td>
  562. <td class="paramname"><em>cid</em></td><td>)</td>
  563. <td></td>
  564. </tr>
  565. </table>
  566. </td>
  567. <td class="mlabels-right">
  568. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  569. </tr>
  570. </table>
  571. </div><div class="memdoc">
  572. <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>
  573. <dl class="params"><dt>Parameters</dt><dd>
  574. <table class="params">
  575. <tr><td class="paramdir">[out]</td><td class="paramname">cid</td><td>pointer to area for returned data.</td></tr>
  576. </table>
  577. </dd>
  578. </dl>
  579. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  580. </div>
  581. </div>
  582. <a class="anchor" id="a9fbea9525e70f6e3602fe5153a5a1290"></a>
  583. <div class="memitem">
  584. <div class="memproto">
  585. <table class="mlabels">
  586. <tr>
  587. <td class="mlabels-left">
  588. <table class="memname">
  589. <tr>
  590. <td class="memname">bool SdSpiCard::readCSD </td>
  591. <td>(</td>
  592. <td class="paramtype">csd_t *&#160;</td>
  593. <td class="paramname"><em>csd</em></td><td>)</td>
  594. <td></td>
  595. </tr>
  596. </table>
  597. </td>
  598. <td class="mlabels-right">
  599. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  600. </tr>
  601. </table>
  602. </div><div class="memdoc">
  603. <p>Read a card's CSD register. The CSD contains Card-Specific Data that provides information regarding access to the card's contents.</p>
  604. <dl class="params"><dt>Parameters</dt><dd>
  605. <table class="params">
  606. <tr><td class="paramdir">[out]</td><td class="paramname">csd</td><td>pointer to area for returned data.</td></tr>
  607. </table>
  608. </dd>
  609. </dl>
  610. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  611. </div>
  612. </div>
  613. <a class="anchor" id="a3a1d1b4b4ceb42fcd41aaf6649482770"></a>
  614. <div class="memitem">
  615. <div class="memproto">
  616. <table class="mlabels">
  617. <tr>
  618. <td class="mlabels-left">
  619. <table class="memname">
  620. <tr>
  621. <td class="memname">bool SdSpiCard::readData </td>
  622. <td>(</td>
  623. <td class="paramtype">uint8_t *&#160;</td>
  624. <td class="paramname"><em>dst</em></td><td>)</td>
  625. <td></td>
  626. </tr>
  627. </table>
  628. </td>
  629. <td class="mlabels-right">
  630. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  631. </tr>
  632. </table>
  633. </div><div class="memdoc">
  634. <p>Read one data block in a multiple block read sequence</p>
  635. <dl class="params"><dt>Parameters</dt><dd>
  636. <table class="params">
  637. <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location for the data to be read.</td></tr>
  638. </table>
  639. </dd>
  640. </dl>
  641. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  642. </div>
  643. </div>
  644. <a class="anchor" id="ab446e49338b3ce834a750ac6dae35f61"></a>
  645. <div class="memitem">
  646. <div class="memproto">
  647. <table class="mlabels">
  648. <tr>
  649. <td class="mlabels-left">
  650. <table class="memname">
  651. <tr>
  652. <td class="memname">bool SdSpiCard::readOCR </td>
  653. <td>(</td>
  654. <td class="paramtype">uint32_t *&#160;</td>
  655. <td class="paramname"><em>ocr</em></td><td>)</td>
  656. <td></td>
  657. </tr>
  658. </table>
  659. </td>
  660. <td class="mlabels-right">
  661. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  662. </tr>
  663. </table>
  664. </div><div class="memdoc">
  665. <p>Read OCR register.</p>
  666. <dl class="params"><dt>Parameters</dt><dd>
  667. <table class="params">
  668. <tr><td class="paramdir">[out]</td><td class="paramname">ocr</td><td>Value of OCR register. </td></tr>
  669. </table>
  670. </dd>
  671. </dl>
  672. <dl class="section return"><dt>Returns</dt><dd>true for success else false. </dd></dl>
  673. </div>
  674. </div>
  675. <a class="anchor" id="a3b1710d11496c32ba4323831e00ac6d1"></a>
  676. <div class="memitem">
  677. <div class="memproto">
  678. <table class="mlabels">
  679. <tr>
  680. <td class="mlabels-left">
  681. <table class="memname">
  682. <tr>
  683. <td class="memname">bool SdSpiCard::readStart </td>
  684. <td>(</td>
  685. <td class="paramtype">uint32_t&#160;</td>
  686. <td class="paramname"><em>blockNumber</em></td><td>)</td>
  687. <td></td>
  688. </tr>
  689. </table>
  690. </td>
  691. <td class="mlabels-right">
  692. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  693. </tr>
  694. </table>
  695. </div><div class="memdoc">
  696. <p>Start a read multiple blocks sequence.</p>
  697. <dl class="params"><dt>Parameters</dt><dd>
  698. <table class="params">
  699. <tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Address of first block in sequence.</td></tr>
  700. </table>
  701. </dd>
  702. </dl>
  703. <dl class="section note"><dt>Note</dt><dd>This function is used with <a class="el" href="class_sd_spi_card.html#a3a1d1b4b4ceb42fcd41aaf6649482770">readData()</a> and <a class="el" href="class_sd_spi_card.html#afdac7c399fa1ba3f904cf503526e007e">readStop()</a> for optimized multiple block reads. SPI chipSelect must be low for the entire sequence.</dd></dl>
  704. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  705. </div>
  706. </div>
  707. <a class="anchor" id="afdac7c399fa1ba3f904cf503526e007e"></a>
  708. <div class="memitem">
  709. <div class="memproto">
  710. <table class="mlabels">
  711. <tr>
  712. <td class="mlabels-left">
  713. <table class="memname">
  714. <tr>
  715. <td class="memname">bool SdSpiCard::readStop </td>
  716. <td>(</td>
  717. <td class="paramname"></td><td>)</td>
  718. <td></td>
  719. </tr>
  720. </table>
  721. </td>
  722. <td class="mlabels-right">
  723. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  724. </tr>
  725. </table>
  726. </div><div class="memdoc">
  727. <p>End a read multiple blocks sequence.</p>
  728. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  729. </div>
  730. </div>
  731. <a class="anchor" id="a0c2acfc8cdde3d35245b34018efcc6c7"></a>
  732. <div class="memitem">
  733. <div class="memproto">
  734. <table class="mlabels">
  735. <tr>
  736. <td class="mlabels-left">
  737. <table class="memname">
  738. <tr>
  739. <td class="memname">uint8_t SdSpiCard::sckDivisor </td>
  740. <td>(</td>
  741. <td class="paramname"></td><td>)</td>
  742. <td></td>
  743. </tr>
  744. </table>
  745. </td>
  746. <td class="mlabels-right">
  747. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  748. </tr>
  749. </table>
  750. </div><div class="memdoc">
  751. <p>Return SCK divisor.</p>
  752. <dl class="section return"><dt>Returns</dt><dd>Requested SCK divisor. </dd></dl>
  753. </div>
  754. </div>
  755. <a class="anchor" id="a061d92bf154a1863a6321385b7505f6e"></a>
  756. <div class="memitem">
  757. <div class="memproto">
  758. <table class="mlabels">
  759. <tr>
  760. <td class="mlabels-left">
  761. <table class="memname">
  762. <tr>
  763. <td class="memname">int SdSpiCard::type </td>
  764. <td>(</td>
  765. <td class="paramname"></td><td>)</td>
  766. <td> const</td>
  767. </tr>
  768. </table>
  769. </td>
  770. <td class="mlabels-right">
  771. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  772. </tr>
  773. </table>
  774. </div><div class="memdoc">
  775. <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>
  776. </div>
  777. </div>
  778. <a class="anchor" id="acdf8c7fe62ab091971cd546c00714cee"></a>
  779. <div class="memitem">
  780. <div class="memproto">
  781. <table class="mlabels">
  782. <tr>
  783. <td class="mlabels-left">
  784. <table class="memname">
  785. <tr>
  786. <td class="memname">bool SdSpiCard::writeBlock </td>
  787. <td>(</td>
  788. <td class="paramtype">uint32_t&#160;</td>
  789. <td class="paramname"><em>blockNumber</em>, </td>
  790. </tr>
  791. <tr>
  792. <td class="paramkey"></td>
  793. <td></td>
  794. <td class="paramtype">const uint8_t *&#160;</td>
  795. <td class="paramname"><em>src</em>&#160;</td>
  796. </tr>
  797. <tr>
  798. <td></td>
  799. <td>)</td>
  800. <td></td><td></td>
  801. </tr>
  802. </table>
  803. </td>
  804. <td class="mlabels-right">
  805. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  806. </tr>
  807. </table>
  808. </div><div class="memdoc">
  809. <p>Writes a 512 byte block to an SD card.</p>
  810. <dl class="params"><dt>Parameters</dt><dd>
  811. <table class="params">
  812. <tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Logical block to be written. </td></tr>
  813. <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
  814. </table>
  815. </dd>
  816. </dl>
  817. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  818. </div>
  819. </div>
  820. <a class="anchor" id="aa5ca6901525dce4b1bc1f94a95441d88"></a>
  821. <div class="memitem">
  822. <div class="memproto">
  823. <table class="mlabels">
  824. <tr>
  825. <td class="mlabels-left">
  826. <table class="memname">
  827. <tr>
  828. <td class="memname">bool SdSpiCard::writeBlocks </td>
  829. <td>(</td>
  830. <td class="paramtype">uint32_t&#160;</td>
  831. <td class="paramname"><em>block</em>, </td>
  832. </tr>
  833. <tr>
  834. <td class="paramkey"></td>
  835. <td></td>
  836. <td class="paramtype">const uint8_t *&#160;</td>
  837. <td class="paramname"><em>src</em>, </td>
  838. </tr>
  839. <tr>
  840. <td class="paramkey"></td>
  841. <td></td>
  842. <td class="paramtype">size_t&#160;</td>
  843. <td class="paramname"><em>count</em>&#160;</td>
  844. </tr>
  845. <tr>
  846. <td></td>
  847. <td>)</td>
  848. <td></td><td></td>
  849. </tr>
  850. </table>
  851. </td>
  852. <td class="mlabels-right">
  853. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  854. </tr>
  855. </table>
  856. </div><div class="memdoc">
  857. <p>Write multiple 512 byte blocks to an SD card.</p>
  858. <dl class="params"><dt>Parameters</dt><dd>
  859. <table class="params">
  860. <tr><td class="paramdir">[in]</td><td class="paramname">block</td><td>Logical block to be written. </td></tr>
  861. <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Number of blocks to be written. </td></tr>
  862. <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
  863. </table>
  864. </dd>
  865. </dl>
  866. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  867. </div>
  868. </div>
  869. <a class="anchor" id="a9495c0b148eb380358bb4a9721c0dffa"></a>
  870. <div class="memitem">
  871. <div class="memproto">
  872. <table class="mlabels">
  873. <tr>
  874. <td class="mlabels-left">
  875. <table class="memname">
  876. <tr>
  877. <td class="memname">bool SdSpiCard::writeData </td>
  878. <td>(</td>
  879. <td class="paramtype">const uint8_t *&#160;</td>
  880. <td class="paramname"><em>src</em></td><td>)</td>
  881. <td></td>
  882. </tr>
  883. </table>
  884. </td>
  885. <td class="mlabels-right">
  886. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  887. </tr>
  888. </table>
  889. </div><div class="memdoc">
  890. <p>Write one data block in a multiple block write sequence </p><dl class="params"><dt>Parameters</dt><dd>
  891. <table class="params">
  892. <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
  893. </table>
  894. </dd>
  895. </dl>
  896. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  897. </div>
  898. </div>
  899. <a class="anchor" id="a8bf0dc991308dcd2a7427bad89a9e2ba"></a>
  900. <div class="memitem">
  901. <div class="memproto">
  902. <table class="mlabels">
  903. <tr>
  904. <td class="mlabels-left">
  905. <table class="memname">
  906. <tr>
  907. <td class="memname">bool SdSpiCard::writeStart </td>
  908. <td>(</td>
  909. <td class="paramtype">uint32_t&#160;</td>
  910. <td class="paramname"><em>blockNumber</em>, </td>
  911. </tr>
  912. <tr>
  913. <td class="paramkey"></td>
  914. <td></td>
  915. <td class="paramtype">uint32_t&#160;</td>
  916. <td class="paramname"><em>eraseCount</em>&#160;</td>
  917. </tr>
  918. <tr>
  919. <td></td>
  920. <td>)</td>
  921. <td></td><td></td>
  922. </tr>
  923. </table>
  924. </td>
  925. <td class="mlabels-right">
  926. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  927. </tr>
  928. </table>
  929. </div><div class="memdoc">
  930. <p>Start a write multiple blocks sequence.</p>
  931. <dl class="params"><dt>Parameters</dt><dd>
  932. <table class="params">
  933. <tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Address of first block in sequence. </td></tr>
  934. <tr><td class="paramdir">[in]</td><td class="paramname">eraseCount</td><td>The number of blocks to be pre-erased.</td></tr>
  935. </table>
  936. </dd>
  937. </dl>
  938. <dl class="section note"><dt>Note</dt><dd>This function is used with <a class="el" href="class_sd_spi_card.html#a9495c0b148eb380358bb4a9721c0dffa">writeData()</a> and <a class="el" href="class_sd_spi_card.html#aef9154785a4de5560fb807e4f9316fb0">writeStop()</a> for optimized multiple block writes.</dd></dl>
  939. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  940. </div>
  941. </div>
  942. <a class="anchor" id="aef9154785a4de5560fb807e4f9316fb0"></a>
  943. <div class="memitem">
  944. <div class="memproto">
  945. <table class="mlabels">
  946. <tr>
  947. <td class="mlabels-left">
  948. <table class="memname">
  949. <tr>
  950. <td class="memname">bool SdSpiCard::writeStop </td>
  951. <td>(</td>
  952. <td class="paramname"></td><td>)</td>
  953. <td></td>
  954. </tr>
  955. </table>
  956. </td>
  957. <td class="mlabels-right">
  958. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  959. </tr>
  960. </table>
  961. </div><div class="memdoc">
  962. <p>End a write multiple blocks sequence.</p>
  963. <dl class="section return"><dt>Returns</dt><dd>The value true is returned for success and the value false is returned for failure. </dd></dl>
  964. </div>
  965. </div>
  966. <hr/>The documentation for this class was generated from the following file:<ul>
  967. <li>Arduino/libraries/SdFat/<a class="el" href="_sd_spi_card_8h.html">SdSpiCard.h</a></li>
  968. </ul>
  969. </div><!-- contents -->
  970. <!-- start footer part -->
  971. <hr class="footer"/><address class="footer"><small>
  972. Generated on Sun Feb 1 2015 10:21:40 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  973. <img class="footer" src="doxygen.png" alt="doxygen"/>
  974. </a> 1.8.8
  975. </small></address>
  976. </body>
  977. </html>