Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

924 lines
41KB

  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.10"/>
  7. <title>SdFat: SdSpiCard 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/searchdata.js"></script>
  13. <script type="text/javascript" src="search/search.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function() { init_search(); });
  16. </script>
  17. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  18. </head>
  19. <body>
  20. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  21. <div id="titlearea">
  22. <table cellspacing="0" cellpadding="0">
  23. <tbody>
  24. <tr style="height: 56px;">
  25. <td id="projectalign" style="padding-left: 0.5em;">
  26. <div id="projectname">SdFat
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.10 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</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. </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-methods">Public Member Functions</a> &#124;
  84. <a href="class_sd_spi_card-members.html">List of all members</a> </div>
  85. <div class="headertitle">
  86. <div class="title">SdSpiCard Class Reference</div> </div>
  87. </div><!--header-->
  88. <div class="contents">
  89. <p>Raw access to SD and SDHC flash memory cards via SPI protocol.
  90. <a href="class_sd_spi_card.html#details">More...</a></p>
  91. <p><code>#include &lt;SdSpiCard.h&gt;</code></p>
  92. <div class="dynheader">
  93. Inheritance diagram for SdSpiCard:</div>
  94. <div class="dyncontent">
  95. <div class="center"><img src="class_sd_spi_card__inherit__graph.png" border="0" usemap="#_sd_spi_card_inherit__map" alt="Inheritance graph"/></div>
  96. <map name="_sd_spi_card_inherit__map" id="_sd_spi_card_inherit__map">
  97. <area shape="rect" id="node2" href="class_sd2_card.html" title="Raw access to SD and SDHC card using default SPI library. " alt="" coords="5,80,77,107"/>
  98. <area shape="rect" id="node3" href="class_sd_spi_card_e_x.html" title="Extended SD I/O block driver. " alt="" coords="102,80,202,107"/>
  99. </map>
  100. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  101. <table class="memberdecls">
  102. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  103. Public Member Functions</h2></td></tr>
  104. <tr class="memitem:a824cd60ef8ac2b06262597d6f30a4ea7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a824cd60ef8ac2b06262597d6f30a4ea7">begin</a> (SdSpiDriver *spi, uint8_t csPin, SPISettings spiSettings)</td></tr>
  105. <tr class="separator:a824cd60ef8ac2b06262597d6f30a4ea7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <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>
  107. <tr class="separator:afca8bd6b7e465bf9c475ba375c4deec8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <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>
  109. <tr class="separator:a1caa13d19df6596b2c0dd62365c75362"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. <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>
  111. <tr class="separator:aed4591884254c9f58daa8738d7c1ccdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. <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>
  113. <tr class="separator:aa12ad53111abcb187d3c6119a3a77592"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <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>
  115. <tr class="separator:a50bf5f92223222beacec2b203a6b7a95"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <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>
  117. <tr class="separator:a7b1abdb8dd5254cd4af0df19ba59ce4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <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>
  119. <tr class="separator:aa3cb9139dbc1e6596c6717da2b486328"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a4393634a82c6683ee94d1fefe0be332a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a4393634a82c6683ee94d1fefe0be332a">readBlock</a> (uint32_t lba, uint8_t *dst)</td></tr>
  121. <tr class="separator:a4393634a82c6683ee94d1fefe0be332a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:ac630f77c3137923b47c1bd12a9bbfadf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#ac630f77c3137923b47c1bd12a9bbfadf">readBlocks</a> (uint32_t lba, uint8_t *dst, size_t nb)</td></tr>
  123. <tr class="separator:ac630f77c3137923b47c1bd12a9bbfadf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. <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>
  125. <tr class="separator:aa073dc42828164883db1b9faeff909ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <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>
  127. <tr class="separator:a9fbea9525e70f6e3602fe5153a5a1290"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. <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>
  129. <tr class="separator:a3a1d1b4b4ceb42fcd41aaf6649482770"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. <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>
  131. <tr class="separator:ab446e49338b3ce834a750ac6dae35f61"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <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>
  133. <tr class="separator:a3b1710d11496c32ba4323831e00ac6d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  134. <tr class="memitem:a91d0413599efe0d63c8c2dfe4a12d9ae"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a91d0413599efe0d63c8c2dfe4a12d9ae">readStatus</a> (uint8_t *status)</td></tr>
  135. <tr class="separator:a91d0413599efe0d63c8c2dfe4a12d9ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
  136. <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>
  137. <tr class="separator:afdac7c399fa1ba3f904cf503526e007e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:a0441c5da53bd3bd72fb833fc940f25e8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a0441c5da53bd3bd72fb833fc940f25e8">SdSpiCard</a> ()</td></tr>
  139. <tr class="separator:a0441c5da53bd3bd72fb833fc940f25e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  140. <tr class="memitem:aa39feb6ebb269071ac6843a424ac311c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#aa39feb6ebb269071ac6843a424ac311c">spiStart</a> ()</td></tr>
  141. <tr class="separator:aa39feb6ebb269071ac6843a424ac311c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  142. <tr class="memitem:a1033a4a68d38f52dddf6a1764fcca3e1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a1033a4a68d38f52dddf6a1764fcca3e1">spiStop</a> ()</td></tr>
  143. <tr class="separator:a1033a4a68d38f52dddf6a1764fcca3e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. <tr class="memitem:a1b6d5f412c4ad75c2f575ca75c56c095"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a1b6d5f412c4ad75c2f575ca75c56c095">syncBlocks</a> ()</td></tr>
  145. <tr class="separator:a1b6d5f412c4ad75c2f575ca75c56c095"><td class="memSeparator" colspan="2">&#160;</td></tr>
  146. <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>
  147. <tr class="separator:a061d92bf154a1863a6321385b7505f6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  148. <tr class="memitem:a03a0bdb0f37a88076f24a2133cf5b4ed"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a03a0bdb0f37a88076f24a2133cf5b4ed">writeBlock</a> (uint32_t lba, const uint8_t *src)</td></tr>
  149. <tr class="separator:a03a0bdb0f37a88076f24a2133cf5b4ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
  150. <tr class="memitem:a181d96fe44891b7caabcd47dd29ac913"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a181d96fe44891b7caabcd47dd29ac913">writeBlocks</a> (uint32_t lba, const uint8_t *src, size_t nb)</td></tr>
  151. <tr class="separator:a181d96fe44891b7caabcd47dd29ac913"><td class="memSeparator" colspan="2">&#160;</td></tr>
  152. <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>
  153. <tr class="separator:a9495c0b148eb380358bb4a9721c0dffa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  154. <tr class="memitem:a56d4750a5d2f693943eec985cb61ffe2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_card.html#a56d4750a5d2f693943eec985cb61ffe2">writeStart</a> (uint32_t blockNumber)</td></tr>
  155. <tr class="separator:a56d4750a5d2f693943eec985cb61ffe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  156. <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>
  157. <tr class="separator:a8bf0dc991308dcd2a7427bad89a9e2ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  158. <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>
  159. <tr class="separator:aef9154785a4de5560fb807e4f9316fb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  160. </table>
  161. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  162. <div class="textblock"><p>Raw access to SD and SDHC flash memory cards via SPI protocol. </p>
  163. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  164. <a class="anchor" id="a0441c5da53bd3bd72fb833fc940f25e8"></a>
  165. <div class="memitem">
  166. <div class="memproto">
  167. <table class="mlabels">
  168. <tr>
  169. <td class="mlabels-left">
  170. <table class="memname">
  171. <tr>
  172. <td class="memname">SdSpiCard::SdSpiCard </td>
  173. <td>(</td>
  174. <td class="paramname"></td><td>)</td>
  175. <td></td>
  176. </tr>
  177. </table>
  178. </td>
  179. <td class="mlabels-right">
  180. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  181. </tr>
  182. </table>
  183. </div><div class="memdoc">
  184. <p>Construct an instance of <a class="el" href="class_sd_spi_card.html" title="Raw access to SD and SDHC flash memory cards via SPI protocol. ">SdSpiCard</a>. </p>
  185. </div>
  186. </div>
  187. <h2 class="groupheader">Member Function Documentation</h2>
  188. <a class="anchor" id="a824cd60ef8ac2b06262597d6f30a4ea7"></a>
  189. <div class="memitem">
  190. <div class="memproto">
  191. <table class="memname">
  192. <tr>
  193. <td class="memname">bool SdSpiCard::begin </td>
  194. <td>(</td>
  195. <td class="paramtype">SdSpiDriver *&#160;</td>
  196. <td class="paramname"><em>spi</em>, </td>
  197. </tr>
  198. <tr>
  199. <td class="paramkey"></td>
  200. <td></td>
  201. <td class="paramtype">uint8_t&#160;</td>
  202. <td class="paramname"><em>csPin</em>, </td>
  203. </tr>
  204. <tr>
  205. <td class="paramkey"></td>
  206. <td></td>
  207. <td class="paramtype">SPISettings&#160;</td>
  208. <td class="paramname"><em>spiSettings</em>&#160;</td>
  209. </tr>
  210. <tr>
  211. <td></td>
  212. <td>)</td>
  213. <td></td><td></td>
  214. </tr>
  215. </table>
  216. </div><div class="memdoc">
  217. <p>Initialize the SD card. </p><dl class="params"><dt>Parameters</dt><dd>
  218. <table class="params">
  219. <tr><td class="paramdir">[in]</td><td class="paramname">spi</td><td>SPI driver for card. </td></tr>
  220. <tr><td class="paramdir">[in]</td><td class="paramname">csPin</td><td>card chip select pin. </td></tr>
  221. <tr><td class="paramdir">[in]</td><td class="paramname">spiSettings</td><td>SPI speed, mode, and bit order. </td></tr>
  222. </table>
  223. </dd>
  224. </dl>
  225. <dl class="section return"><dt>Returns</dt><dd>true for success else false. </dd></dl>
  226. </div>
  227. </div>
  228. <a class="anchor" id="afca8bd6b7e465bf9c475ba375c4deec8"></a>
  229. <div class="memitem">
  230. <div class="memproto">
  231. <table class="memname">
  232. <tr>
  233. <td class="memname">uint32_t SdSpiCard::cardSize </td>
  234. <td>(</td>
  235. <td class="paramname"></td><td>)</td>
  236. <td></td>
  237. </tr>
  238. </table>
  239. </div><div class="memdoc">
  240. <p>Determine the size of an SD flash memory card.</p>
  241. <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>
  242. </div>
  243. </div>
  244. <a class="anchor" id="a1caa13d19df6596b2c0dd62365c75362"></a>
  245. <div class="memitem">
  246. <div class="memproto">
  247. <table class="memname">
  248. <tr>
  249. <td class="memname">bool SdSpiCard::erase </td>
  250. <td>(</td>
  251. <td class="paramtype">uint32_t&#160;</td>
  252. <td class="paramname"><em>firstBlock</em>, </td>
  253. </tr>
  254. <tr>
  255. <td class="paramkey"></td>
  256. <td></td>
  257. <td class="paramtype">uint32_t&#160;</td>
  258. <td class="paramname"><em>lastBlock</em>&#160;</td>
  259. </tr>
  260. <tr>
  261. <td></td>
  262. <td>)</td>
  263. <td></td><td></td>
  264. </tr>
  265. </table>
  266. </div><div class="memdoc">
  267. <p>Erase a range of blocks.</p>
  268. <dl class="params"><dt>Parameters</dt><dd>
  269. <table class="params">
  270. <tr><td class="paramdir">[in]</td><td class="paramname">firstBlock</td><td>The address of the first block in the range. </td></tr>
  271. <tr><td class="paramdir">[in]</td><td class="paramname">lastBlock</td><td>The address of the last block in the range.</td></tr>
  272. </table>
  273. </dd>
  274. </dl>
  275. <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>
  276. <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>
  277. </div>
  278. </div>
  279. <a class="anchor" id="aed4591884254c9f58daa8738d7c1ccdd"></a>
  280. <div class="memitem">
  281. <div class="memproto">
  282. <table class="memname">
  283. <tr>
  284. <td class="memname">bool SdSpiCard::eraseSingleBlockEnable </td>
  285. <td>(</td>
  286. <td class="paramname"></td><td>)</td>
  287. <td></td>
  288. </tr>
  289. </table>
  290. </div><div class="memdoc">
  291. <p>Determine if card supports single block erase.</p>
  292. <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>
  293. </div>
  294. </div>
  295. <a class="anchor" id="aa12ad53111abcb187d3c6119a3a77592"></a>
  296. <div class="memitem">
  297. <div class="memproto">
  298. <table class="mlabels">
  299. <tr>
  300. <td class="mlabels-left">
  301. <table class="memname">
  302. <tr>
  303. <td class="memname">void SdSpiCard::error </td>
  304. <td>(</td>
  305. <td class="paramtype">uint8_t&#160;</td>
  306. <td class="paramname"><em>code</em></td><td>)</td>
  307. <td></td>
  308. </tr>
  309. </table>
  310. </td>
  311. <td class="mlabels-right">
  312. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  313. </tr>
  314. </table>
  315. </div><div class="memdoc">
  316. <p>Set SD error code. </p><dl class="params"><dt>Parameters</dt><dd>
  317. <table class="params">
  318. <tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>value for error code. </td></tr>
  319. </table>
  320. </dd>
  321. </dl>
  322. </div>
  323. </div>
  324. <a class="anchor" id="a50bf5f92223222beacec2b203a6b7a95"></a>
  325. <div class="memitem">
  326. <div class="memproto">
  327. <table class="mlabels">
  328. <tr>
  329. <td class="mlabels-left">
  330. <table class="memname">
  331. <tr>
  332. <td class="memname">int SdSpiCard::errorCode </td>
  333. <td>(</td>
  334. <td class="paramname"></td><td>)</td>
  335. <td> const</td>
  336. </tr>
  337. </table>
  338. </td>
  339. <td class="mlabels-right">
  340. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  341. </tr>
  342. </table>
  343. </div><div class="memdoc">
  344. <dl class="section return"><dt>Returns</dt><dd>code for the last error. See SdInfo.h for a list of error codes. </dd></dl>
  345. </div>
  346. </div>
  347. <a class="anchor" id="a7b1abdb8dd5254cd4af0df19ba59ce4a"></a>
  348. <div class="memitem">
  349. <div class="memproto">
  350. <table class="mlabels">
  351. <tr>
  352. <td class="mlabels-left">
  353. <table class="memname">
  354. <tr>
  355. <td class="memname">int SdSpiCard::errorData </td>
  356. <td>(</td>
  357. <td class="paramname"></td><td>)</td>
  358. <td> const</td>
  359. </tr>
  360. </table>
  361. </td>
  362. <td class="mlabels-right">
  363. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  364. </tr>
  365. </table>
  366. </div><div class="memdoc">
  367. <dl class="section return"><dt>Returns</dt><dd>error data for last error. </dd></dl>
  368. </div>
  369. </div>
  370. <a class="anchor" id="aa3cb9139dbc1e6596c6717da2b486328"></a>
  371. <div class="memitem">
  372. <div class="memproto">
  373. <table class="memname">
  374. <tr>
  375. <td class="memname">bool SdSpiCard::isBusy </td>
  376. <td>(</td>
  377. <td class="paramname"></td><td>)</td>
  378. <td></td>
  379. </tr>
  380. </table>
  381. </div><div class="memdoc">
  382. <p>Check for busy. MISO low indicates the card is busy.</p>
  383. <dl class="section return"><dt>Returns</dt><dd>true if busy else false. </dd></dl>
  384. </div>
  385. </div>
  386. <a class="anchor" id="a4393634a82c6683ee94d1fefe0be332a"></a>
  387. <div class="memitem">
  388. <div class="memproto">
  389. <table class="memname">
  390. <tr>
  391. <td class="memname">bool SdSpiCard::readBlock </td>
  392. <td>(</td>
  393. <td class="paramtype">uint32_t&#160;</td>
  394. <td class="paramname"><em>lba</em>, </td>
  395. </tr>
  396. <tr>
  397. <td class="paramkey"></td>
  398. <td></td>
  399. <td class="paramtype">uint8_t *&#160;</td>
  400. <td class="paramname"><em>dst</em>&#160;</td>
  401. </tr>
  402. <tr>
  403. <td></td>
  404. <td>)</td>
  405. <td></td><td></td>
  406. </tr>
  407. </table>
  408. </div><div class="memdoc">
  409. <p>Read a 512 byte block from an SD card.</p>
  410. <dl class="params"><dt>Parameters</dt><dd>
  411. <table class="params">
  412. <tr><td class="paramdir">[in]</td><td class="paramname">lba</td><td>Logical block to be read. </td></tr>
  413. <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location that will receive the data. </td></tr>
  414. </table>
  415. </dd>
  416. </dl>
  417. <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>
  418. </div>
  419. </div>
  420. <a class="anchor" id="ac630f77c3137923b47c1bd12a9bbfadf"></a>
  421. <div class="memitem">
  422. <div class="memproto">
  423. <table class="memname">
  424. <tr>
  425. <td class="memname">bool SdSpiCard::readBlocks </td>
  426. <td>(</td>
  427. <td class="paramtype">uint32_t&#160;</td>
  428. <td class="paramname"><em>lba</em>, </td>
  429. </tr>
  430. <tr>
  431. <td class="paramkey"></td>
  432. <td></td>
  433. <td class="paramtype">uint8_t *&#160;</td>
  434. <td class="paramname"><em>dst</em>, </td>
  435. </tr>
  436. <tr>
  437. <td class="paramkey"></td>
  438. <td></td>
  439. <td class="paramtype">size_t&#160;</td>
  440. <td class="paramname"><em>nb</em>&#160;</td>
  441. </tr>
  442. <tr>
  443. <td></td>
  444. <td>)</td>
  445. <td></td><td></td>
  446. </tr>
  447. </table>
  448. </div><div class="memdoc">
  449. <p>Read multiple 512 byte blocks from an SD card.</p>
  450. <dl class="params"><dt>Parameters</dt><dd>
  451. <table class="params">
  452. <tr><td class="paramdir">[in]</td><td class="paramname">lba</td><td>Logical block to be read. </td></tr>
  453. <tr><td class="paramdir">[in]</td><td class="paramname">nb</td><td>Number of blocks to be read. </td></tr>
  454. <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location that will receive the data. </td></tr>
  455. </table>
  456. </dd>
  457. </dl>
  458. <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>
  459. </div>
  460. </div>
  461. <a class="anchor" id="aa073dc42828164883db1b9faeff909ea"></a>
  462. <div class="memitem">
  463. <div class="memproto">
  464. <table class="mlabels">
  465. <tr>
  466. <td class="mlabels-left">
  467. <table class="memname">
  468. <tr>
  469. <td class="memname">bool SdSpiCard::readCID </td>
  470. <td>(</td>
  471. <td class="paramtype">cid_t *&#160;</td>
  472. <td class="paramname"><em>cid</em></td><td>)</td>
  473. <td></td>
  474. </tr>
  475. </table>
  476. </td>
  477. <td class="mlabels-right">
  478. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  479. </tr>
  480. </table>
  481. </div><div class="memdoc">
  482. <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>
  483. <dl class="params"><dt>Parameters</dt><dd>
  484. <table class="params">
  485. <tr><td class="paramdir">[out]</td><td class="paramname">cid</td><td>pointer to area for returned data.</td></tr>
  486. </table>
  487. </dd>
  488. </dl>
  489. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  490. </div>
  491. </div>
  492. <a class="anchor" id="a9fbea9525e70f6e3602fe5153a5a1290"></a>
  493. <div class="memitem">
  494. <div class="memproto">
  495. <table class="mlabels">
  496. <tr>
  497. <td class="mlabels-left">
  498. <table class="memname">
  499. <tr>
  500. <td class="memname">bool SdSpiCard::readCSD </td>
  501. <td>(</td>
  502. <td class="paramtype">csd_t *&#160;</td>
  503. <td class="paramname"><em>csd</em></td><td>)</td>
  504. <td></td>
  505. </tr>
  506. </table>
  507. </td>
  508. <td class="mlabels-right">
  509. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  510. </tr>
  511. </table>
  512. </div><div class="memdoc">
  513. <p>Read a card's CSD register. The CSD contains Card-Specific Data that provides information regarding access to the card's contents.</p>
  514. <dl class="params"><dt>Parameters</dt><dd>
  515. <table class="params">
  516. <tr><td class="paramdir">[out]</td><td class="paramname">csd</td><td>pointer to area for returned data.</td></tr>
  517. </table>
  518. </dd>
  519. </dl>
  520. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  521. </div>
  522. </div>
  523. <a class="anchor" id="a3a1d1b4b4ceb42fcd41aaf6649482770"></a>
  524. <div class="memitem">
  525. <div class="memproto">
  526. <table class="memname">
  527. <tr>
  528. <td class="memname">bool SdSpiCard::readData </td>
  529. <td>(</td>
  530. <td class="paramtype">uint8_t *&#160;</td>
  531. <td class="paramname"><em>dst</em></td><td>)</td>
  532. <td></td>
  533. </tr>
  534. </table>
  535. </div><div class="memdoc">
  536. <p>Read one data block in a multiple block read sequence</p>
  537. <dl class="params"><dt>Parameters</dt><dd>
  538. <table class="params">
  539. <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location for the data to be read.</td></tr>
  540. </table>
  541. </dd>
  542. </dl>
  543. <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>
  544. </div>
  545. </div>
  546. <a class="anchor" id="ab446e49338b3ce834a750ac6dae35f61"></a>
  547. <div class="memitem">
  548. <div class="memproto">
  549. <table class="memname">
  550. <tr>
  551. <td class="memname">bool SdSpiCard::readOCR </td>
  552. <td>(</td>
  553. <td class="paramtype">uint32_t *&#160;</td>
  554. <td class="paramname"><em>ocr</em></td><td>)</td>
  555. <td></td>
  556. </tr>
  557. </table>
  558. </div><div class="memdoc">
  559. <p>Read OCR register.</p>
  560. <dl class="params"><dt>Parameters</dt><dd>
  561. <table class="params">
  562. <tr><td class="paramdir">[out]</td><td class="paramname">ocr</td><td>Value of OCR register. </td></tr>
  563. </table>
  564. </dd>
  565. </dl>
  566. <dl class="section return"><dt>Returns</dt><dd>true for success else false. </dd></dl>
  567. </div>
  568. </div>
  569. <a class="anchor" id="a3b1710d11496c32ba4323831e00ac6d1"></a>
  570. <div class="memitem">
  571. <div class="memproto">
  572. <table class="memname">
  573. <tr>
  574. <td class="memname">bool SdSpiCard::readStart </td>
  575. <td>(</td>
  576. <td class="paramtype">uint32_t&#160;</td>
  577. <td class="paramname"><em>blockNumber</em></td><td>)</td>
  578. <td></td>
  579. </tr>
  580. </table>
  581. </div><div class="memdoc">
  582. <p>Start a read multiple blocks sequence.</p>
  583. <dl class="params"><dt>Parameters</dt><dd>
  584. <table class="params">
  585. <tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Address of first block in sequence.</td></tr>
  586. </table>
  587. </dd>
  588. </dl>
  589. <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>
  590. <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>
  591. </div>
  592. </div>
  593. <a class="anchor" id="a91d0413599efe0d63c8c2dfe4a12d9ae"></a>
  594. <div class="memitem">
  595. <div class="memproto">
  596. <table class="memname">
  597. <tr>
  598. <td class="memname">bool SdSpiCard::readStatus </td>
  599. <td>(</td>
  600. <td class="paramtype">uint8_t *&#160;</td>
  601. <td class="paramname"><em>status</em></td><td>)</td>
  602. <td></td>
  603. </tr>
  604. </table>
  605. </div><div class="memdoc">
  606. <p>Return the 64 byte card status </p><dl class="params"><dt>Parameters</dt><dd>
  607. <table class="params">
  608. <tr><td class="paramdir">[out]</td><td class="paramname">status</td><td>location for 64 status bytes. </td></tr>
  609. </table>
  610. </dd>
  611. </dl>
  612. <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>
  613. </div>
  614. </div>
  615. <a class="anchor" id="afdac7c399fa1ba3f904cf503526e007e"></a>
  616. <div class="memitem">
  617. <div class="memproto">
  618. <table class="memname">
  619. <tr>
  620. <td class="memname">bool SdSpiCard::readStop </td>
  621. <td>(</td>
  622. <td class="paramname"></td><td>)</td>
  623. <td></td>
  624. </tr>
  625. </table>
  626. </div><div class="memdoc">
  627. <p>End a read multiple blocks sequence.</p>
  628. <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>
  629. </div>
  630. </div>
  631. <a class="anchor" id="aa39feb6ebb269071ac6843a424ac311c"></a>
  632. <div class="memitem">
  633. <div class="memproto">
  634. <table class="memname">
  635. <tr>
  636. <td class="memname">void SdSpiCard::spiStart </td>
  637. <td>(</td>
  638. <td class="paramname"></td><td>)</td>
  639. <td></td>
  640. </tr>
  641. </table>
  642. </div><div class="memdoc">
  643. <p>Set CS low and activate the card. </p>
  644. </div>
  645. </div>
  646. <a class="anchor" id="a1033a4a68d38f52dddf6a1764fcca3e1"></a>
  647. <div class="memitem">
  648. <div class="memproto">
  649. <table class="memname">
  650. <tr>
  651. <td class="memname">void SdSpiCard::spiStop </td>
  652. <td>(</td>
  653. <td class="paramname"></td><td>)</td>
  654. <td></td>
  655. </tr>
  656. </table>
  657. </div><div class="memdoc">
  658. <p>Set CS high and deactivate the card. </p>
  659. </div>
  660. </div>
  661. <a class="anchor" id="a1b6d5f412c4ad75c2f575ca75c56c095"></a>
  662. <div class="memitem">
  663. <div class="memproto">
  664. <table class="mlabels">
  665. <tr>
  666. <td class="mlabels-left">
  667. <table class="memname">
  668. <tr>
  669. <td class="memname">bool SdSpiCard::syncBlocks </td>
  670. <td>(</td>
  671. <td class="paramname"></td><td>)</td>
  672. <td></td>
  673. </tr>
  674. </table>
  675. </td>
  676. <td class="mlabels-right">
  677. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  678. </tr>
  679. </table>
  680. </div><div class="memdoc">
  681. <dl class="section return"><dt>Returns</dt><dd>success if sync successful. Not for user apps. </dd></dl>
  682. </div>
  683. </div>
  684. <a class="anchor" id="a061d92bf154a1863a6321385b7505f6e"></a>
  685. <div class="memitem">
  686. <div class="memproto">
  687. <table class="mlabels">
  688. <tr>
  689. <td class="mlabels-left">
  690. <table class="memname">
  691. <tr>
  692. <td class="memname">int SdSpiCard::type </td>
  693. <td>(</td>
  694. <td class="paramname"></td><td>)</td>
  695. <td> const</td>
  696. </tr>
  697. </table>
  698. </td>
  699. <td class="mlabels-right">
  700. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  701. </tr>
  702. </table>
  703. </div><div class="memdoc">
  704. <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>
  705. </div>
  706. </div>
  707. <a class="anchor" id="a03a0bdb0f37a88076f24a2133cf5b4ed"></a>
  708. <div class="memitem">
  709. <div class="memproto">
  710. <table class="memname">
  711. <tr>
  712. <td class="memname">bool SdSpiCard::writeBlock </td>
  713. <td>(</td>
  714. <td class="paramtype">uint32_t&#160;</td>
  715. <td class="paramname"><em>lba</em>, </td>
  716. </tr>
  717. <tr>
  718. <td class="paramkey"></td>
  719. <td></td>
  720. <td class="paramtype">const uint8_t *&#160;</td>
  721. <td class="paramname"><em>src</em>&#160;</td>
  722. </tr>
  723. <tr>
  724. <td></td>
  725. <td>)</td>
  726. <td></td><td></td>
  727. </tr>
  728. </table>
  729. </div><div class="memdoc">
  730. <p>Writes a 512 byte block to an SD card.</p>
  731. <dl class="params"><dt>Parameters</dt><dd>
  732. <table class="params">
  733. <tr><td class="paramdir">[in]</td><td class="paramname">lba</td><td>Logical block to be written. </td></tr>
  734. <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
  735. </table>
  736. </dd>
  737. </dl>
  738. <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>
  739. </div>
  740. </div>
  741. <a class="anchor" id="a181d96fe44891b7caabcd47dd29ac913"></a>
  742. <div class="memitem">
  743. <div class="memproto">
  744. <table class="memname">
  745. <tr>
  746. <td class="memname">bool SdSpiCard::writeBlocks </td>
  747. <td>(</td>
  748. <td class="paramtype">uint32_t&#160;</td>
  749. <td class="paramname"><em>lba</em>, </td>
  750. </tr>
  751. <tr>
  752. <td class="paramkey"></td>
  753. <td></td>
  754. <td class="paramtype">const uint8_t *&#160;</td>
  755. <td class="paramname"><em>src</em>, </td>
  756. </tr>
  757. <tr>
  758. <td class="paramkey"></td>
  759. <td></td>
  760. <td class="paramtype">size_t&#160;</td>
  761. <td class="paramname"><em>nb</em>&#160;</td>
  762. </tr>
  763. <tr>
  764. <td></td>
  765. <td>)</td>
  766. <td></td><td></td>
  767. </tr>
  768. </table>
  769. </div><div class="memdoc">
  770. <p>Write multiple 512 byte blocks to an SD card.</p>
  771. <dl class="params"><dt>Parameters</dt><dd>
  772. <table class="params">
  773. <tr><td class="paramdir">[in]</td><td class="paramname">lba</td><td>Logical block to be written. </td></tr>
  774. <tr><td class="paramdir">[in]</td><td class="paramname">nb</td><td>Number of blocks to be written. </td></tr>
  775. <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
  776. </table>
  777. </dd>
  778. </dl>
  779. <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>
  780. </div>
  781. </div>
  782. <a class="anchor" id="a9495c0b148eb380358bb4a9721c0dffa"></a>
  783. <div class="memitem">
  784. <div class="memproto">
  785. <table class="memname">
  786. <tr>
  787. <td class="memname">bool SdSpiCard::writeData </td>
  788. <td>(</td>
  789. <td class="paramtype">const uint8_t *&#160;</td>
  790. <td class="paramname"><em>src</em></td><td>)</td>
  791. <td></td>
  792. </tr>
  793. </table>
  794. </div><div class="memdoc">
  795. <p>Write one data block in a multiple block write sequence. </p><dl class="params"><dt>Parameters</dt><dd>
  796. <table class="params">
  797. <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
  798. </table>
  799. </dd>
  800. </dl>
  801. <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>
  802. </div>
  803. </div>
  804. <a class="anchor" id="a56d4750a5d2f693943eec985cb61ffe2"></a>
  805. <div class="memitem">
  806. <div class="memproto">
  807. <table class="memname">
  808. <tr>
  809. <td class="memname">bool SdSpiCard::writeStart </td>
  810. <td>(</td>
  811. <td class="paramtype">uint32_t&#160;</td>
  812. <td class="paramname"><em>blockNumber</em></td><td>)</td>
  813. <td></td>
  814. </tr>
  815. </table>
  816. </div><div class="memdoc">
  817. <p>Start a write multiple blocks sequence.</p>
  818. <dl class="params"><dt>Parameters</dt><dd>
  819. <table class="params">
  820. <tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Address of first block in sequence.</td></tr>
  821. </table>
  822. </dd>
  823. </dl>
  824. <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>
  825. <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>
  826. </div>
  827. </div>
  828. <a class="anchor" id="a8bf0dc991308dcd2a7427bad89a9e2ba"></a>
  829. <div class="memitem">
  830. <div class="memproto">
  831. <table class="memname">
  832. <tr>
  833. <td class="memname">bool SdSpiCard::writeStart </td>
  834. <td>(</td>
  835. <td class="paramtype">uint32_t&#160;</td>
  836. <td class="paramname"><em>blockNumber</em>, </td>
  837. </tr>
  838. <tr>
  839. <td class="paramkey"></td>
  840. <td></td>
  841. <td class="paramtype">uint32_t&#160;</td>
  842. <td class="paramname"><em>eraseCount</em>&#160;</td>
  843. </tr>
  844. <tr>
  845. <td></td>
  846. <td>)</td>
  847. <td></td><td></td>
  848. </tr>
  849. </table>
  850. </div><div class="memdoc">
  851. <p>Start a write multiple blocks sequence with pre-erase.</p>
  852. <dl class="params"><dt>Parameters</dt><dd>
  853. <table class="params">
  854. <tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Address of first block in sequence. </td></tr>
  855. <tr><td class="paramdir">[in]</td><td class="paramname">eraseCount</td><td>The number of blocks to be pre-erased.</td></tr>
  856. </table>
  857. </dd>
  858. </dl>
  859. <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>
  860. <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>
  861. </div>
  862. </div>
  863. <a class="anchor" id="aef9154785a4de5560fb807e4f9316fb0"></a>
  864. <div class="memitem">
  865. <div class="memproto">
  866. <table class="memname">
  867. <tr>
  868. <td class="memname">bool SdSpiCard::writeStop </td>
  869. <td>(</td>
  870. <td class="paramname"></td><td>)</td>
  871. <td></td>
  872. </tr>
  873. </table>
  874. </div><div class="memdoc">
  875. <p>End a write multiple blocks sequence.</p>
  876. <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>
  877. </div>
  878. </div>
  879. <hr/>The documentation for this class was generated from the following files:<ul>
  880. <li>Arduino/libraries/SdFat/src/SdCard/<a class="el" href="_sd_spi_card_8h.html">SdSpiCard.h</a></li>
  881. <li>Arduino/libraries/SdFat/src/SdCard/SdSpiCard.cpp</li>
  882. </ul>
  883. </div><!-- contents -->
  884. <!-- start footer part -->
  885. <hr class="footer"/><address class="footer"><small>
  886. Generated on Mon Sep 5 2016 10:18:53 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  887. <img class="footer" src="doxygen.png" alt="doxygen"/>
  888. </a> 1.8.10
  889. </small></address>
  890. </body>
  891. </html>