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.

405 lines
17KB

  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: MySpiClass 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_my_spi_class-members.html">List of all members</a> </div>
  65. <div class="headertitle">
  66. <div class="title">MySpiClass Class Reference</div> </div>
  67. </div><!--header-->
  68. <div class="contents">
  69. <p>Sample external SPI class.
  70. <a href="class_my_spi_class.html#details">More...</a></p>
  71. <p><code>#include &lt;SdSpiBaseClass.h&gt;</code></p>
  72. <div class="dynheader">
  73. Inheritance diagram for MySpiClass:</div>
  74. <div class="dyncontent">
  75. <div class="center"><img src="class_my_spi_class__inherit__graph.png" border="0" usemap="#_my_spi_class_inherit__map" alt="Inheritance graph"/></div>
  76. <map name="_my_spi_class_inherit__map" id="_my_spi_class_inherit__map">
  77. <area shape="rect" title="Sample external SPI class." alt="" coords="19,80,111,107"/>
  78. <area shape="rect" href="class_sd_spi_base_class.html" title="Base class for external SPI drivers." alt="" coords="5,5,125,32"/>
  79. </map>
  80. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  81. <div class="dynheader">
  82. Collaboration diagram for MySpiClass:</div>
  83. <div class="dyncontent">
  84. <div class="center"><img src="class_my_spi_class__coll__graph.png" border="0" usemap="#_my_spi_class_coll__map" alt="Collaboration graph"/></div>
  85. <map name="_my_spi_class_coll__map" id="_my_spi_class_coll__map">
  86. <area shape="rect" title="Sample external SPI class." alt="" coords="19,80,111,107"/>
  87. <area shape="rect" href="class_sd_spi_base_class.html" title="Base class for external SPI drivers." alt="" coords="5,5,125,32"/>
  88. </map>
  89. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  90. <table class="memberdecls">
  91. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  92. Public Member Functions</h2></td></tr>
  93. <tr class="memitem:a906649904dde5b504bdc12d5b125cdce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_my_spi_class.html#a906649904dde5b504bdc12d5b125cdce">activate</a> ()</td></tr>
  94. <tr class="separator:a906649904dde5b504bdc12d5b125cdce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. <tr class="memitem:a62201e250cb0a71d71c9bd00bfaabe4d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_my_spi_class.html#a62201e250cb0a71d71c9bd00bfaabe4d">begin</a> ()</td></tr>
  96. <tr class="separator:a62201e250cb0a71d71c9bd00bfaabe4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <tr class="memitem:a35e19b66e25678ba3928e047270e45c4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_my_spi_class.html#a35e19b66e25678ba3928e047270e45c4">deactivate</a> ()</td></tr>
  98. <tr class="separator:a35e19b66e25678ba3928e047270e45c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:ab7a11bf55dba84c8437e29940ee72276"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_my_spi_class.html#ab7a11bf55dba84c8437e29940ee72276">receive</a> ()</td></tr>
  100. <tr class="separator:ab7a11bf55dba84c8437e29940ee72276"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:a14913993cfaf4a48805cdddbdf883e4f"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_my_spi_class.html#a14913993cfaf4a48805cdddbdf883e4f">receive</a> (uint8_t *buf, size_t count)</td></tr>
  102. <tr class="separator:a14913993cfaf4a48805cdddbdf883e4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. <tr class="memitem:a27a8048d69b6715afdbe8c58d8a08bb6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_my_spi_class.html#a27a8048d69b6715afdbe8c58d8a08bb6">send</a> (const uint8_t *buf, size_t count)</td></tr>
  104. <tr class="separator:a27a8048d69b6715afdbe8c58d8a08bb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:a7f7369452d8a82f0dc24be00bba9c962"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_my_spi_class.html#a7f7369452d8a82f0dc24be00bba9c962">send</a> (uint8_t data)</td></tr>
  106. <tr class="separator:a7f7369452d8a82f0dc24be00bba9c962"><td class="memSeparator" colspan="2">&#160;</td></tr>
  107. <tr class="memitem:a82e307da53a6d5d1003426c1ac30a915"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_my_spi_class.html#a82e307da53a6d5d1003426c1ac30a915">setSckSpeed</a> (uint32_t maxSck)</td></tr>
  108. <tr class="separator:a82e307da53a6d5d1003426c1ac30a915"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. </table>
  110. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  111. <div class="textblock"><p>Sample external SPI class. </p>
  112. </div><h2 class="groupheader">Member Function Documentation</h2>
  113. <a id="a906649904dde5b504bdc12d5b125cdce"></a>
  114. <h2 class="memtitle"><span class="permalink"><a href="#a906649904dde5b504bdc12d5b125cdce">&#9670;&nbsp;</a></span>activate()</h2>
  115. <div class="memitem">
  116. <div class="memproto">
  117. <table class="mlabels">
  118. <tr>
  119. <td class="mlabels-left">
  120. <table class="memname">
  121. <tr>
  122. <td class="memname">void MySpiClass::activate </td>
  123. <td>(</td>
  124. <td class="paramname"></td><td>)</td>
  125. <td></td>
  126. </tr>
  127. </table>
  128. </td>
  129. <td class="mlabels-right">
  130. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  131. </tr>
  132. </table>
  133. </div><div class="memdoc">
  134. <p>Activate SPI hardware. </p>
  135. <p>Reimplemented from <a class="el" href="class_sd_spi_base_class.html#ace7d46253efcaaab8b6be50cc17233e4">SdSpiBaseClass</a>.</p>
  136. </div>
  137. </div>
  138. <a id="a62201e250cb0a71d71c9bd00bfaabe4d"></a>
  139. <h2 class="memtitle"><span class="permalink"><a href="#a62201e250cb0a71d71c9bd00bfaabe4d">&#9670;&nbsp;</a></span>begin()</h2>
  140. <div class="memitem">
  141. <div class="memproto">
  142. <table class="mlabels">
  143. <tr>
  144. <td class="mlabels-left">
  145. <table class="memname">
  146. <tr>
  147. <td class="memname">void MySpiClass::begin </td>
  148. <td>(</td>
  149. <td class="paramname"></td><td>)</td>
  150. <td></td>
  151. </tr>
  152. </table>
  153. </td>
  154. <td class="mlabels-right">
  155. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  156. </tr>
  157. </table>
  158. </div><div class="memdoc">
  159. <p>Initialize the SPI bus. </p>
  160. <p>Implements <a class="el" href="class_sd_spi_base_class.html#ae186fa647e8e332a9e87d765f92047a5">SdSpiBaseClass</a>.</p>
  161. </div>
  162. </div>
  163. <a id="a35e19b66e25678ba3928e047270e45c4"></a>
  164. <h2 class="memtitle"><span class="permalink"><a href="#a35e19b66e25678ba3928e047270e45c4">&#9670;&nbsp;</a></span>deactivate()</h2>
  165. <div class="memitem">
  166. <div class="memproto">
  167. <table class="mlabels">
  168. <tr>
  169. <td class="mlabels-left">
  170. <table class="memname">
  171. <tr>
  172. <td class="memname">void MySpiClass::deactivate </td>
  173. <td>(</td>
  174. <td class="paramname"></td><td>)</td>
  175. <td></td>
  176. </tr>
  177. </table>
  178. </td>
  179. <td class="mlabels-right">
  180. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  181. </tr>
  182. </table>
  183. </div><div class="memdoc">
  184. <p>Deactivate SPI hardware. </p>
  185. <p>Reimplemented from <a class="el" href="class_sd_spi_base_class.html#ae3a5ede781e390263382fcf7765d665d">SdSpiBaseClass</a>.</p>
  186. </div>
  187. </div>
  188. <a id="ab7a11bf55dba84c8437e29940ee72276"></a>
  189. <h2 class="memtitle"><span class="permalink"><a href="#ab7a11bf55dba84c8437e29940ee72276">&#9670;&nbsp;</a></span>receive() <span class="overload">[1/2]</span></h2>
  190. <div class="memitem">
  191. <div class="memproto">
  192. <table class="mlabels">
  193. <tr>
  194. <td class="mlabels-left">
  195. <table class="memname">
  196. <tr>
  197. <td class="memname">uint8_t MySpiClass::receive </td>
  198. <td>(</td>
  199. <td class="paramname"></td><td>)</td>
  200. <td></td>
  201. </tr>
  202. </table>
  203. </td>
  204. <td class="mlabels-right">
  205. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  206. </tr>
  207. </table>
  208. </div><div class="memdoc">
  209. <p>Receive a byte.</p>
  210. <dl class="section return"><dt>Returns</dt><dd>The byte. </dd></dl>
  211. <p>Implements <a class="el" href="class_sd_spi_base_class.html#a537c71fb2cdb8a825215c0faeb6f7dbd">SdSpiBaseClass</a>.</p>
  212. </div>
  213. </div>
  214. <a id="a14913993cfaf4a48805cdddbdf883e4f"></a>
  215. <h2 class="memtitle"><span class="permalink"><a href="#a14913993cfaf4a48805cdddbdf883e4f">&#9670;&nbsp;</a></span>receive() <span class="overload">[2/2]</span></h2>
  216. <div class="memitem">
  217. <div class="memproto">
  218. <table class="mlabels">
  219. <tr>
  220. <td class="mlabels-left">
  221. <table class="memname">
  222. <tr>
  223. <td class="memname">uint8_t MySpiClass::receive </td>
  224. <td>(</td>
  225. <td class="paramtype">uint8_t *&#160;</td>
  226. <td class="paramname"><em>buf</em>, </td>
  227. </tr>
  228. <tr>
  229. <td class="paramkey"></td>
  230. <td></td>
  231. <td class="paramtype">size_t&#160;</td>
  232. <td class="paramname"><em>count</em>&#160;</td>
  233. </tr>
  234. <tr>
  235. <td></td>
  236. <td>)</td>
  237. <td></td><td></td>
  238. </tr>
  239. </table>
  240. </td>
  241. <td class="mlabels-right">
  242. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  243. </tr>
  244. </table>
  245. </div><div class="memdoc">
  246. <p>Receive multiple bytes.</p>
  247. <dl class="params"><dt>Parameters</dt><dd>
  248. <table class="params">
  249. <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Buffer to receive the data. </td></tr>
  250. <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Number of bytes to receive.</td></tr>
  251. </table>
  252. </dd>
  253. </dl>
  254. <dl class="section return"><dt>Returns</dt><dd>Zero for no error or nonzero error code. </dd></dl>
  255. <p>Implements <a class="el" href="class_sd_spi_base_class.html#a45693c18a8bb44ec9e5b9b1dee39b393">SdSpiBaseClass</a>.</p>
  256. </div>
  257. </div>
  258. <a id="a27a8048d69b6715afdbe8c58d8a08bb6"></a>
  259. <h2 class="memtitle"><span class="permalink"><a href="#a27a8048d69b6715afdbe8c58d8a08bb6">&#9670;&nbsp;</a></span>send() <span class="overload">[1/2]</span></h2>
  260. <div class="memitem">
  261. <div class="memproto">
  262. <table class="mlabels">
  263. <tr>
  264. <td class="mlabels-left">
  265. <table class="memname">
  266. <tr>
  267. <td class="memname">void MySpiClass::send </td>
  268. <td>(</td>
  269. <td class="paramtype">const uint8_t *&#160;</td>
  270. <td class="paramname"><em>buf</em>, </td>
  271. </tr>
  272. <tr>
  273. <td class="paramkey"></td>
  274. <td></td>
  275. <td class="paramtype">size_t&#160;</td>
  276. <td class="paramname"><em>count</em>&#160;</td>
  277. </tr>
  278. <tr>
  279. <td></td>
  280. <td>)</td>
  281. <td></td><td></td>
  282. </tr>
  283. </table>
  284. </td>
  285. <td class="mlabels-right">
  286. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  287. </tr>
  288. </table>
  289. </div><div class="memdoc">
  290. <p>Send multiple bytes.</p>
  291. <dl class="params"><dt>Parameters</dt><dd>
  292. <table class="params">
  293. <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Buffer for data to be sent. </td></tr>
  294. <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Number of bytes to send. </td></tr>
  295. </table>
  296. </dd>
  297. </dl>
  298. <p>Implements <a class="el" href="class_sd_spi_base_class.html#a51923b03f35af4bac7c3bb7c8d13303d">SdSpiBaseClass</a>.</p>
  299. </div>
  300. </div>
  301. <a id="a7f7369452d8a82f0dc24be00bba9c962"></a>
  302. <h2 class="memtitle"><span class="permalink"><a href="#a7f7369452d8a82f0dc24be00bba9c962">&#9670;&nbsp;</a></span>send() <span class="overload">[2/2]</span></h2>
  303. <div class="memitem">
  304. <div class="memproto">
  305. <table class="mlabels">
  306. <tr>
  307. <td class="mlabels-left">
  308. <table class="memname">
  309. <tr>
  310. <td class="memname">void MySpiClass::send </td>
  311. <td>(</td>
  312. <td class="paramtype">uint8_t&#160;</td>
  313. <td class="paramname"><em>data</em></td><td>)</td>
  314. <td></td>
  315. </tr>
  316. </table>
  317. </td>
  318. <td class="mlabels-right">
  319. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  320. </tr>
  321. </table>
  322. </div><div class="memdoc">
  323. <p>Send a byte.</p>
  324. <dl class="params"><dt>Parameters</dt><dd>
  325. <table class="params">
  326. <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Byte to send </td></tr>
  327. </table>
  328. </dd>
  329. </dl>
  330. <p>Implements <a class="el" href="class_sd_spi_base_class.html#a28001200e3d464f5c6e910837924c577">SdSpiBaseClass</a>.</p>
  331. </div>
  332. </div>
  333. <a id="a82e307da53a6d5d1003426c1ac30a915"></a>
  334. <h2 class="memtitle"><span class="permalink"><a href="#a82e307da53a6d5d1003426c1ac30a915">&#9670;&nbsp;</a></span>setSckSpeed()</h2>
  335. <div class="memitem">
  336. <div class="memproto">
  337. <table class="mlabels">
  338. <tr>
  339. <td class="mlabels-left">
  340. <table class="memname">
  341. <tr>
  342. <td class="memname">void MySpiClass::setSckSpeed </td>
  343. <td>(</td>
  344. <td class="paramtype">uint32_t&#160;</td>
  345. <td class="paramname"><em>maxSck</em></td><td>)</td>
  346. <td></td>
  347. </tr>
  348. </table>
  349. </td>
  350. <td class="mlabels-right">
  351. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  352. </tr>
  353. </table>
  354. </div><div class="memdoc">
  355. <p>Save high speed SPISettings after SD initialization.</p>
  356. <dl class="params"><dt>Parameters</dt><dd>
  357. <table class="params">
  358. <tr><td class="paramdir">[in]</td><td class="paramname">maxSck</td><td>Maximum SCK frequency. </td></tr>
  359. </table>
  360. </dd>
  361. </dl>
  362. <p>Reimplemented from <a class="el" href="class_sd_spi_base_class.html#a937215f1dc238285bd140c11ab82bbc9">SdSpiBaseClass</a>.</p>
  363. </div>
  364. </div>
  365. <hr/>The documentation for this class was generated from the following file:<ul>
  366. <li>ArduinoSdFat/libraries/SdFat/src/SpiDriver/<a class="el" href="_sd_spi_base_class_8h.html">SdSpiBaseClass.h</a></li>
  367. </ul>
  368. </div><!-- contents -->
  369. <!-- start footer part -->
  370. <hr class="footer"/><address class="footer"><small>
  371. Generated on Fri Dec 6 2019 09:45:12 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  372. <img class="footer" src="doxygen.png" alt="doxygen"/>
  373. </a> 1.8.16
  374. </small></address>
  375. </body>
  376. </html>