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ů.

301 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:a1ec1b9408b99ae60e4c62c0ba8d038c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi.html#a1ec1b9408b99ae60e4c62c0ba8d038c2">init</a> (uint8_t divisor)</td></tr>
  98. <tr class="separator:a1ec1b9408b99ae60e4c62c0ba8d038c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <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>
  100. <tr class="separator:aa017fd1d2bd196d1cbc4b845f6a72a40"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <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>
  102. <tr class="separator:a223c3b67496b7a05035060d68e8b7e0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. <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>
  104. <tr class="separator:a3c6369cd5cc2e1631bcc24e9194eb09a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <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>
  106. <tr class="separator:a97ef912cdc43e0800e0184160581f89e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  107. <tr class="memitem:a048d54bb93f2f2f86d9a499605dd1427"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi.html#a048d54bb93f2f2f86d9a499605dd1427">useSpiTransactions</a> ()</td></tr>
  108. <tr class="separator:a048d54bb93f2f2f86d9a499605dd1427"><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="a1ec1b9408b99ae60e4c62c0ba8d038c2"></a>
  129. <div class="memitem">
  130. <div class="memproto">
  131. <table class="memname">
  132. <tr>
  133. <td class="memname">void SdSpi::init </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="aa017fd1d2bd196d1cbc4b845f6a72a40"></a>
  151. <div class="memitem">
  152. <div class="memproto">
  153. <table class="memname">
  154. <tr>
  155. <td class="memname">uint8_t SdSpi::receive </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>Receive a byte.</p>
  163. <dl class="section return"><dt>Returns</dt><dd>The byte. </dd></dl>
  164. </div>
  165. </div>
  166. <a class="anchor" id="a223c3b67496b7a05035060d68e8b7e0e"></a>
  167. <div class="memitem">
  168. <div class="memproto">
  169. <table class="memname">
  170. <tr>
  171. <td class="memname">uint8_t SdSpi::receive </td>
  172. <td>(</td>
  173. <td class="paramtype">uint8_t *&#160;</td>
  174. <td class="paramname"><em>buf</em>, </td>
  175. </tr>
  176. <tr>
  177. <td class="paramkey"></td>
  178. <td></td>
  179. <td class="paramtype">size_t&#160;</td>
  180. <td class="paramname"><em>n</em>&#160;</td>
  181. </tr>
  182. <tr>
  183. <td></td>
  184. <td>)</td>
  185. <td></td><td></td>
  186. </tr>
  187. </table>
  188. </div><div class="memdoc">
  189. <p>Receive multiple bytes.</p>
  190. <dl class="params"><dt>Parameters</dt><dd>
  191. <table class="params">
  192. <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Buffer to receive the data. </td></tr>
  193. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to receive.</td></tr>
  194. </table>
  195. </dd>
  196. </dl>
  197. <dl class="section return"><dt>Returns</dt><dd>Zero for no error or nonzero error code. </dd></dl>
  198. </div>
  199. </div>
  200. <a class="anchor" id="a3c6369cd5cc2e1631bcc24e9194eb09a"></a>
  201. <div class="memitem">
  202. <div class="memproto">
  203. <table class="memname">
  204. <tr>
  205. <td class="memname">void SdSpi::send </td>
  206. <td>(</td>
  207. <td class="paramtype">uint8_t&#160;</td>
  208. <td class="paramname"><em>data</em></td><td>)</td>
  209. <td></td>
  210. </tr>
  211. </table>
  212. </div><div class="memdoc">
  213. <p>Send a byte.</p>
  214. <dl class="params"><dt>Parameters</dt><dd>
  215. <table class="params">
  216. <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Byte to send </td></tr>
  217. </table>
  218. </dd>
  219. </dl>
  220. </div>
  221. </div>
  222. <a class="anchor" id="a97ef912cdc43e0800e0184160581f89e"></a>
  223. <div class="memitem">
  224. <div class="memproto">
  225. <table class="memname">
  226. <tr>
  227. <td class="memname">void SdSpi::send </td>
  228. <td>(</td>
  229. <td class="paramtype">const uint8_t *&#160;</td>
  230. <td class="paramname"><em>buf</em>, </td>
  231. </tr>
  232. <tr>
  233. <td class="paramkey"></td>
  234. <td></td>
  235. <td class="paramtype">size_t&#160;</td>
  236. <td class="paramname"><em>n</em>&#160;</td>
  237. </tr>
  238. <tr>
  239. <td></td>
  240. <td>)</td>
  241. <td></td><td></td>
  242. </tr>
  243. </table>
  244. </div><div class="memdoc">
  245. <p>Send multiple bytes.</p>
  246. <dl class="params"><dt>Parameters</dt><dd>
  247. <table class="params">
  248. <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Buffer for data to be sent. </td></tr>
  249. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to send. </td></tr>
  250. </table>
  251. </dd>
  252. </dl>
  253. </div>
  254. </div>
  255. <a class="anchor" id="a048d54bb93f2f2f86d9a499605dd1427"></a>
  256. <div class="memitem">
  257. <div class="memproto">
  258. <table class="mlabels">
  259. <tr>
  260. <td class="mlabels-left">
  261. <table class="memname">
  262. <tr>
  263. <td class="memname">bool SdSpi::useSpiTransactions </td>
  264. <td>(</td>
  265. <td class="paramname"></td><td>)</td>
  266. <td></td>
  267. </tr>
  268. </table>
  269. </td>
  270. <td class="mlabels-right">
  271. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  272. </tr>
  273. </table>
  274. </div><div class="memdoc">
  275. <dl class="section return"><dt>Returns</dt><dd>true - uses SPI transactions </dd></dl>
  276. </div>
  277. </div>
  278. <hr/>The documentation for this class was generated from the following file:<ul>
  279. <li>Arduino/libraries/SdFat/<a class="el" href="_sd_spi_8h.html">SdSpi.h</a></li>
  280. </ul>
  281. </div><!-- contents -->
  282. <!-- start footer part -->
  283. <hr class="footer"/><address class="footer"><small>
  284. Generated on Sun Feb 1 2015 10:21:40 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  285. <img class="footer" src="doxygen.png" alt="doxygen"/>
  286. </a> 1.8.8
  287. </small></address>
  288. </body>
  289. </html>