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.

396 line
16KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.16"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>SdFat: SdSpiBaseClass Class Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">SdFat
  25. </div>
  26. </td>
  27. </tr>
  28. </tbody>
  29. </table>
  30. </div>
  31. <!-- end header part -->
  32. <!-- Generated by Doxygen 1.8.16 -->
  33. <script type="text/javascript">
  34. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. /* @license-end */
  37. </script>
  38. <script type="text/javascript" src="menudata.js"></script>
  39. <script type="text/javascript" src="menu.js"></script>
  40. <script type="text/javascript">
  41. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  42. $(function() {
  43. initMenu('',true,false,'search.php','Search');
  44. $(document).ready(function() { init_search(); });
  45. });
  46. /* @license-end */</script>
  47. <div id="main-nav"></div>
  48. <!-- window showing the filter options -->
  49. <div id="MSearchSelectWindow"
  50. onmouseover="return searchBox.OnSearchSelectShow()"
  51. onmouseout="return searchBox.OnSearchSelectHide()"
  52. onkeydown="return searchBox.OnSearchSelectKey(event)">
  53. </div>
  54. <!-- iframe showing the search results (closed by default) -->
  55. <div id="MSearchResultsWindow">
  56. <iframe src="javascript:void(0)" frameborder="0"
  57. name="MSearchResults" id="MSearchResults">
  58. </iframe>
  59. </div>
  60. </div><!-- top -->
  61. <div class="header">
  62. <div class="summary">
  63. <a href="#pub-methods">Public Member Functions</a> &#124;
  64. <a href="class_sd_spi_base_class-members.html">List of all members</a> </div>
  65. <div class="headertitle">
  66. <div class="title">SdSpiBaseClass Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  67. </div><!--header-->
  68. <div class="contents">
  69. <p>Base class for external SPI drivers.
  70. <a href="class_sd_spi_base_class.html#details">More...</a></p>
  71. <p><code>#include &lt;SdSpiBaseClass.h&gt;</code></p>
  72. <div class="dynheader">
  73. Inheritance diagram for SdSpiBaseClass:</div>
  74. <div class="dyncontent">
  75. <div class="center"><img src="class_sd_spi_base_class__inherit__graph.png" border="0" usemap="#_sd_spi_base_class_inherit__map" alt="Inheritance graph"/></div>
  76. <map name="_sd_spi_base_class_inherit__map" id="_sd_spi_base_class_inherit__map">
  77. <area shape="rect" title="Base class for external SPI drivers." alt="" coords="5,5,125,32"/>
  78. <area shape="rect" href="class_my_spi_class.html" title="Sample external SPI class." alt="" coords="19,80,111,107"/>
  79. </map>
  80. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  81. <table class="memberdecls">
  82. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  83. Public Member Functions</h2></td></tr>
  84. <tr class="memitem:ace7d46253efcaaab8b6be50cc17233e4"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base_class.html#ace7d46253efcaaab8b6be50cc17233e4">activate</a> ()</td></tr>
  85. <tr class="separator:ace7d46253efcaaab8b6be50cc17233e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. <tr class="memitem:ae186fa647e8e332a9e87d765f92047a5"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base_class.html#ae186fa647e8e332a9e87d765f92047a5">begin</a> ()=0</td></tr>
  87. <tr class="separator:ae186fa647e8e332a9e87d765f92047a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  88. <tr class="memitem:ae3a5ede781e390263382fcf7765d665d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base_class.html#ae3a5ede781e390263382fcf7765d665d">deactivate</a> ()</td></tr>
  89. <tr class="separator:ae3a5ede781e390263382fcf7765d665d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:a537c71fb2cdb8a825215c0faeb6f7dbd"><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_class.html#a537c71fb2cdb8a825215c0faeb6f7dbd">receive</a> ()=0</td></tr>
  91. <tr class="separator:a537c71fb2cdb8a825215c0faeb6f7dbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  92. <tr class="memitem:a45693c18a8bb44ec9e5b9b1dee39b393"><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_class.html#a45693c18a8bb44ec9e5b9b1dee39b393">receive</a> (uint8_t *buf, size_t count)=0</td></tr>
  93. <tr class="separator:a45693c18a8bb44ec9e5b9b1dee39b393"><td class="memSeparator" colspan="2">&#160;</td></tr>
  94. <tr class="memitem:a51923b03f35af4bac7c3bb7c8d13303d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base_class.html#a51923b03f35af4bac7c3bb7c8d13303d">send</a> (const uint8_t *buf, size_t count)=0</td></tr>
  95. <tr class="separator:a51923b03f35af4bac7c3bb7c8d13303d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. <tr class="memitem:a28001200e3d464f5c6e910837924c577"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base_class.html#a28001200e3d464f5c6e910837924c577">send</a> (uint8_t data)=0</td></tr>
  97. <tr class="separator:a28001200e3d464f5c6e910837924c577"><td class="memSeparator" colspan="2">&#160;</td></tr>
  98. <tr class="memitem:a937215f1dc238285bd140c11ab82bbc9"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_base_class.html#a937215f1dc238285bd140c11ab82bbc9">setSckSpeed</a> (uint32_t maxSck)</td></tr>
  99. <tr class="separator:a937215f1dc238285bd140c11ab82bbc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  100. </table>
  101. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  102. <div class="textblock"><p>Base class for external SPI drivers. </p>
  103. </div><h2 class="groupheader">Member Function Documentation</h2>
  104. <a id="ace7d46253efcaaab8b6be50cc17233e4"></a>
  105. <h2 class="memtitle"><span class="permalink"><a href="#ace7d46253efcaaab8b6be50cc17233e4">&#9670;&nbsp;</a></span>activate()</h2>
  106. <div class="memitem">
  107. <div class="memproto">
  108. <table class="mlabels">
  109. <tr>
  110. <td class="mlabels-left">
  111. <table class="memname">
  112. <tr>
  113. <td class="memname">virtual void SdSpiBaseClass::activate </td>
  114. <td>(</td>
  115. <td class="paramname"></td><td>)</td>
  116. <td></td>
  117. </tr>
  118. </table>
  119. </td>
  120. <td class="mlabels-right">
  121. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  122. </tr>
  123. </table>
  124. </div><div class="memdoc">
  125. <p>Activate SPI hardware. </p>
  126. <p>Reimplemented in <a class="el" href="class_my_spi_class.html#a906649904dde5b504bdc12d5b125cdce">MySpiClass</a>.</p>
  127. </div>
  128. </div>
  129. <a id="ae186fa647e8e332a9e87d765f92047a5"></a>
  130. <h2 class="memtitle"><span class="permalink"><a href="#ae186fa647e8e332a9e87d765f92047a5">&#9670;&nbsp;</a></span>begin()</h2>
  131. <div class="memitem">
  132. <div class="memproto">
  133. <table class="mlabels">
  134. <tr>
  135. <td class="mlabels-left">
  136. <table class="memname">
  137. <tr>
  138. <td class="memname">virtual void SdSpiBaseClass::begin </td>
  139. <td>(</td>
  140. <td class="paramname"></td><td>)</td>
  141. <td></td>
  142. </tr>
  143. </table>
  144. </td>
  145. <td class="mlabels-right">
  146. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  147. </tr>
  148. </table>
  149. </div><div class="memdoc">
  150. <p>Initialize the SPI bus. </p>
  151. <p>Implemented in <a class="el" href="class_my_spi_class.html#a62201e250cb0a71d71c9bd00bfaabe4d">MySpiClass</a>.</p>
  152. </div>
  153. </div>
  154. <a id="ae3a5ede781e390263382fcf7765d665d"></a>
  155. <h2 class="memtitle"><span class="permalink"><a href="#ae3a5ede781e390263382fcf7765d665d">&#9670;&nbsp;</a></span>deactivate()</h2>
  156. <div class="memitem">
  157. <div class="memproto">
  158. <table class="mlabels">
  159. <tr>
  160. <td class="mlabels-left">
  161. <table class="memname">
  162. <tr>
  163. <td class="memname">virtual void SdSpiBaseClass::deactivate </td>
  164. <td>(</td>
  165. <td class="paramname"></td><td>)</td>
  166. <td></td>
  167. </tr>
  168. </table>
  169. </td>
  170. <td class="mlabels-right">
  171. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  172. </tr>
  173. </table>
  174. </div><div class="memdoc">
  175. <p>Deactivate SPI hardware. </p>
  176. <p>Reimplemented in <a class="el" href="class_my_spi_class.html#a35e19b66e25678ba3928e047270e45c4">MySpiClass</a>.</p>
  177. </div>
  178. </div>
  179. <a id="a537c71fb2cdb8a825215c0faeb6f7dbd"></a>
  180. <h2 class="memtitle"><span class="permalink"><a href="#a537c71fb2cdb8a825215c0faeb6f7dbd">&#9670;&nbsp;</a></span>receive() <span class="overload">[1/2]</span></h2>
  181. <div class="memitem">
  182. <div class="memproto">
  183. <table class="mlabels">
  184. <tr>
  185. <td class="mlabels-left">
  186. <table class="memname">
  187. <tr>
  188. <td class="memname">virtual uint8_t SdSpiBaseClass::receive </td>
  189. <td>(</td>
  190. <td class="paramname"></td><td>)</td>
  191. <td></td>
  192. </tr>
  193. </table>
  194. </td>
  195. <td class="mlabels-right">
  196. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  197. </tr>
  198. </table>
  199. </div><div class="memdoc">
  200. <p>Receive a byte.</p>
  201. <dl class="section return"><dt>Returns</dt><dd>The byte. </dd></dl>
  202. <p>Implemented in <a class="el" href="class_my_spi_class.html#ab7a11bf55dba84c8437e29940ee72276">MySpiClass</a>.</p>
  203. </div>
  204. </div>
  205. <a id="a45693c18a8bb44ec9e5b9b1dee39b393"></a>
  206. <h2 class="memtitle"><span class="permalink"><a href="#a45693c18a8bb44ec9e5b9b1dee39b393">&#9670;&nbsp;</a></span>receive() <span class="overload">[2/2]</span></h2>
  207. <div class="memitem">
  208. <div class="memproto">
  209. <table class="mlabels">
  210. <tr>
  211. <td class="mlabels-left">
  212. <table class="memname">
  213. <tr>
  214. <td class="memname">virtual uint8_t SdSpiBaseClass::receive </td>
  215. <td>(</td>
  216. <td class="paramtype">uint8_t *&#160;</td>
  217. <td class="paramname"><em>buf</em>, </td>
  218. </tr>
  219. <tr>
  220. <td class="paramkey"></td>
  221. <td></td>
  222. <td class="paramtype">size_t&#160;</td>
  223. <td class="paramname"><em>count</em>&#160;</td>
  224. </tr>
  225. <tr>
  226. <td></td>
  227. <td>)</td>
  228. <td></td><td></td>
  229. </tr>
  230. </table>
  231. </td>
  232. <td class="mlabels-right">
  233. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  234. </tr>
  235. </table>
  236. </div><div class="memdoc">
  237. <p>Receive multiple bytes.</p>
  238. <dl class="params"><dt>Parameters</dt><dd>
  239. <table class="params">
  240. <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Buffer to receive the data. </td></tr>
  241. <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Number of bytes to receive.</td></tr>
  242. </table>
  243. </dd>
  244. </dl>
  245. <dl class="section return"><dt>Returns</dt><dd>Zero for no error or nonzero error code. </dd></dl>
  246. <p>Implemented in <a class="el" href="class_my_spi_class.html#a14913993cfaf4a48805cdddbdf883e4f">MySpiClass</a>.</p>
  247. </div>
  248. </div>
  249. <a id="a51923b03f35af4bac7c3bb7c8d13303d"></a>
  250. <h2 class="memtitle"><span class="permalink"><a href="#a51923b03f35af4bac7c3bb7c8d13303d">&#9670;&nbsp;</a></span>send() <span class="overload">[1/2]</span></h2>
  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">virtual void SdSpiBaseClass::send </td>
  259. <td>(</td>
  260. <td class="paramtype">const uint8_t *&#160;</td>
  261. <td class="paramname"><em>buf</em>, </td>
  262. </tr>
  263. <tr>
  264. <td class="paramkey"></td>
  265. <td></td>
  266. <td class="paramtype">size_t&#160;</td>
  267. <td class="paramname"><em>count</em>&#160;</td>
  268. </tr>
  269. <tr>
  270. <td></td>
  271. <td>)</td>
  272. <td></td><td></td>
  273. </tr>
  274. </table>
  275. </td>
  276. <td class="mlabels-right">
  277. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  278. </tr>
  279. </table>
  280. </div><div class="memdoc">
  281. <p>Send multiple bytes.</p>
  282. <dl class="params"><dt>Parameters</dt><dd>
  283. <table class="params">
  284. <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Buffer for data to be sent. </td></tr>
  285. <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Number of bytes to send. </td></tr>
  286. </table>
  287. </dd>
  288. </dl>
  289. <p>Implemented in <a class="el" href="class_my_spi_class.html#a27a8048d69b6715afdbe8c58d8a08bb6">MySpiClass</a>.</p>
  290. </div>
  291. </div>
  292. <a id="a28001200e3d464f5c6e910837924c577"></a>
  293. <h2 class="memtitle"><span class="permalink"><a href="#a28001200e3d464f5c6e910837924c577">&#9670;&nbsp;</a></span>send() <span class="overload">[2/2]</span></h2>
  294. <div class="memitem">
  295. <div class="memproto">
  296. <table class="mlabels">
  297. <tr>
  298. <td class="mlabels-left">
  299. <table class="memname">
  300. <tr>
  301. <td class="memname">virtual void SdSpiBaseClass::send </td>
  302. <td>(</td>
  303. <td class="paramtype">uint8_t&#160;</td>
  304. <td class="paramname"><em>data</em></td><td>)</td>
  305. <td></td>
  306. </tr>
  307. </table>
  308. </td>
  309. <td class="mlabels-right">
  310. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  311. </tr>
  312. </table>
  313. </div><div class="memdoc">
  314. <p>Send a byte.</p>
  315. <dl class="params"><dt>Parameters</dt><dd>
  316. <table class="params">
  317. <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Byte to send </td></tr>
  318. </table>
  319. </dd>
  320. </dl>
  321. <p>Implemented in <a class="el" href="class_my_spi_class.html#a7f7369452d8a82f0dc24be00bba9c962">MySpiClass</a>.</p>
  322. </div>
  323. </div>
  324. <a id="a937215f1dc238285bd140c11ab82bbc9"></a>
  325. <h2 class="memtitle"><span class="permalink"><a href="#a937215f1dc238285bd140c11ab82bbc9">&#9670;&nbsp;</a></span>setSckSpeed()</h2>
  326. <div class="memitem">
  327. <div class="memproto">
  328. <table class="mlabels">
  329. <tr>
  330. <td class="mlabels-left">
  331. <table class="memname">
  332. <tr>
  333. <td class="memname">virtual void SdSpiBaseClass::setSckSpeed </td>
  334. <td>(</td>
  335. <td class="paramtype">uint32_t&#160;</td>
  336. <td class="paramname"><em>maxSck</em></td><td>)</td>
  337. <td></td>
  338. </tr>
  339. </table>
  340. </td>
  341. <td class="mlabels-right">
  342. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  343. </tr>
  344. </table>
  345. </div><div class="memdoc">
  346. <p>Save high speed SPISettings after SD initialization.</p>
  347. <dl class="params"><dt>Parameters</dt><dd>
  348. <table class="params">
  349. <tr><td class="paramdir">[in]</td><td class="paramname">maxSck</td><td>Maximum SCK frequency. </td></tr>
  350. </table>
  351. </dd>
  352. </dl>
  353. <p>Reimplemented in <a class="el" href="class_my_spi_class.html#a82e307da53a6d5d1003426c1ac30a915">MySpiClass</a>.</p>
  354. </div>
  355. </div>
  356. <hr/>The documentation for this class was generated from the following file:<ul>
  357. <li>ArduinoSdFat/libraries/SdFat/src/SpiDriver/<a class="el" href="_sd_spi_base_class_8h.html">SdSpiBaseClass.h</a></li>
  358. </ul>
  359. </div><!-- contents -->
  360. <!-- start footer part -->
  361. <hr class="footer"/><address class="footer"><small>
  362. Generated on Fri Dec 6 2019 09:45:12 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  363. <img class="footer" src="doxygen.png" alt="doxygen"/>
  364. </a> 1.8.16
  365. </small></address>
  366. </body>
  367. </html>