Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

921 lines
41KB

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