You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1070 lines
48KB

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