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_sd_spi_arduino_driver.html 16KB

5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
5 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  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: SdSpiArduinoDriver 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_arduino_driver-members.html">List of all members</a> </div>
  65. <div class="headertitle">
  66. <div class="title">SdSpiArduinoDriver Class Reference</div> </div>
  67. </div><!--header-->
  68. <div class="contents">
  69. <p>Optimized SPI class for access to SD and SDHC flash memory cards.
  70. <a href="class_sd_spi_arduino_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:abb6b88c5c8b87fc344a69f23f6eab3d9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_arduino_driver.html#abb6b88c5c8b87fc344a69f23f6eab3d9">activate</a> ()</td></tr>
  76. <tr class="separator:abb6b88c5c8b87fc344a69f23f6eab3d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  77. <tr class="memitem:ae837a6d51bfe5518cb4744581824db88"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_arduino_driver.html#ae837a6d51bfe5518cb4744581824db88">begin</a> (<a class="el" href="class_sd_spi_config.html">SdSpiConfig</a> spiConfig)</td></tr>
  78. <tr class="separator:ae837a6d51bfe5518cb4744581824db88"><td class="memSeparator" colspan="2">&#160;</td></tr>
  79. <tr class="memitem:ae88a255f533e3acb41d1221025a69b55"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_arduino_driver.html#ae88a255f533e3acb41d1221025a69b55">deactivate</a> ()</td></tr>
  80. <tr class="separator:ae88a255f533e3acb41d1221025a69b55"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a7f94ce98855bb3d1781bbad77741e494"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_arduino_driver.html#a7f94ce98855bb3d1781bbad77741e494">end</a> ()</td></tr>
  82. <tr class="separator:a7f94ce98855bb3d1781bbad77741e494"><td class="memSeparator" colspan="2">&#160;</td></tr>
  83. <tr class="memitem:a8d6bc852a52e9d69c4b1e48ee062e8d1"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_arduino_driver.html#a8d6bc852a52e9d69c4b1e48ee062e8d1">receive</a> ()</td></tr>
  84. <tr class="separator:a8d6bc852a52e9d69c4b1e48ee062e8d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  85. <tr class="memitem:a4f5be313b836ca937a5b5be6432987ec"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_arduino_driver.html#a4f5be313b836ca937a5b5be6432987ec">receive</a> (uint8_t *buf, size_t count)</td></tr>
  86. <tr class="separator:a4f5be313b836ca937a5b5be6432987ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:a0516f7cd20263f90f83c57c4c6ce14e4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_arduino_driver.html#a0516f7cd20263f90f83c57c4c6ce14e4">send</a> (const uint8_t *buf, size_t count)</td></tr>
  88. <tr class="separator:a0516f7cd20263f90f83c57c4c6ce14e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  89. <tr class="memitem:a3c4842e47f98fe5d3799cd6028778ab5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_arduino_driver.html#a3c4842e47f98fe5d3799cd6028778ab5">send</a> (uint8_t data)</td></tr>
  90. <tr class="separator:a3c4842e47f98fe5d3799cd6028778ab5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  91. <tr class="memitem:acf0cc41d2bd80479237aa2799e119973"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_arduino_driver.html#acf0cc41d2bd80479237aa2799e119973">setSckSpeed</a> (uint32_t maxSck)</td></tr>
  92. <tr class="separator:acf0cc41d2bd80479237aa2799e119973"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. </table>
  94. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  95. <div class="textblock"><p>Optimized SPI class for access to SD and SDHC flash memory cards. </p>
  96. </div><h2 class="groupheader">Member Function Documentation</h2>
  97. <a id="abb6b88c5c8b87fc344a69f23f6eab3d9"></a>
  98. <h2 class="memtitle"><span class="permalink"><a href="#abb6b88c5c8b87fc344a69f23f6eab3d9">&#9670;&nbsp;</a></span>activate()</h2>
  99. <div class="memitem">
  100. <div class="memproto">
  101. <table class="mlabels">
  102. <tr>
  103. <td class="mlabels-left">
  104. <table class="memname">
  105. <tr>
  106. <td class="memname">void SdSpiArduinoDriver::activate </td>
  107. <td>(</td>
  108. <td class="paramname"></td><td>)</td>
  109. <td></td>
  110. </tr>
  111. </table>
  112. </td>
  113. <td class="mlabels-right">
  114. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  115. </tr>
  116. </table>
  117. </div><div class="memdoc">
  118. <p>Activate SPI hardware. </p>
  119. </div>
  120. </div>
  121. <a id="ae837a6d51bfe5518cb4744581824db88"></a>
  122. <h2 class="memtitle"><span class="permalink"><a href="#ae837a6d51bfe5518cb4744581824db88">&#9670;&nbsp;</a></span>begin()</h2>
  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">void SdSpiArduinoDriver::begin </td>
  131. <td>(</td>
  132. <td class="paramtype"><a class="el" href="class_sd_spi_config.html">SdSpiConfig</a>&#160;</td>
  133. <td class="paramname"><em>spiConfig</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">inline</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">spiConfig</td><td>SD card configuration. </td></tr>
  147. </table>
  148. </dd>
  149. </dl>
  150. </div>
  151. </div>
  152. <a id="ae88a255f533e3acb41d1221025a69b55"></a>
  153. <h2 class="memtitle"><span class="permalink"><a href="#ae88a255f533e3acb41d1221025a69b55">&#9670;&nbsp;</a></span>deactivate()</h2>
  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">void SdSpiArduinoDriver::deactivate </td>
  162. <td>(</td>
  163. <td class="paramname"></td><td>)</td>
  164. <td></td>
  165. </tr>
  166. </table>
  167. </td>
  168. <td class="mlabels-right">
  169. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  170. </tr>
  171. </table>
  172. </div><div class="memdoc">
  173. <p>Deactivate SPI hardware. </p>
  174. </div>
  175. </div>
  176. <a id="a7f94ce98855bb3d1781bbad77741e494"></a>
  177. <h2 class="memtitle"><span class="permalink"><a href="#a7f94ce98855bb3d1781bbad77741e494">&#9670;&nbsp;</a></span>end()</h2>
  178. <div class="memitem">
  179. <div class="memproto">
  180. <table class="memname">
  181. <tr>
  182. <td class="memname">void SdSpiArduinoDriver::end </td>
  183. <td>(</td>
  184. <td class="paramname"></td><td>)</td>
  185. <td></td>
  186. </tr>
  187. </table>
  188. </div><div class="memdoc">
  189. <p>End use of SPI driver after <a class="el" href="class_sd_spi_arduino_driver.html#ae837a6d51bfe5518cb4744581824db88">begin()</a> call. </p>
  190. </div>
  191. </div>
  192. <a id="a8d6bc852a52e9d69c4b1e48ee062e8d1"></a>
  193. <h2 class="memtitle"><span class="permalink"><a href="#a8d6bc852a52e9d69c4b1e48ee062e8d1">&#9670;&nbsp;</a></span>receive() <span class="overload">[1/2]</span></h2>
  194. <div class="memitem">
  195. <div class="memproto">
  196. <table class="mlabels">
  197. <tr>
  198. <td class="mlabels-left">
  199. <table class="memname">
  200. <tr>
  201. <td class="memname">uint8_t SdSpiArduinoDriver::receive </td>
  202. <td>(</td>
  203. <td class="paramname"></td><td>)</td>
  204. <td></td>
  205. </tr>
  206. </table>
  207. </td>
  208. <td class="mlabels-right">
  209. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  210. </tr>
  211. </table>
  212. </div><div class="memdoc">
  213. <p>Receive a byte.</p>
  214. <dl class="section return"><dt>Returns</dt><dd>The byte. </dd></dl>
  215. </div>
  216. </div>
  217. <a id="a4f5be313b836ca937a5b5be6432987ec"></a>
  218. <h2 class="memtitle"><span class="permalink"><a href="#a4f5be313b836ca937a5b5be6432987ec">&#9670;&nbsp;</a></span>receive() <span class="overload">[2/2]</span></h2>
  219. <div class="memitem">
  220. <div class="memproto">
  221. <table class="mlabels">
  222. <tr>
  223. <td class="mlabels-left">
  224. <table class="memname">
  225. <tr>
  226. <td class="memname">uint8_t SdSpiArduinoDriver::receive </td>
  227. <td>(</td>
  228. <td class="paramtype">uint8_t *&#160;</td>
  229. <td class="paramname"><em>buf</em>, </td>
  230. </tr>
  231. <tr>
  232. <td class="paramkey"></td>
  233. <td></td>
  234. <td class="paramtype">size_t&#160;</td>
  235. <td class="paramname"><em>count</em>&#160;</td>
  236. </tr>
  237. <tr>
  238. <td></td>
  239. <td>)</td>
  240. <td></td><td></td>
  241. </tr>
  242. </table>
  243. </td>
  244. <td class="mlabels-right">
  245. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  246. </tr>
  247. </table>
  248. </div><div class="memdoc">
  249. <p>Receive multiple bytes.</p>
  250. <dl class="params"><dt>Parameters</dt><dd>
  251. <table class="params">
  252. <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Buffer to receive the data. </td></tr>
  253. <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Number of bytes to receive.</td></tr>
  254. </table>
  255. </dd>
  256. </dl>
  257. <dl class="section return"><dt>Returns</dt><dd>Zero for no error or nonzero error code. </dd></dl>
  258. </div>
  259. </div>
  260. <a id="a0516f7cd20263f90f83c57c4c6ce14e4"></a>
  261. <h2 class="memtitle"><span class="permalink"><a href="#a0516f7cd20263f90f83c57c4c6ce14e4">&#9670;&nbsp;</a></span>send() <span class="overload">[1/2]</span></h2>
  262. <div class="memitem">
  263. <div class="memproto">
  264. <table class="mlabels">
  265. <tr>
  266. <td class="mlabels-left">
  267. <table class="memname">
  268. <tr>
  269. <td class="memname">void SdSpiArduinoDriver::send </td>
  270. <td>(</td>
  271. <td class="paramtype">const uint8_t *&#160;</td>
  272. <td class="paramname"><em>buf</em>, </td>
  273. </tr>
  274. <tr>
  275. <td class="paramkey"></td>
  276. <td></td>
  277. <td class="paramtype">size_t&#160;</td>
  278. <td class="paramname"><em>count</em>&#160;</td>
  279. </tr>
  280. <tr>
  281. <td></td>
  282. <td>)</td>
  283. <td></td><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 multiple bytes.</p>
  293. <dl class="params"><dt>Parameters</dt><dd>
  294. <table class="params">
  295. <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Buffer for data to be sent. </td></tr>
  296. <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Number of bytes to send. </td></tr>
  297. </table>
  298. </dd>
  299. </dl>
  300. </div>
  301. </div>
  302. <a id="a3c4842e47f98fe5d3799cd6028778ab5"></a>
  303. <h2 class="memtitle"><span class="permalink"><a href="#a3c4842e47f98fe5d3799cd6028778ab5">&#9670;&nbsp;</a></span>send() <span class="overload">[2/2]</span></h2>
  304. <div class="memitem">
  305. <div class="memproto">
  306. <table class="mlabels">
  307. <tr>
  308. <td class="mlabels-left">
  309. <table class="memname">
  310. <tr>
  311. <td class="memname">void SdSpiArduinoDriver::send </td>
  312. <td>(</td>
  313. <td class="paramtype">uint8_t&#160;</td>
  314. <td class="paramname"><em>data</em></td><td>)</td>
  315. <td></td>
  316. </tr>
  317. </table>
  318. </td>
  319. <td class="mlabels-right">
  320. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  321. </tr>
  322. </table>
  323. </div><div class="memdoc">
  324. <p>Send a byte.</p>
  325. <dl class="params"><dt>Parameters</dt><dd>
  326. <table class="params">
  327. <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Byte to send </td></tr>
  328. </table>
  329. </dd>
  330. </dl>
  331. </div>
  332. </div>
  333. <a id="acf0cc41d2bd80479237aa2799e119973"></a>
  334. <h2 class="memtitle"><span class="permalink"><a href="#acf0cc41d2bd80479237aa2799e119973">&#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 SdSpiArduinoDriver::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> </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. </div>
  363. </div>
  364. <hr/>The documentation for this class was generated from the following files:<ul>
  365. <li>ArduinoSdFat/libraries/SdFat/src/SpiDriver/<a class="el" href="_sd_spi_arduino_driver_8h.html">SdSpiArduinoDriver.h</a></li>
  366. <li>ArduinoSdFat/libraries/SdFat/src/SpiDriver/SdSpiAvr.h</li>
  367. <li>ArduinoSdFat/libraries/SdFat/src/SpiDriver/<a class="el" href="_sd_spi_lib_driver_8h.html">SdSpiLibDriver.h</a></li>
  368. </ul>
  369. </div><!-- contents -->
  370. <!-- start footer part -->
  371. <hr class="footer"/><address class="footer"><small>
  372. Generated on Fri Dec 6 2019 09:45:12 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  373. <img class="footer" src="doxygen.png" alt="doxygen"/>
  374. </a> 1.8.16
  375. </small></address>
  376. </body>
  377. </html>