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.

class_sd2_card.html 46KB

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