No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

class_sd_spi_base.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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: SdSpiBase 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-methods">Public Member Functions</a> &#124;
  85. <a href="class_sd_spi_base-members.html">List of all members</a> </div>
  86. <div class="headertitle">
  87. <div class="title">SdSpiBase Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  88. </div><!--header-->
  89. <div class="contents">
  90. <p>Virtual SPI class for access to SD and SDHC flash memory cards.
  91. <a href="class_sd_spi_base.html#details">More...</a></p>
  92. <p><code>#include &lt;SdSpi.h&gt;</code></p>
  93. <div class="dynheader">
  94. Inheritance diagram for SdSpiBase:</div>
  95. <div class="dyncontent">
  96. <div class="center"><img src="class_sd_spi_base__inherit__graph.png" border="0" usemap="#_sd_spi_base_inherit__map" alt="Inheritance graph"/></div>
  97. <map name="_sd_spi_base_inherit__map" id="_sd_spi_base_inherit__map">
  98. <area shape="rect" id="node2" href="class_sd_spi_soft.html" title="Software SPI class for access to SD and SDHC flash memory cards. " alt="" coords="5,80,148,121"/>
  99. </map>
  100. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  101. <table class="memberdecls">
  102. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  103. Public Member Functions</h2></td></tr>
  104. <tr class="memitem:a4a5455a0024e3e432430cd04953908d1"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base.html#a4a5455a0024e3e432430cd04953908d1">begin</a> (uint8_t chipSelectPin)=0</td></tr>
  105. <tr class="separator:a4a5455a0024e3e432430cd04953908d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:a31d53d87f8735b3c76876fb150a20378"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base.html#a31d53d87f8735b3c76876fb150a20378">beginTransaction</a> (uint8_t divisor)</td></tr>
  107. <tr class="separator:a31d53d87f8735b3c76876fb150a20378"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <tr class="memitem:aceef8d93a30e4fccb4fd81d4e3c26b55"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base.html#aceef8d93a30e4fccb4fd81d4e3c26b55">endTransaction</a> ()</td></tr>
  109. <tr class="separator:aceef8d93a30e4fccb4fd81d4e3c26b55"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. <tr class="memitem:a3488ab01ed4412f2c7143cfd10a7503c"><td class="memItemLeft" align="right" valign="top">virtual uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base.html#a3488ab01ed4412f2c7143cfd10a7503c">receive</a> ()=0</td></tr>
  111. <tr class="separator:a3488ab01ed4412f2c7143cfd10a7503c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. <tr class="memitem:af5810e79d39a9f6de6435f92401531be"><td class="memItemLeft" align="right" valign="top">virtual uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base.html#af5810e79d39a9f6de6435f92401531be">receive</a> (uint8_t *buf, size_t n)=0</td></tr>
  113. <tr class="separator:af5810e79d39a9f6de6435f92401531be"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <tr class="memitem:a1f43194a47cb5403e82af651a370be00"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base.html#a1f43194a47cb5403e82af651a370be00">send</a> (uint8_t data)=0</td></tr>
  115. <tr class="separator:a1f43194a47cb5403e82af651a370be00"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:a109f2f4213e7a763fb4e4dd3ec605c3b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base.html#a109f2f4213e7a763fb4e4dd3ec605c3b">send</a> (const uint8_t *buf, size_t n)=0</td></tr>
  117. <tr class="separator:a109f2f4213e7a763fb4e4dd3ec605c3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. </table>
  119. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  120. <div class="textblock"><p>Virtual SPI class for access to SD and SDHC flash memory cards. </p>
  121. </div><h2 class="groupheader">Member Function Documentation</h2>
  122. <a class="anchor" id="a4a5455a0024e3e432430cd04953908d1"></a>
  123. <div class="memitem">
  124. <div class="memproto">
  125. <table class="mlabels">
  126. <tr>
  127. <td class="mlabels-left">
  128. <table class="memname">
  129. <tr>
  130. <td class="memname">virtual void SdSpiBase::begin </td>
  131. <td>(</td>
  132. <td class="paramtype">uint8_t&#160;</td>
  133. <td class="paramname"><em>chipSelectPin</em></td><td>)</td>
  134. <td></td>
  135. </tr>
  136. </table>
  137. </td>
  138. <td class="mlabels-right">
  139. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  140. </tr>
  141. </table>
  142. </div><div class="memdoc">
  143. <p>Initialize the SPI bus.</p>
  144. <dl class="params"><dt>Parameters</dt><dd>
  145. <table class="params">
  146. <tr><td class="paramdir">[in]</td><td class="paramname">chipSelectPin</td><td>SD card chip select pin. </td></tr>
  147. </table>
  148. </dd>
  149. </dl>
  150. <p>Implemented in <a class="el" href="class_sd_spi_soft.html#a957355dae46e184bf7c12cd8306ac2fd">SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt;</a>.</p>
  151. </div>
  152. </div>
  153. <a class="anchor" id="a31d53d87f8735b3c76876fb150a20378"></a>
  154. <div class="memitem">
  155. <div class="memproto">
  156. <table class="mlabels">
  157. <tr>
  158. <td class="mlabels-left">
  159. <table class="memname">
  160. <tr>
  161. <td class="memname">virtual void SdSpiBase::beginTransaction </td>
  162. <td>(</td>
  163. <td class="paramtype">uint8_t&#160;</td>
  164. <td class="paramname"><em>divisor</em></td><td>)</td>
  165. <td></td>
  166. </tr>
  167. </table>
  168. </td>
  169. <td class="mlabels-right">
  170. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  171. </tr>
  172. </table>
  173. </div><div class="memdoc">
  174. <p>Set SPI options for access to SD/SDHC cards.</p>
  175. <dl class="params"><dt>Parameters</dt><dd>
  176. <table class="params">
  177. <tr><td class="paramdir">[in]</td><td class="paramname">divisor</td><td>SCK clock divider relative to the system clock. </td></tr>
  178. </table>
  179. </dd>
  180. </dl>
  181. <p>Reimplemented in <a class="el" href="class_sd_spi_soft.html#afe6909bd40f444c4680da3140b81de36">SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt;</a>.</p>
  182. </div>
  183. </div>
  184. <a class="anchor" id="aceef8d93a30e4fccb4fd81d4e3c26b55"></a>
  185. <div class="memitem">
  186. <div class="memproto">
  187. <table class="mlabels">
  188. <tr>
  189. <td class="mlabels-left">
  190. <table class="memname">
  191. <tr>
  192. <td class="memname">virtual void SdSpiBase::endTransaction </td>
  193. <td>(</td>
  194. <td class="paramname"></td><td>)</td>
  195. <td></td>
  196. </tr>
  197. </table>
  198. </td>
  199. <td class="mlabels-right">
  200. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  201. </tr>
  202. </table>
  203. </div><div class="memdoc">
  204. <p>End SPI transaction. </p>
  205. <p>Reimplemented in <a class="el" href="class_sd_spi_soft.html#a9efd9900dfc03582e433ff8939e96dff">SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt;</a>.</p>
  206. </div>
  207. </div>
  208. <a class="anchor" id="a3488ab01ed4412f2c7143cfd10a7503c"></a>
  209. <div class="memitem">
  210. <div class="memproto">
  211. <table class="mlabels">
  212. <tr>
  213. <td class="mlabels-left">
  214. <table class="memname">
  215. <tr>
  216. <td class="memname">virtual uint8_t SdSpiBase::receive </td>
  217. <td>(</td>
  218. <td class="paramname"></td><td>)</td>
  219. <td></td>
  220. </tr>
  221. </table>
  222. </td>
  223. <td class="mlabels-right">
  224. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  225. </tr>
  226. </table>
  227. </div><div class="memdoc">
  228. <p>Receive a byte.</p>
  229. <dl class="section return"><dt>Returns</dt><dd>The byte. </dd></dl>
  230. <p>Implemented in <a class="el" href="class_sd_spi_soft.html#a8a004fe608a81458a1aa3a6716a80d74">SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt;</a>.</p>
  231. </div>
  232. </div>
  233. <a class="anchor" id="af5810e79d39a9f6de6435f92401531be"></a>
  234. <div class="memitem">
  235. <div class="memproto">
  236. <table class="mlabels">
  237. <tr>
  238. <td class="mlabels-left">
  239. <table class="memname">
  240. <tr>
  241. <td class="memname">virtual uint8_t SdSpiBase::receive </td>
  242. <td>(</td>
  243. <td class="paramtype">uint8_t *&#160;</td>
  244. <td class="paramname"><em>buf</em>, </td>
  245. </tr>
  246. <tr>
  247. <td class="paramkey"></td>
  248. <td></td>
  249. <td class="paramtype">size_t&#160;</td>
  250. <td class="paramname"><em>n</em>&#160;</td>
  251. </tr>
  252. <tr>
  253. <td></td>
  254. <td>)</td>
  255. <td></td><td></td>
  256. </tr>
  257. </table>
  258. </td>
  259. <td class="mlabels-right">
  260. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  261. </tr>
  262. </table>
  263. </div><div class="memdoc">
  264. <p>Receive multiple bytes.</p>
  265. <dl class="params"><dt>Parameters</dt><dd>
  266. <table class="params">
  267. <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Buffer to receive the data. </td></tr>
  268. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to receive.</td></tr>
  269. </table>
  270. </dd>
  271. </dl>
  272. <dl class="section return"><dt>Returns</dt><dd>Zero for no error or nonzero error code. </dd></dl>
  273. <p>Implemented in <a class="el" href="class_sd_spi_soft.html#a256f21aeaff4f15a7a5402cccbcc32f1">SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt;</a>.</p>
  274. </div>
  275. </div>
  276. <a class="anchor" id="a1f43194a47cb5403e82af651a370be00"></a>
  277. <div class="memitem">
  278. <div class="memproto">
  279. <table class="mlabels">
  280. <tr>
  281. <td class="mlabels-left">
  282. <table class="memname">
  283. <tr>
  284. <td class="memname">virtual void SdSpiBase::send </td>
  285. <td>(</td>
  286. <td class="paramtype">uint8_t&#160;</td>
  287. <td class="paramname"><em>data</em></td><td>)</td>
  288. <td></td>
  289. </tr>
  290. </table>
  291. </td>
  292. <td class="mlabels-right">
  293. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  294. </tr>
  295. </table>
  296. </div><div class="memdoc">
  297. <p>Send a byte.</p>
  298. <dl class="params"><dt>Parameters</dt><dd>
  299. <table class="params">
  300. <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Byte to send </td></tr>
  301. </table>
  302. </dd>
  303. </dl>
  304. <p>Implemented in <a class="el" href="class_sd_spi_soft.html#a96224c2c89d9b6118a2979252d682c2a">SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt;</a>.</p>
  305. </div>
  306. </div>
  307. <a class="anchor" id="a109f2f4213e7a763fb4e4dd3ec605c3b"></a>
  308. <div class="memitem">
  309. <div class="memproto">
  310. <table class="mlabels">
  311. <tr>
  312. <td class="mlabels-left">
  313. <table class="memname">
  314. <tr>
  315. <td class="memname">virtual void SdSpiBase::send </td>
  316. <td>(</td>
  317. <td class="paramtype">const uint8_t *&#160;</td>
  318. <td class="paramname"><em>buf</em>, </td>
  319. </tr>
  320. <tr>
  321. <td class="paramkey"></td>
  322. <td></td>
  323. <td class="paramtype">size_t&#160;</td>
  324. <td class="paramname"><em>n</em>&#160;</td>
  325. </tr>
  326. <tr>
  327. <td></td>
  328. <td>)</td>
  329. <td></td><td></td>
  330. </tr>
  331. </table>
  332. </td>
  333. <td class="mlabels-right">
  334. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  335. </tr>
  336. </table>
  337. </div><div class="memdoc">
  338. <p>Send multiple bytes.</p>
  339. <dl class="params"><dt>Parameters</dt><dd>
  340. <table class="params">
  341. <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Buffer for data to be sent. </td></tr>
  342. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to send. </td></tr>
  343. </table>
  344. </dd>
  345. </dl>
  346. <p>Implemented in <a class="el" href="class_sd_spi_soft.html#a7f4cada25994f77cb8ed51f71465e334">SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt;</a>.</p>
  347. </div>
  348. </div>
  349. <hr/>The documentation for this class was generated from the following file:<ul>
  350. <li>Arduino/libraries/SdFat/src/SdSpiCard/<a class="el" href="_sd_spi_8h.html">SdSpi.h</a></li>
  351. </ul>
  352. </div><!-- contents -->
  353. <!-- start footer part -->
  354. <hr class="footer"/><address class="footer"><small>
  355. Generated on Fri Feb 12 2016 13:43:49 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  356. <img class="footer" src="doxygen.png" alt="doxygen"/>
  357. </a> 1.8.10
  358. </small></address>
  359. </body>
  360. </html>