選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

1097 行
46KB

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