Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

1063 lines
45KB

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