Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

301 rinda
12KB

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