Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

293 lines
13KB

  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.8"/>
  7. <title>SdFat: SdSpi 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/search.js"></script>
  13. <script type="text/javascript">
  14. $(document).ready(function() { searchBox.OnSelectItem(0); });
  15. </script>
  16. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  17. </head>
  18. <body>
  19. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  20. <div id="titlearea">
  21. <table cellspacing="0" cellpadding="0">
  22. <tbody>
  23. <tr style="height: 56px;">
  24. <td style="padding-left: 0.5em;">
  25. <div id="projectname">SdFat
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.8 -->
  34. <script type="text/javascript">
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. </script>
  37. <div id="navrow1" class="tabs">
  38. <ul class="tablist">
  39. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  40. <li><a href="modules.html"><span>Modules</span></a></li>
  41. <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
  42. <li><a href="files.html"><span>Files</span></a></li>
  43. <li>
  44. <div id="MSearchBox" class="MSearchBoxInactive">
  45. <span class="left">
  46. <img id="MSearchSelect" src="search/mag_sel.png"
  47. onmouseover="return searchBox.OnSearchSelectShow()"
  48. onmouseout="return searchBox.OnSearchSelectHide()"
  49. alt=""/>
  50. <input type="text" id="MSearchField" value="Search" accesskey="S"
  51. onfocus="searchBox.OnSearchFieldFocus(true)"
  52. onblur="searchBox.OnSearchFieldFocus(false)"
  53. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  54. </span><span class="right">
  55. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  56. </span>
  57. </div>
  58. </li>
  59. </ul>
  60. </div>
  61. <div id="navrow2" class="tabs2">
  62. <ul class="tablist">
  63. <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
  64. <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
  65. <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
  66. </ul>
  67. </div>
  68. <!-- window showing the filter options -->
  69. <div id="MSearchSelectWindow"
  70. onmouseover="return searchBox.OnSearchSelectShow()"
  71. onmouseout="return searchBox.OnSearchSelectHide()"
  72. onkeydown="return searchBox.OnSearchSelectKey(event)">
  73. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Modules</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  74. <!-- iframe showing the search results (closed by default) -->
  75. <div id="MSearchResultsWindow">
  76. <iframe src="javascript:void(0)" frameborder="0"
  77. name="MSearchResults" id="MSearchResults">
  78. </iframe>
  79. </div>
  80. </div><!-- top -->
  81. <div class="header">
  82. <div class="summary">
  83. <a href="#pub-methods">Public Member Functions</a> &#124;
  84. <a href="class_sd_spi-members.html">List of all members</a> </div>
  85. <div class="headertitle">
  86. <div class="title">SdSpi Class Reference</div> </div>
  87. </div><!--header-->
  88. <div class="contents">
  89. <p>SPI class for access to SD and SDHC flash memory cards.
  90. <a href="class_sd_spi.html#details">More...</a></p>
  91. <p><code>#include &lt;SdSpi.h&gt;</code></p>
  92. <table class="memberdecls">
  93. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  94. Public Member Functions</h2></td></tr>
  95. <tr class="memitem:a607aa7e4655f29bb16ed75b66ffc2c20"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi.html#a607aa7e4655f29bb16ed75b66ffc2c20">begin</a> ()</td></tr>
  96. <tr class="separator:a607aa7e4655f29bb16ed75b66ffc2c20"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <tr class="memitem:a3e84b817a6a5dab295fa457e8a92a5be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi.html#a3e84b817a6a5dab295fa457e8a92a5be">beginTransaction</a> (uint8_t divisor)</td></tr>
  98. <tr class="separator:a3e84b817a6a5dab295fa457e8a92a5be"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:ab3eda15d0e8fb881c616eed7e4bab1ba"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi.html#ab3eda15d0e8fb881c616eed7e4bab1ba">endTransaction</a> ()</td></tr>
  100. <tr class="separator:ab3eda15d0e8fb881c616eed7e4bab1ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:aa017fd1d2bd196d1cbc4b845f6a72a40"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi.html#aa017fd1d2bd196d1cbc4b845f6a72a40">receive</a> ()</td></tr>
  102. <tr class="separator:aa017fd1d2bd196d1cbc4b845f6a72a40"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. <tr class="memitem:a223c3b67496b7a05035060d68e8b7e0e"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi.html#a223c3b67496b7a05035060d68e8b7e0e">receive</a> (uint8_t *buf, size_t n)</td></tr>
  104. <tr class="separator:a223c3b67496b7a05035060d68e8b7e0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:a3c6369cd5cc2e1631bcc24e9194eb09a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi.html#a3c6369cd5cc2e1631bcc24e9194eb09a">send</a> (uint8_t data)</td></tr>
  106. <tr class="separator:a3c6369cd5cc2e1631bcc24e9194eb09a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  107. <tr class="memitem:a97ef912cdc43e0800e0184160581f89e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi.html#a97ef912cdc43e0800e0184160581f89e">send</a> (const uint8_t *buf, size_t n)</td></tr>
  108. <tr class="separator:a97ef912cdc43e0800e0184160581f89e"><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>SPI class for access to SD and SDHC flash memory cards. </p>
  112. </div><h2 class="groupheader">Member Function Documentation</h2>
  113. <a class="anchor" id="a607aa7e4655f29bb16ed75b66ffc2c20"></a>
  114. <div class="memitem">
  115. <div class="memproto">
  116. <table class="memname">
  117. <tr>
  118. <td class="memname">void SdSpi::begin </td>
  119. <td>(</td>
  120. <td class="paramname"></td><td>)</td>
  121. <td></td>
  122. </tr>
  123. </table>
  124. </div><div class="memdoc">
  125. <p>Initialize the SPI bus </p>
  126. </div>
  127. </div>
  128. <a class="anchor" id="a3e84b817a6a5dab295fa457e8a92a5be"></a>
  129. <div class="memitem">
  130. <div class="memproto">
  131. <table class="memname">
  132. <tr>
  133. <td class="memname">void SdSpi::beginTransaction </td>
  134. <td>(</td>
  135. <td class="paramtype">uint8_t&#160;</td>
  136. <td class="paramname"><em>divisor</em></td><td>)</td>
  137. <td></td>
  138. </tr>
  139. </table>
  140. </div><div class="memdoc">
  141. <p>Set SPI options for access to SD/SDHC cards.</p>
  142. <dl class="params"><dt>Parameters</dt><dd>
  143. <table class="params">
  144. <tr><td class="paramdir">[in]</td><td class="paramname">divisor</td><td>SCK clock divider relative to the system clock. </td></tr>
  145. </table>
  146. </dd>
  147. </dl>
  148. </div>
  149. </div>
  150. <a class="anchor" id="ab3eda15d0e8fb881c616eed7e4bab1ba"></a>
  151. <div class="memitem">
  152. <div class="memproto">
  153. <table class="memname">
  154. <tr>
  155. <td class="memname">void SdSpi::endTransaction </td>
  156. <td>(</td>
  157. <td class="paramname"></td><td>)</td>
  158. <td></td>
  159. </tr>
  160. </table>
  161. </div><div class="memdoc">
  162. <p>End SPI transaction </p>
  163. </div>
  164. </div>
  165. <a class="anchor" id="aa017fd1d2bd196d1cbc4b845f6a72a40"></a>
  166. <div class="memitem">
  167. <div class="memproto">
  168. <table class="memname">
  169. <tr>
  170. <td class="memname">uint8_t SdSpi::receive </td>
  171. <td>(</td>
  172. <td class="paramname"></td><td>)</td>
  173. <td></td>
  174. </tr>
  175. </table>
  176. </div><div class="memdoc">
  177. <p>Receive a byte.</p>
  178. <dl class="section return"><dt>Returns</dt><dd>The byte. </dd></dl>
  179. </div>
  180. </div>
  181. <a class="anchor" id="a223c3b67496b7a05035060d68e8b7e0e"></a>
  182. <div class="memitem">
  183. <div class="memproto">
  184. <table class="memname">
  185. <tr>
  186. <td class="memname">uint8_t SdSpi::receive </td>
  187. <td>(</td>
  188. <td class="paramtype">uint8_t *&#160;</td>
  189. <td class="paramname"><em>buf</em>, </td>
  190. </tr>
  191. <tr>
  192. <td class="paramkey"></td>
  193. <td></td>
  194. <td class="paramtype">size_t&#160;</td>
  195. <td class="paramname"><em>n</em>&#160;</td>
  196. </tr>
  197. <tr>
  198. <td></td>
  199. <td>)</td>
  200. <td></td><td></td>
  201. </tr>
  202. </table>
  203. </div><div class="memdoc">
  204. <p>Receive multiple bytes.</p>
  205. <dl class="params"><dt>Parameters</dt><dd>
  206. <table class="params">
  207. <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Buffer to receive the data. </td></tr>
  208. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to receive.</td></tr>
  209. </table>
  210. </dd>
  211. </dl>
  212. <dl class="section return"><dt>Returns</dt><dd>Zero for no error or nonzero error code. </dd></dl>
  213. </div>
  214. </div>
  215. <a class="anchor" id="a3c6369cd5cc2e1631bcc24e9194eb09a"></a>
  216. <div class="memitem">
  217. <div class="memproto">
  218. <table class="memname">
  219. <tr>
  220. <td class="memname">void SdSpi::send </td>
  221. <td>(</td>
  222. <td class="paramtype">uint8_t&#160;</td>
  223. <td class="paramname"><em>data</em></td><td>)</td>
  224. <td></td>
  225. </tr>
  226. </table>
  227. </div><div class="memdoc">
  228. <p>Send a byte.</p>
  229. <dl class="params"><dt>Parameters</dt><dd>
  230. <table class="params">
  231. <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Byte to send </td></tr>
  232. </table>
  233. </dd>
  234. </dl>
  235. </div>
  236. </div>
  237. <a class="anchor" id="a97ef912cdc43e0800e0184160581f89e"></a>
  238. <div class="memitem">
  239. <div class="memproto">
  240. <table class="memname">
  241. <tr>
  242. <td class="memname">void SdSpi::send </td>
  243. <td>(</td>
  244. <td class="paramtype">const uint8_t *&#160;</td>
  245. <td class="paramname"><em>buf</em>, </td>
  246. </tr>
  247. <tr>
  248. <td class="paramkey"></td>
  249. <td></td>
  250. <td class="paramtype">size_t&#160;</td>
  251. <td class="paramname"><em>n</em>&#160;</td>
  252. </tr>
  253. <tr>
  254. <td></td>
  255. <td>)</td>
  256. <td></td><td></td>
  257. </tr>
  258. </table>
  259. </div><div class="memdoc">
  260. <p>Send multiple bytes.</p>
  261. <dl class="params"><dt>Parameters</dt><dd>
  262. <table class="params">
  263. <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Buffer for data to be sent. </td></tr>
  264. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to send. </td></tr>
  265. </table>
  266. </dd>
  267. </dl>
  268. </div>
  269. </div>
  270. <hr/>The documentation for this class was generated from the following file:<ul>
  271. <li>Arduino/libraries/SdFat/src/SdSpiCard/<a class="el" href="_sd_spi_8h.html">SdSpi.h</a></li>
  272. </ul>
  273. </div><!-- contents -->
  274. <!-- start footer part -->
  275. <hr class="footer"/><address class="footer"><small>
  276. Generated on Sun Jul 19 2015 10:15:53 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  277. <img class="footer" src="doxygen.png" alt="doxygen"/>
  278. </a> 1.8.8
  279. </small></address>
  280. </body>
  281. </html>