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.

434 lines
17KB

  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.14"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>SdFat: SdLibSpiDriver 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.14 -->
  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_lib_spi_driver-members.html">List of all members</a> </div>
  65. <div class="headertitle">
  66. <div class="title">SdLibSpiDriver Class Reference</div> </div>
  67. </div><!--header-->
  68. <div class="contents">
  69. <p><a class="el" href="class_sd_lib_spi_driver.html" title="SdLibSpiDriver - use standard SPI library. ">SdLibSpiDriver</a> - use standard SPI library.
  70. <a href="class_sd_lib_spi_driver.html#details">More...</a></p>
  71. <p><code>#include &lt;SdSpiArduinoDriver.h&gt;</code></p>
  72. <table class="memberdecls">
  73. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  74. Public Member Functions</h2></td></tr>
  75. <tr class="memitem:a6110352e94291ef173dd6078b891b4b2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_lib_spi_driver.html#a6110352e94291ef173dd6078b891b4b2">activate</a> ()</td></tr>
  76. <tr class="separator:a6110352e94291ef173dd6078b891b4b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  77. <tr class="memitem:a8c16fc5f2003f4405f2dd8f518ed41fa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_lib_spi_driver.html#a8c16fc5f2003f4405f2dd8f518ed41fa">begin</a> (<a class="el" href="class_sd_spi_config.html">SdSpiConfig</a> spiConfig)</td></tr>
  78. <tr class="separator:a8c16fc5f2003f4405f2dd8f518ed41fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  79. <tr class="memitem:a4347a13e11e1fe5760f11f3bf229d3ce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_lib_spi_driver.html#a4347a13e11e1fe5760f11f3bf229d3ce">deactivate</a> ()</td></tr>
  80. <tr class="separator:a4347a13e11e1fe5760f11f3bf229d3ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:af0852fab95dff181466bcd741cbfb180"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_lib_spi_driver.html#af0852fab95dff181466bcd741cbfb180">receive</a> ()</td></tr>
  82. <tr class="separator:af0852fab95dff181466bcd741cbfb180"><td class="memSeparator" colspan="2">&#160;</td></tr>
  83. <tr class="memitem:a88d3d8aa37df991a469e0246a167b39d"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_lib_spi_driver.html#a88d3d8aa37df991a469e0246a167b39d">receive</a> (uint8_t *buf, size_t n)</td></tr>
  84. <tr class="separator:a88d3d8aa37df991a469e0246a167b39d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  85. <tr class="memitem:a57f9fd00a241e400b86531de7bda14fc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_lib_spi_driver.html#a57f9fd00a241e400b86531de7bda14fc">select</a> ()</td></tr>
  86. <tr class="separator:a57f9fd00a241e400b86531de7bda14fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:ae230d2b5c33ec1d70d05b484d3646927"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_lib_spi_driver.html#ae230d2b5c33ec1d70d05b484d3646927">send</a> (uint8_t data)</td></tr>
  88. <tr class="separator:ae230d2b5c33ec1d70d05b484d3646927"><td class="memSeparator" colspan="2">&#160;</td></tr>
  89. <tr class="memitem:a55c733d8dafab2272889431d20001419"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_lib_spi_driver.html#a55c733d8dafab2272889431d20001419">send</a> (const uint8_t *buf, size_t n)</td></tr>
  90. <tr class="separator:a55c733d8dafab2272889431d20001419"><td class="memSeparator" colspan="2">&#160;</td></tr>
  91. <tr class="memitem:a3b2729f466d0c334e9627c8a011555c4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_lib_spi_driver.html#a3b2729f466d0c334e9627c8a011555c4">setHighSpeed</a> (<a class="el" href="class_sd_spi_config.html">SdSpiConfig</a> spiConfig)</td></tr>
  92. <tr class="separator:a3b2729f466d0c334e9627c8a011555c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <tr class="memitem:a57af8105e517abe4fb93b671b571eedf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_lib_spi_driver.html#a57af8105e517abe4fb93b671b571eedf">unselect</a> ()</td></tr>
  94. <tr class="separator:a57af8105e517abe4fb93b671b571eedf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. </table>
  96. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  97. <div class="textblock"><p><a class="el" href="class_sd_lib_spi_driver.html" title="SdLibSpiDriver - use standard SPI library. ">SdLibSpiDriver</a> - use standard SPI library. </p>
  98. </div><h2 class="groupheader">Member Function Documentation</h2>
  99. <a id="a6110352e94291ef173dd6078b891b4b2"></a>
  100. <h2 class="memtitle"><span class="permalink"><a href="#a6110352e94291ef173dd6078b891b4b2">&#9670;&nbsp;</a></span>activate()</h2>
  101. <div class="memitem">
  102. <div class="memproto">
  103. <table class="mlabels">
  104. <tr>
  105. <td class="mlabels-left">
  106. <table class="memname">
  107. <tr>
  108. <td class="memname">void SdLibSpiDriver::activate </td>
  109. <td>(</td>
  110. <td class="paramname"></td><td>)</td>
  111. <td></td>
  112. </tr>
  113. </table>
  114. </td>
  115. <td class="mlabels-right">
  116. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  117. </tr>
  118. </table>
  119. </div><div class="memdoc">
  120. <p>Activate SPI hardware. </p>
  121. </div>
  122. </div>
  123. <a id="a8c16fc5f2003f4405f2dd8f518ed41fa"></a>
  124. <h2 class="memtitle"><span class="permalink"><a href="#a8c16fc5f2003f4405f2dd8f518ed41fa">&#9670;&nbsp;</a></span>begin()</h2>
  125. <div class="memitem">
  126. <div class="memproto">
  127. <table class="mlabels">
  128. <tr>
  129. <td class="mlabels-left">
  130. <table class="memname">
  131. <tr>
  132. <td class="memname">void SdLibSpiDriver::begin </td>
  133. <td>(</td>
  134. <td class="paramtype"><a class="el" href="class_sd_spi_config.html">SdSpiConfig</a>&#160;</td>
  135. <td class="paramname"><em>spiConfig</em></td><td>)</td>
  136. <td></td>
  137. </tr>
  138. </table>
  139. </td>
  140. <td class="mlabels-right">
  141. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  142. </tr>
  143. </table>
  144. </div><div class="memdoc">
  145. <p>Initialize the SPI bus.</p>
  146. <dl class="params"><dt>Parameters</dt><dd>
  147. <table class="params">
  148. <tr><td class="paramdir">[in]</td><td class="paramname">spiConfig</td><td>SD card configuration. </td></tr>
  149. </table>
  150. </dd>
  151. </dl>
  152. </div>
  153. </div>
  154. <a id="a4347a13e11e1fe5760f11f3bf229d3ce"></a>
  155. <h2 class="memtitle"><span class="permalink"><a href="#a4347a13e11e1fe5760f11f3bf229d3ce">&#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">void SdLibSpiDriver::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> </td>
  172. </tr>
  173. </table>
  174. </div><div class="memdoc">
  175. <p>Deactivate SPI hardware. </p>
  176. </div>
  177. </div>
  178. <a id="af0852fab95dff181466bcd741cbfb180"></a>
  179. <h2 class="memtitle"><span class="permalink"><a href="#af0852fab95dff181466bcd741cbfb180">&#9670;&nbsp;</a></span>receive() <span class="overload">[1/2]</span></h2>
  180. <div class="memitem">
  181. <div class="memproto">
  182. <table class="mlabels">
  183. <tr>
  184. <td class="mlabels-left">
  185. <table class="memname">
  186. <tr>
  187. <td class="memname">uint8_t SdLibSpiDriver::receive </td>
  188. <td>(</td>
  189. <td class="paramname"></td><td>)</td>
  190. <td></td>
  191. </tr>
  192. </table>
  193. </td>
  194. <td class="mlabels-right">
  195. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  196. </tr>
  197. </table>
  198. </div><div class="memdoc">
  199. <p>Receive a byte.</p>
  200. <dl class="section return"><dt>Returns</dt><dd>The byte. </dd></dl>
  201. </div>
  202. </div>
  203. <a id="a88d3d8aa37df991a469e0246a167b39d"></a>
  204. <h2 class="memtitle"><span class="permalink"><a href="#a88d3d8aa37df991a469e0246a167b39d">&#9670;&nbsp;</a></span>receive() <span class="overload">[2/2]</span></h2>
  205. <div class="memitem">
  206. <div class="memproto">
  207. <table class="mlabels">
  208. <tr>
  209. <td class="mlabels-left">
  210. <table class="memname">
  211. <tr>
  212. <td class="memname">uint8_t SdLibSpiDriver::receive </td>
  213. <td>(</td>
  214. <td class="paramtype">uint8_t *&#160;</td>
  215. <td class="paramname"><em>buf</em>, </td>
  216. </tr>
  217. <tr>
  218. <td class="paramkey"></td>
  219. <td></td>
  220. <td class="paramtype">size_t&#160;</td>
  221. <td class="paramname"><em>n</em>&#160;</td>
  222. </tr>
  223. <tr>
  224. <td></td>
  225. <td>)</td>
  226. <td></td><td></td>
  227. </tr>
  228. </table>
  229. </td>
  230. <td class="mlabels-right">
  231. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  232. </tr>
  233. </table>
  234. </div><div class="memdoc">
  235. <p>Receive multiple bytes.</p>
  236. <dl class="params"><dt>Parameters</dt><dd>
  237. <table class="params">
  238. <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Buffer to receive the data. </td></tr>
  239. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to receive.</td></tr>
  240. </table>
  241. </dd>
  242. </dl>
  243. <dl class="section return"><dt>Returns</dt><dd>Zero for no error or nonzero error code. </dd></dl>
  244. </div>
  245. </div>
  246. <a id="a57f9fd00a241e400b86531de7bda14fc"></a>
  247. <h2 class="memtitle"><span class="permalink"><a href="#a57f9fd00a241e400b86531de7bda14fc">&#9670;&nbsp;</a></span>select()</h2>
  248. <div class="memitem">
  249. <div class="memproto">
  250. <table class="mlabels">
  251. <tr>
  252. <td class="mlabels-left">
  253. <table class="memname">
  254. <tr>
  255. <td class="memname">void SdLibSpiDriver::select </td>
  256. <td>(</td>
  257. <td class="paramname"></td><td>)</td>
  258. <td></td>
  259. </tr>
  260. </table>
  261. </td>
  262. <td class="mlabels-right">
  263. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  264. </tr>
  265. </table>
  266. </div><div class="memdoc">
  267. <p>Set CS low. </p>
  268. </div>
  269. </div>
  270. <a id="ae230d2b5c33ec1d70d05b484d3646927"></a>
  271. <h2 class="memtitle"><span class="permalink"><a href="#ae230d2b5c33ec1d70d05b484d3646927">&#9670;&nbsp;</a></span>send() <span class="overload">[1/2]</span></h2>
  272. <div class="memitem">
  273. <div class="memproto">
  274. <table class="mlabels">
  275. <tr>
  276. <td class="mlabels-left">
  277. <table class="memname">
  278. <tr>
  279. <td class="memname">void SdLibSpiDriver::send </td>
  280. <td>(</td>
  281. <td class="paramtype">uint8_t&#160;</td>
  282. <td class="paramname"><em>data</em></td><td>)</td>
  283. <td></td>
  284. </tr>
  285. </table>
  286. </td>
  287. <td class="mlabels-right">
  288. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  289. </tr>
  290. </table>
  291. </div><div class="memdoc">
  292. <p>Send a byte.</p>
  293. <dl class="params"><dt>Parameters</dt><dd>
  294. <table class="params">
  295. <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Byte to send </td></tr>
  296. </table>
  297. </dd>
  298. </dl>
  299. </div>
  300. </div>
  301. <a id="a55c733d8dafab2272889431d20001419"></a>
  302. <h2 class="memtitle"><span class="permalink"><a href="#a55c733d8dafab2272889431d20001419">&#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 SdLibSpiDriver::send </td>
  311. <td>(</td>
  312. <td class="paramtype">const uint8_t *&#160;</td>
  313. <td class="paramname"><em>buf</em>, </td>
  314. </tr>
  315. <tr>
  316. <td class="paramkey"></td>
  317. <td></td>
  318. <td class="paramtype">size_t&#160;</td>
  319. <td class="paramname"><em>n</em>&#160;</td>
  320. </tr>
  321. <tr>
  322. <td></td>
  323. <td>)</td>
  324. <td></td><td></td>
  325. </tr>
  326. </table>
  327. </td>
  328. <td class="mlabels-right">
  329. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  330. </tr>
  331. </table>
  332. </div><div class="memdoc">
  333. <p>Send multiple bytes.</p>
  334. <dl class="params"><dt>Parameters</dt><dd>
  335. <table class="params">
  336. <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Buffer for data to be sent. </td></tr>
  337. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to send. </td></tr>
  338. </table>
  339. </dd>
  340. </dl>
  341. </div>
  342. </div>
  343. <a id="a3b2729f466d0c334e9627c8a011555c4"></a>
  344. <h2 class="memtitle"><span class="permalink"><a href="#a3b2729f466d0c334e9627c8a011555c4">&#9670;&nbsp;</a></span>setHighSpeed()</h2>
  345. <div class="memitem">
  346. <div class="memproto">
  347. <table class="mlabels">
  348. <tr>
  349. <td class="mlabels-left">
  350. <table class="memname">
  351. <tr>
  352. <td class="memname">void SdLibSpiDriver::setHighSpeed </td>
  353. <td>(</td>
  354. <td class="paramtype"><a class="el" href="class_sd_spi_config.html">SdSpiConfig</a>&#160;</td>
  355. <td class="paramname"><em>spiConfig</em></td><td>)</td>
  356. <td></td>
  357. </tr>
  358. </table>
  359. </td>
  360. <td class="mlabels-right">
  361. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  362. </tr>
  363. </table>
  364. </div><div class="memdoc">
  365. <p>Save high speed SPISettings after SD initialization.</p>
  366. <dl class="params"><dt>Parameters</dt><dd>
  367. <table class="params">
  368. <tr><td class="paramdir">[in]</td><td class="paramname">spiConfig</td><td>SPI options. </td></tr>
  369. </table>
  370. </dd>
  371. </dl>
  372. </div>
  373. </div>
  374. <a id="a57af8105e517abe4fb93b671b571eedf"></a>
  375. <h2 class="memtitle"><span class="permalink"><a href="#a57af8105e517abe4fb93b671b571eedf">&#9670;&nbsp;</a></span>unselect()</h2>
  376. <div class="memitem">
  377. <div class="memproto">
  378. <table class="mlabels">
  379. <tr>
  380. <td class="mlabels-left">
  381. <table class="memname">
  382. <tr>
  383. <td class="memname">void SdLibSpiDriver::unselect </td>
  384. <td>(</td>
  385. <td class="paramname"></td><td>)</td>
  386. <td></td>
  387. </tr>
  388. </table>
  389. </td>
  390. <td class="mlabels-right">
  391. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  392. </tr>
  393. </table>
  394. </div><div class="memdoc">
  395. <p>Set CS high. </p>
  396. </div>
  397. </div>
  398. <hr/>The documentation for this class was generated from the following file:<ul>
  399. <li>ArduinoSdFat/libraries/SdFat/src/SpiDriver/<a class="el" href="_sd_spi_arduino_driver_8h.html">SdSpiArduinoDriver.h</a></li>
  400. </ul>
  401. </div><!-- contents -->
  402. <!-- start footer part -->
  403. <hr class="footer"/><address class="footer"><small>
  404. Generated on Thu May 9 2019 06:51:29 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  405. <img class="footer" src="doxygen.png" alt="doxygen"/>
  406. </a> 1.8.14
  407. </small></address>
  408. </body>
  409. </html>