Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

1107 lines
46KB

  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: 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/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_sd2_card-members.html">List of all members</a> </div>
  85. <div class="headertitle">
  86. <div class="title">Sd2Card Class Reference</div> </div>
  87. </div><!--header-->
  88. <div class="contents">
  89. <p>Raw access to SD and SDHC card using default SPI library.
  90. <a href="class_sd2_card.html#details">More...</a></p>
  91. <p><code>#include &lt;SdFat.h&gt;</code></p>
  92. <div class="dynheader">
  93. Inheritance diagram for Sd2Card:</div>
  94. <div class="dyncontent">
  95. <div class="center"><img src="class_sd2_card__inherit__graph.png" border="0" usemap="#_sd2_card_inherit__map" alt="Inheritance graph"/></div>
  96. <map name="_sd2_card_inherit__map" id="_sd2_card_inherit__map">
  97. <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,89,32"/>
  98. </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,89,32"/>
  106. </map>
  107. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  108. <table class="memberdecls">
  109. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  110. Public Member Functions</h2></td></tr>
  111. <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>
  112. <tr class="separator:a824cd60ef8ac2b06262597d6f30a4ea7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="memitem:a8506e1a2d7c4d8ec3f26e8b62ea81cd7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a8506e1a2d7c4d8ec3f26e8b62ea81cd7">begin</a> (uint8_t csPin=SS, SPISettings settings=SD_SCK_MHZ(50))</td></tr>
  114. <tr class="separator:a8506e1a2d7c4d8ec3f26e8b62ea81cd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. <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>
  116. <tr class="separator:afca8bd6b7e465bf9c475ba375c4deec8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <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>
  118. <tr class="separator:a1caa13d19df6596b2c0dd62365c75362"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. <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>
  120. <tr class="separator:aed4591884254c9f58daa8738d7c1ccdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  121. <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>
  122. <tr class="separator:aa12ad53111abcb187d3c6119a3a77592"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <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>
  124. <tr class="separator:a50bf5f92223222beacec2b203a6b7a95"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. <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>
  126. <tr class="separator:a7b1abdb8dd5254cd4af0df19ba59ce4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  127. <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>
  128. <tr class="separator:aa3cb9139dbc1e6596c6717da2b486328"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <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>
  130. <tr class="separator:a4393634a82c6683ee94d1fefe0be332a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  131. <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>
  132. <tr class="separator:ac630f77c3137923b47c1bd12a9bbfadf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  133. <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>
  134. <tr class="separator:aa073dc42828164883db1b9faeff909ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <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>
  136. <tr class="separator:a9fbea9525e70f6e3602fe5153a5a1290"><td class="memSeparator" colspan="2">&#160;</td></tr>
  137. <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>
  138. <tr class="separator:a3a1d1b4b4ceb42fcd41aaf6649482770"><td class="memSeparator" colspan="2">&#160;</td></tr>
  139. <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>
  140. <tr class="separator:ab446e49338b3ce834a750ac6dae35f61"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <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>
  142. <tr class="separator:a3b1710d11496c32ba4323831e00ac6d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  143. <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>
  144. <tr class="separator:a91d0413599efe0d63c8c2dfe4a12d9ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
  145. <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>
  146. <tr class="separator:afdac7c399fa1ba3f904cf503526e007e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  147. <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>
  148. <tr class="separator:aa39feb6ebb269071ac6843a424ac311c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  149. <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>
  150. <tr class="separator:a1033a4a68d38f52dddf6a1764fcca3e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  151. <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>
  152. <tr class="separator:a1b6d5f412c4ad75c2f575ca75c56c095"><td class="memSeparator" colspan="2">&#160;</td></tr>
  153. <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>
  154. <tr class="separator:a061d92bf154a1863a6321385b7505f6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  155. <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>
  156. <tr class="separator:a03a0bdb0f37a88076f24a2133cf5b4ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
  157. <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>
  158. <tr class="separator:a181d96fe44891b7caabcd47dd29ac913"><td class="memSeparator" colspan="2">&#160;</td></tr>
  159. <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>
  160. <tr class="separator:a9495c0b148eb380358bb4a9721c0dffa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  161. <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>
  162. <tr class="separator:a56d4750a5d2f693943eec985cb61ffe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  163. <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>
  164. <tr class="separator:a8bf0dc991308dcd2a7427bad89a9e2ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  165. <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>
  166. <tr class="separator:aef9154785a4de5560fb807e4f9316fb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  167. </table>
  168. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  169. <div class="textblock"><p>Raw access to SD and SDHC card using default SPI library. </p>
  170. </div><h2 class="groupheader">Member Function Documentation</h2>
  171. <a class="anchor" id="a824cd60ef8ac2b06262597d6f30a4ea7"></a>
  172. <div class="memitem">
  173. <div class="memproto">
  174. <table class="mlabels">
  175. <tr>
  176. <td class="mlabels-left">
  177. <table class="memname">
  178. <tr>
  179. <td class="memname">bool SdSpiCard::begin </td>
  180. <td>(</td>
  181. <td class="paramtype">SdSpiDriver *&#160;</td>
  182. <td class="paramname"><em>spi</em>, </td>
  183. </tr>
  184. <tr>
  185. <td class="paramkey"></td>
  186. <td></td>
  187. <td class="paramtype">uint8_t&#160;</td>
  188. <td class="paramname"><em>csPin</em>, </td>
  189. </tr>
  190. <tr>
  191. <td class="paramkey"></td>
  192. <td></td>
  193. <td class="paramtype">SPISettings&#160;</td>
  194. <td class="paramname"><em>spiSettings</em>&#160;</td>
  195. </tr>
  196. <tr>
  197. <td></td>
  198. <td>)</td>
  199. <td></td><td></td>
  200. </tr>
  201. </table>
  202. </td>
  203. <td class="mlabels-right">
  204. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  205. </tr>
  206. </table>
  207. </div><div class="memdoc">
  208. <p>Initialize the SD card. </p><dl class="params"><dt>Parameters</dt><dd>
  209. <table class="params">
  210. <tr><td class="paramdir">[in]</td><td class="paramname">spi</td><td>SPI driver for card. </td></tr>
  211. <tr><td class="paramdir">[in]</td><td class="paramname">csPin</td><td>card chip select pin. </td></tr>
  212. <tr><td class="paramdir">[in]</td><td class="paramname">spiSettings</td><td>SPI speed, mode, and bit order. </td></tr>
  213. </table>
  214. </dd>
  215. </dl>
  216. <dl class="section return"><dt>Returns</dt><dd>true for success else false. </dd></dl>
  217. </div>
  218. </div>
  219. <a class="anchor" id="a8506e1a2d7c4d8ec3f26e8b62ea81cd7"></a>
  220. <div class="memitem">
  221. <div class="memproto">
  222. <table class="mlabels">
  223. <tr>
  224. <td class="mlabels-left">
  225. <table class="memname">
  226. <tr>
  227. <td class="memname">bool Sd2Card::begin </td>
  228. <td>(</td>
  229. <td class="paramtype">uint8_t&#160;</td>
  230. <td class="paramname"><em>csPin</em> = <code>SS</code>, </td>
  231. </tr>
  232. <tr>
  233. <td class="paramkey"></td>
  234. <td></td>
  235. <td class="paramtype">SPISettings&#160;</td>
  236. <td class="paramname"><em>settings</em> = <code>SD_SCK_MHZ(50)</code>&#160;</td>
  237. </tr>
  238. <tr>
  239. <td></td>
  240. <td>)</td>
  241. <td></td><td></td>
  242. </tr>
  243. </table>
  244. </td>
  245. <td class="mlabels-right">
  246. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  247. </tr>
  248. </table>
  249. </div><div class="memdoc">
  250. <p>Initialize the SD card. </p><dl class="params"><dt>Parameters</dt><dd>
  251. <table class="params">
  252. <tr><td class="paramdir">[in]</td><td class="paramname">csPin</td><td>SD chip select pin. </td></tr>
  253. <tr><td class="paramdir">[in]</td><td class="paramname">settings</td><td>SPI speed, mode, and bit order. </td></tr>
  254. </table>
  255. </dd>
  256. </dl>
  257. <dl class="section return"><dt>Returns</dt><dd>true for success else false. </dd></dl>
  258. </div>
  259. </div>
  260. <a class="anchor" id="afca8bd6b7e465bf9c475ba375c4deec8"></a>
  261. <div class="memitem">
  262. <div class="memproto">
  263. <table class="mlabels">
  264. <tr>
  265. <td class="mlabels-left">
  266. <table class="memname">
  267. <tr>
  268. <td class="memname">uint32_t SdSpiCard::cardSize </td>
  269. <td>(</td>
  270. <td class="paramname"></td><td>)</td>
  271. <td></td>
  272. </tr>
  273. </table>
  274. </td>
  275. <td class="mlabels-right">
  276. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  277. </tr>
  278. </table>
  279. </div><div class="memdoc">
  280. <p>Determine the size of an SD flash memory card.</p>
  281. <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>
  282. </div>
  283. </div>
  284. <a class="anchor" id="a1caa13d19df6596b2c0dd62365c75362"></a>
  285. <div class="memitem">
  286. <div class="memproto">
  287. <table class="mlabels">
  288. <tr>
  289. <td class="mlabels-left">
  290. <table class="memname">
  291. <tr>
  292. <td class="memname">bool SdSpiCard::erase </td>
  293. <td>(</td>
  294. <td class="paramtype">uint32_t&#160;</td>
  295. <td class="paramname"><em>firstBlock</em>, </td>
  296. </tr>
  297. <tr>
  298. <td class="paramkey"></td>
  299. <td></td>
  300. <td class="paramtype">uint32_t&#160;</td>
  301. <td class="paramname"><em>lastBlock</em>&#160;</td>
  302. </tr>
  303. <tr>
  304. <td></td>
  305. <td>)</td>
  306. <td></td><td></td>
  307. </tr>
  308. </table>
  309. </td>
  310. <td class="mlabels-right">
  311. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  312. </tr>
  313. </table>
  314. </div><div class="memdoc">
  315. <p>Erase a range of blocks.</p>
  316. <dl class="params"><dt>Parameters</dt><dd>
  317. <table class="params">
  318. <tr><td class="paramdir">[in]</td><td class="paramname">firstBlock</td><td>The address of the first block in the range. </td></tr>
  319. <tr><td class="paramdir">[in]</td><td class="paramname">lastBlock</td><td>The address of the last block in the range.</td></tr>
  320. </table>
  321. </dd>
  322. </dl>
  323. <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>
  324. <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>
  325. </div>
  326. </div>
  327. <a class="anchor" id="aed4591884254c9f58daa8738d7c1ccdd"></a>
  328. <div class="memitem">
  329. <div class="memproto">
  330. <table class="mlabels">
  331. <tr>
  332. <td class="mlabels-left">
  333. <table class="memname">
  334. <tr>
  335. <td class="memname">bool SdSpiCard::eraseSingleBlockEnable </td>
  336. <td>(</td>
  337. <td class="paramname"></td><td>)</td>
  338. <td></td>
  339. </tr>
  340. </table>
  341. </td>
  342. <td class="mlabels-right">
  343. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  344. </tr>
  345. </table>
  346. </div><div class="memdoc">
  347. <p>Determine if card supports single block erase.</p>
  348. <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>
  349. </div>
  350. </div>
  351. <a class="anchor" id="aa12ad53111abcb187d3c6119a3a77592"></a>
  352. <div class="memitem">
  353. <div class="memproto">
  354. <table class="mlabels">
  355. <tr>
  356. <td class="mlabels-left">
  357. <table class="memname">
  358. <tr>
  359. <td class="memname">void SdSpiCard::error </td>
  360. <td>(</td>
  361. <td class="paramtype">uint8_t&#160;</td>
  362. <td class="paramname"><em>code</em></td><td>)</td>
  363. <td></td>
  364. </tr>
  365. </table>
  366. </td>
  367. <td class="mlabels-right">
  368. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  369. </tr>
  370. </table>
  371. </div><div class="memdoc">
  372. <p>Set SD error code. </p><dl class="params"><dt>Parameters</dt><dd>
  373. <table class="params">
  374. <tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>value for error code. </td></tr>
  375. </table>
  376. </dd>
  377. </dl>
  378. </div>
  379. </div>
  380. <a class="anchor" id="a50bf5f92223222beacec2b203a6b7a95"></a>
  381. <div class="memitem">
  382. <div class="memproto">
  383. <table class="mlabels">
  384. <tr>
  385. <td class="mlabels-left">
  386. <table class="memname">
  387. <tr>
  388. <td class="memname">int SdSpiCard::errorCode </td>
  389. <td>(</td>
  390. <td class="paramname"></td><td>)</td>
  391. <td> const</td>
  392. </tr>
  393. </table>
  394. </td>
  395. <td class="mlabels-right">
  396. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  397. </tr>
  398. </table>
  399. </div><div class="memdoc">
  400. <dl class="section return"><dt>Returns</dt><dd>code for the last error. See SdInfo.h for a list of error codes. </dd></dl>
  401. </div>
  402. </div>
  403. <a class="anchor" id="a7b1abdb8dd5254cd4af0df19ba59ce4a"></a>
  404. <div class="memitem">
  405. <div class="memproto">
  406. <table class="mlabels">
  407. <tr>
  408. <td class="mlabels-left">
  409. <table class="memname">
  410. <tr>
  411. <td class="memname">int SdSpiCard::errorData </td>
  412. <td>(</td>
  413. <td class="paramname"></td><td>)</td>
  414. <td> const</td>
  415. </tr>
  416. </table>
  417. </td>
  418. <td class="mlabels-right">
  419. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  420. </tr>
  421. </table>
  422. </div><div class="memdoc">
  423. <dl class="section return"><dt>Returns</dt><dd>error data for last error. </dd></dl>
  424. </div>
  425. </div>
  426. <a class="anchor" id="aa3cb9139dbc1e6596c6717da2b486328"></a>
  427. <div class="memitem">
  428. <div class="memproto">
  429. <table class="mlabels">
  430. <tr>
  431. <td class="mlabels-left">
  432. <table class="memname">
  433. <tr>
  434. <td class="memname">bool SdSpiCard::isBusy </td>
  435. <td>(</td>
  436. <td class="paramname"></td><td>)</td>
  437. <td></td>
  438. </tr>
  439. </table>
  440. </td>
  441. <td class="mlabels-right">
  442. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  443. </tr>
  444. </table>
  445. </div><div class="memdoc">
  446. <p>Check for busy. MISO low indicates the card is busy.</p>
  447. <dl class="section return"><dt>Returns</dt><dd>true if busy else false. </dd></dl>
  448. </div>
  449. </div>
  450. <a class="anchor" id="a4393634a82c6683ee94d1fefe0be332a"></a>
  451. <div class="memitem">
  452. <div class="memproto">
  453. <table class="mlabels">
  454. <tr>
  455. <td class="mlabels-left">
  456. <table class="memname">
  457. <tr>
  458. <td class="memname">bool SdSpiCard::readBlock </td>
  459. <td>(</td>
  460. <td class="paramtype">uint32_t&#160;</td>
  461. <td class="paramname"><em>lba</em>, </td>
  462. </tr>
  463. <tr>
  464. <td class="paramkey"></td>
  465. <td></td>
  466. <td class="paramtype">uint8_t *&#160;</td>
  467. <td class="paramname"><em>dst</em>&#160;</td>
  468. </tr>
  469. <tr>
  470. <td></td>
  471. <td>)</td>
  472. <td></td><td></td>
  473. </tr>
  474. </table>
  475. </td>
  476. <td class="mlabels-right">
  477. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  478. </tr>
  479. </table>
  480. </div><div class="memdoc">
  481. <p>Read a 512 byte block from an SD card.</p>
  482. <dl class="params"><dt>Parameters</dt><dd>
  483. <table class="params">
  484. <tr><td class="paramdir">[in]</td><td class="paramname">lba</td><td>Logical block to be read. </td></tr>
  485. <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location that will receive the data. </td></tr>
  486. </table>
  487. </dd>
  488. </dl>
  489. <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>
  490. </div>
  491. </div>
  492. <a class="anchor" id="ac630f77c3137923b47c1bd12a9bbfadf"></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::readBlocks </td>
  501. <td>(</td>
  502. <td class="paramtype">uint32_t&#160;</td>
  503. <td class="paramname"><em>lba</em>, </td>
  504. </tr>
  505. <tr>
  506. <td class="paramkey"></td>
  507. <td></td>
  508. <td class="paramtype">uint8_t *&#160;</td>
  509. <td class="paramname"><em>dst</em>, </td>
  510. </tr>
  511. <tr>
  512. <td class="paramkey"></td>
  513. <td></td>
  514. <td class="paramtype">size_t&#160;</td>
  515. <td class="paramname"><em>nb</em>&#160;</td>
  516. </tr>
  517. <tr>
  518. <td></td>
  519. <td>)</td>
  520. <td></td><td></td>
  521. </tr>
  522. </table>
  523. </td>
  524. <td class="mlabels-right">
  525. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  526. </tr>
  527. </table>
  528. </div><div class="memdoc">
  529. <p>Read multiple 512 byte blocks from an SD card.</p>
  530. <dl class="params"><dt>Parameters</dt><dd>
  531. <table class="params">
  532. <tr><td class="paramdir">[in]</td><td class="paramname">lba</td><td>Logical block to be read. </td></tr>
  533. <tr><td class="paramdir">[in]</td><td class="paramname">nb</td><td>Number of blocks to be read. </td></tr>
  534. <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location that will receive the data. </td></tr>
  535. </table>
  536. </dd>
  537. </dl>
  538. <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>
  539. </div>
  540. </div>
  541. <a class="anchor" id="aa073dc42828164883db1b9faeff909ea"></a>
  542. <div class="memitem">
  543. <div class="memproto">
  544. <table class="mlabels">
  545. <tr>
  546. <td class="mlabels-left">
  547. <table class="memname">
  548. <tr>
  549. <td class="memname">bool SdSpiCard::readCID </td>
  550. <td>(</td>
  551. <td class="paramtype">cid_t *&#160;</td>
  552. <td class="paramname"><em>cid</em></td><td>)</td>
  553. <td></td>
  554. </tr>
  555. </table>
  556. </td>
  557. <td class="mlabels-right">
  558. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  559. </tr>
  560. </table>
  561. </div><div class="memdoc">
  562. <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>
  563. <dl class="params"><dt>Parameters</dt><dd>
  564. <table class="params">
  565. <tr><td class="paramdir">[out]</td><td class="paramname">cid</td><td>pointer to area for returned data.</td></tr>
  566. </table>
  567. </dd>
  568. </dl>
  569. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  570. </div>
  571. </div>
  572. <a class="anchor" id="a9fbea9525e70f6e3602fe5153a5a1290"></a>
  573. <div class="memitem">
  574. <div class="memproto">
  575. <table class="mlabels">
  576. <tr>
  577. <td class="mlabels-left">
  578. <table class="memname">
  579. <tr>
  580. <td class="memname">bool SdSpiCard::readCSD </td>
  581. <td>(</td>
  582. <td class="paramtype">csd_t *&#160;</td>
  583. <td class="paramname"><em>csd</em></td><td>)</td>
  584. <td></td>
  585. </tr>
  586. </table>
  587. </td>
  588. <td class="mlabels-right">
  589. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  590. </tr>
  591. </table>
  592. </div><div class="memdoc">
  593. <p>Read a card's CSD register. The CSD contains Card-Specific Data that provides information regarding access to the card's contents.</p>
  594. <dl class="params"><dt>Parameters</dt><dd>
  595. <table class="params">
  596. <tr><td class="paramdir">[out]</td><td class="paramname">csd</td><td>pointer to area for returned data.</td></tr>
  597. </table>
  598. </dd>
  599. </dl>
  600. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  601. </div>
  602. </div>
  603. <a class="anchor" id="a3a1d1b4b4ceb42fcd41aaf6649482770"></a>
  604. <div class="memitem">
  605. <div class="memproto">
  606. <table class="mlabels">
  607. <tr>
  608. <td class="mlabels-left">
  609. <table class="memname">
  610. <tr>
  611. <td class="memname">bool SdSpiCard::readData </td>
  612. <td>(</td>
  613. <td class="paramtype">uint8_t *&#160;</td>
  614. <td class="paramname"><em>dst</em></td><td>)</td>
  615. <td></td>
  616. </tr>
  617. </table>
  618. </td>
  619. <td class="mlabels-right">
  620. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  621. </tr>
  622. </table>
  623. </div><div class="memdoc">
  624. <p>Read one data block in a multiple block read sequence</p>
  625. <dl class="params"><dt>Parameters</dt><dd>
  626. <table class="params">
  627. <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location for the data to be read.</td></tr>
  628. </table>
  629. </dd>
  630. </dl>
  631. <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>
  632. </div>
  633. </div>
  634. <a class="anchor" id="ab446e49338b3ce834a750ac6dae35f61"></a>
  635. <div class="memitem">
  636. <div class="memproto">
  637. <table class="mlabels">
  638. <tr>
  639. <td class="mlabels-left">
  640. <table class="memname">
  641. <tr>
  642. <td class="memname">bool SdSpiCard::readOCR </td>
  643. <td>(</td>
  644. <td class="paramtype">uint32_t *&#160;</td>
  645. <td class="paramname"><em>ocr</em></td><td>)</td>
  646. <td></td>
  647. </tr>
  648. </table>
  649. </td>
  650. <td class="mlabels-right">
  651. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  652. </tr>
  653. </table>
  654. </div><div class="memdoc">
  655. <p>Read OCR register.</p>
  656. <dl class="params"><dt>Parameters</dt><dd>
  657. <table class="params">
  658. <tr><td class="paramdir">[out]</td><td class="paramname">ocr</td><td>Value of OCR register. </td></tr>
  659. </table>
  660. </dd>
  661. </dl>
  662. <dl class="section return"><dt>Returns</dt><dd>true for success else false. </dd></dl>
  663. </div>
  664. </div>
  665. <a class="anchor" id="a3b1710d11496c32ba4323831e00ac6d1"></a>
  666. <div class="memitem">
  667. <div class="memproto">
  668. <table class="mlabels">
  669. <tr>
  670. <td class="mlabels-left">
  671. <table class="memname">
  672. <tr>
  673. <td class="memname">bool SdSpiCard::readStart </td>
  674. <td>(</td>
  675. <td class="paramtype">uint32_t&#160;</td>
  676. <td class="paramname"><em>blockNumber</em></td><td>)</td>
  677. <td></td>
  678. </tr>
  679. </table>
  680. </td>
  681. <td class="mlabels-right">
  682. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  683. </tr>
  684. </table>
  685. </div><div class="memdoc">
  686. <p>Start a read multiple blocks sequence.</p>
  687. <dl class="params"><dt>Parameters</dt><dd>
  688. <table class="params">
  689. <tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Address of first block in sequence.</td></tr>
  690. </table>
  691. </dd>
  692. </dl>
  693. <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>
  694. <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>
  695. </div>
  696. </div>
  697. <a class="anchor" id="a91d0413599efe0d63c8c2dfe4a12d9ae"></a>
  698. <div class="memitem">
  699. <div class="memproto">
  700. <table class="mlabels">
  701. <tr>
  702. <td class="mlabels-left">
  703. <table class="memname">
  704. <tr>
  705. <td class="memname">bool SdSpiCard::readStatus </td>
  706. <td>(</td>
  707. <td class="paramtype">uint8_t *&#160;</td>
  708. <td class="paramname"><em>status</em></td><td>)</td>
  709. <td></td>
  710. </tr>
  711. </table>
  712. </td>
  713. <td class="mlabels-right">
  714. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  715. </tr>
  716. </table>
  717. </div><div class="memdoc">
  718. <p>Return the 64 byte card status </p><dl class="params"><dt>Parameters</dt><dd>
  719. <table class="params">
  720. <tr><td class="paramdir">[out]</td><td class="paramname">status</td><td>location for 64 status bytes. </td></tr>
  721. </table>
  722. </dd>
  723. </dl>
  724. <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>
  725. </div>
  726. </div>
  727. <a class="anchor" id="afdac7c399fa1ba3f904cf503526e007e"></a>
  728. <div class="memitem">
  729. <div class="memproto">
  730. <table class="mlabels">
  731. <tr>
  732. <td class="mlabels-left">
  733. <table class="memname">
  734. <tr>
  735. <td class="memname">bool SdSpiCard::readStop </td>
  736. <td>(</td>
  737. <td class="paramname"></td><td>)</td>
  738. <td></td>
  739. </tr>
  740. </table>
  741. </td>
  742. <td class="mlabels-right">
  743. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  744. </tr>
  745. </table>
  746. </div><div class="memdoc">
  747. <p>End a read multiple blocks sequence.</p>
  748. <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>
  749. </div>
  750. </div>
  751. <a class="anchor" id="aa39feb6ebb269071ac6843a424ac311c"></a>
  752. <div class="memitem">
  753. <div class="memproto">
  754. <table class="mlabels">
  755. <tr>
  756. <td class="mlabels-left">
  757. <table class="memname">
  758. <tr>
  759. <td class="memname">void SdSpiCard::spiStart </td>
  760. <td>(</td>
  761. <td class="paramname"></td><td>)</td>
  762. <td></td>
  763. </tr>
  764. </table>
  765. </td>
  766. <td class="mlabels-right">
  767. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  768. </tr>
  769. </table>
  770. </div><div class="memdoc">
  771. <p>Set CS low and activate the card. </p>
  772. </div>
  773. </div>
  774. <a class="anchor" id="a1033a4a68d38f52dddf6a1764fcca3e1"></a>
  775. <div class="memitem">
  776. <div class="memproto">
  777. <table class="mlabels">
  778. <tr>
  779. <td class="mlabels-left">
  780. <table class="memname">
  781. <tr>
  782. <td class="memname">void SdSpiCard::spiStop </td>
  783. <td>(</td>
  784. <td class="paramname"></td><td>)</td>
  785. <td></td>
  786. </tr>
  787. </table>
  788. </td>
  789. <td class="mlabels-right">
  790. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  791. </tr>
  792. </table>
  793. </div><div class="memdoc">
  794. <p>Set CS high and deactivate the card. </p>
  795. </div>
  796. </div>
  797. <a class="anchor" id="a1b6d5f412c4ad75c2f575ca75c56c095"></a>
  798. <div class="memitem">
  799. <div class="memproto">
  800. <table class="mlabels">
  801. <tr>
  802. <td class="mlabels-left">
  803. <table class="memname">
  804. <tr>
  805. <td class="memname">bool SdSpiCard::syncBlocks </td>
  806. <td>(</td>
  807. <td class="paramname"></td><td>)</td>
  808. <td></td>
  809. </tr>
  810. </table>
  811. </td>
  812. <td class="mlabels-right">
  813. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  814. </tr>
  815. </table>
  816. </div><div class="memdoc">
  817. <dl class="section return"><dt>Returns</dt><dd>success if sync successful. Not for user apps. </dd></dl>
  818. </div>
  819. </div>
  820. <a class="anchor" id="a061d92bf154a1863a6321385b7505f6e"></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">int SdSpiCard::type </td>
  829. <td>(</td>
  830. <td class="paramname"></td><td>)</td>
  831. <td> const</td>
  832. </tr>
  833. </table>
  834. </td>
  835. <td class="mlabels-right">
  836. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  837. </tr>
  838. </table>
  839. </div><div class="memdoc">
  840. <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>
  841. </div>
  842. </div>
  843. <a class="anchor" id="a03a0bdb0f37a88076f24a2133cf5b4ed"></a>
  844. <div class="memitem">
  845. <div class="memproto">
  846. <table class="mlabels">
  847. <tr>
  848. <td class="mlabels-left">
  849. <table class="memname">
  850. <tr>
  851. <td class="memname">bool SdSpiCard::writeBlock </td>
  852. <td>(</td>
  853. <td class="paramtype">uint32_t&#160;</td>
  854. <td class="paramname"><em>lba</em>, </td>
  855. </tr>
  856. <tr>
  857. <td class="paramkey"></td>
  858. <td></td>
  859. <td class="paramtype">const uint8_t *&#160;</td>
  860. <td class="paramname"><em>src</em>&#160;</td>
  861. </tr>
  862. <tr>
  863. <td></td>
  864. <td>)</td>
  865. <td></td><td></td>
  866. </tr>
  867. </table>
  868. </td>
  869. <td class="mlabels-right">
  870. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  871. </tr>
  872. </table>
  873. </div><div class="memdoc">
  874. <p>Writes a 512 byte block to an SD card.</p>
  875. <dl class="params"><dt>Parameters</dt><dd>
  876. <table class="params">
  877. <tr><td class="paramdir">[in]</td><td class="paramname">lba</td><td>Logical block to be written. </td></tr>
  878. <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
  879. </table>
  880. </dd>
  881. </dl>
  882. <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>
  883. </div>
  884. </div>
  885. <a class="anchor" id="a181d96fe44891b7caabcd47dd29ac913"></a>
  886. <div class="memitem">
  887. <div class="memproto">
  888. <table class="mlabels">
  889. <tr>
  890. <td class="mlabels-left">
  891. <table class="memname">
  892. <tr>
  893. <td class="memname">bool SdSpiCard::writeBlocks </td>
  894. <td>(</td>
  895. <td class="paramtype">uint32_t&#160;</td>
  896. <td class="paramname"><em>lba</em>, </td>
  897. </tr>
  898. <tr>
  899. <td class="paramkey"></td>
  900. <td></td>
  901. <td class="paramtype">const uint8_t *&#160;</td>
  902. <td class="paramname"><em>src</em>, </td>
  903. </tr>
  904. <tr>
  905. <td class="paramkey"></td>
  906. <td></td>
  907. <td class="paramtype">size_t&#160;</td>
  908. <td class="paramname"><em>nb</em>&#160;</td>
  909. </tr>
  910. <tr>
  911. <td></td>
  912. <td>)</td>
  913. <td></td><td></td>
  914. </tr>
  915. </table>
  916. </td>
  917. <td class="mlabels-right">
  918. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  919. </tr>
  920. </table>
  921. </div><div class="memdoc">
  922. <p>Write multiple 512 byte blocks to an SD card.</p>
  923. <dl class="params"><dt>Parameters</dt><dd>
  924. <table class="params">
  925. <tr><td class="paramdir">[in]</td><td class="paramname">lba</td><td>Logical block to be written. </td></tr>
  926. <tr><td class="paramdir">[in]</td><td class="paramname">nb</td><td>Number of blocks to be written. </td></tr>
  927. <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
  928. </table>
  929. </dd>
  930. </dl>
  931. <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>
  932. </div>
  933. </div>
  934. <a class="anchor" id="a9495c0b148eb380358bb4a9721c0dffa"></a>
  935. <div class="memitem">
  936. <div class="memproto">
  937. <table class="mlabels">
  938. <tr>
  939. <td class="mlabels-left">
  940. <table class="memname">
  941. <tr>
  942. <td class="memname">bool SdSpiCard::writeData </td>
  943. <td>(</td>
  944. <td class="paramtype">const uint8_t *&#160;</td>
  945. <td class="paramname"><em>src</em></td><td>)</td>
  946. <td></td>
  947. </tr>
  948. </table>
  949. </td>
  950. <td class="mlabels-right">
  951. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  952. </tr>
  953. </table>
  954. </div><div class="memdoc">
  955. <p>Write one data block in a multiple block write sequence. </p><dl class="params"><dt>Parameters</dt><dd>
  956. <table class="params">
  957. <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
  958. </table>
  959. </dd>
  960. </dl>
  961. <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>
  962. </div>
  963. </div>
  964. <a class="anchor" id="a56d4750a5d2f693943eec985cb61ffe2"></a>
  965. <div class="memitem">
  966. <div class="memproto">
  967. <table class="mlabels">
  968. <tr>
  969. <td class="mlabels-left">
  970. <table class="memname">
  971. <tr>
  972. <td class="memname">bool SdSpiCard::writeStart </td>
  973. <td>(</td>
  974. <td class="paramtype">uint32_t&#160;</td>
  975. <td class="paramname"><em>blockNumber</em></td><td>)</td>
  976. <td></td>
  977. </tr>
  978. </table>
  979. </td>
  980. <td class="mlabels-right">
  981. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  982. </tr>
  983. </table>
  984. </div><div class="memdoc">
  985. <p>Start a write multiple blocks sequence.</p>
  986. <dl class="params"><dt>Parameters</dt><dd>
  987. <table class="params">
  988. <tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Address of first block in sequence.</td></tr>
  989. </table>
  990. </dd>
  991. </dl>
  992. <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>
  993. <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>
  994. </div>
  995. </div>
  996. <a class="anchor" id="a8bf0dc991308dcd2a7427bad89a9e2ba"></a>
  997. <div class="memitem">
  998. <div class="memproto">
  999. <table class="mlabels">
  1000. <tr>
  1001. <td class="mlabels-left">
  1002. <table class="memname">
  1003. <tr>
  1004. <td class="memname">bool SdSpiCard::writeStart </td>
  1005. <td>(</td>
  1006. <td class="paramtype">uint32_t&#160;</td>
  1007. <td class="paramname"><em>blockNumber</em>, </td>
  1008. </tr>
  1009. <tr>
  1010. <td class="paramkey"></td>
  1011. <td></td>
  1012. <td class="paramtype">uint32_t&#160;</td>
  1013. <td class="paramname"><em>eraseCount</em>&#160;</td>
  1014. </tr>
  1015. <tr>
  1016. <td></td>
  1017. <td>)</td>
  1018. <td></td><td></td>
  1019. </tr>
  1020. </table>
  1021. </td>
  1022. <td class="mlabels-right">
  1023. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  1024. </tr>
  1025. </table>
  1026. </div><div class="memdoc">
  1027. <p>Start a write multiple blocks sequence with pre-erase.</p>
  1028. <dl class="params"><dt>Parameters</dt><dd>
  1029. <table class="params">
  1030. <tr><td class="paramdir">[in]</td><td class="paramname">blockNumber</td><td>Address of first block in sequence. </td></tr>
  1031. <tr><td class="paramdir">[in]</td><td class="paramname">eraseCount</td><td>The number of blocks to be pre-erased.</td></tr>
  1032. </table>
  1033. </dd>
  1034. </dl>
  1035. <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>
  1036. <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>
  1037. </div>
  1038. </div>
  1039. <a class="anchor" id="aef9154785a4de5560fb807e4f9316fb0"></a>
  1040. <div class="memitem">
  1041. <div class="memproto">
  1042. <table class="mlabels">
  1043. <tr>
  1044. <td class="mlabels-left">
  1045. <table class="memname">
  1046. <tr>
  1047. <td class="memname">bool SdSpiCard::writeStop </td>
  1048. <td>(</td>
  1049. <td class="paramname"></td><td>)</td>
  1050. <td></td>
  1051. </tr>
  1052. </table>
  1053. </td>
  1054. <td class="mlabels-right">
  1055. <span class="mlabels"><span class="mlabel">inherited</span></span> </td>
  1056. </tr>
  1057. </table>
  1058. </div><div class="memdoc">
  1059. <p>End a write multiple blocks sequence.</p>
  1060. <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>
  1061. </div>
  1062. </div>
  1063. <hr/>The documentation for this class was generated from the following file:<ul>
  1064. <li>Arduino/libraries/SdFat/src/<a class="el" href="_sd_fat_8h.html">SdFat.h</a></li>
  1065. </ul>
  1066. </div><!-- contents -->
  1067. <!-- start footer part -->
  1068. <hr class="footer"/><address class="footer"><small>
  1069. Generated on Mon Sep 5 2016 10:18:52 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  1070. <img class="footer" src="doxygen.png" alt="doxygen"/>
  1071. </a> 1.8.10
  1072. </small></address>
  1073. </body>
  1074. </html>