Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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.10"/>
  7. <title>SdFat: SdSpiLibDriver 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 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. </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_lib_driver-members.html">List of all members</a> </div>
  85. <div class="headertitle">
  86. <div class="title">SdSpiLibDriver Class Reference</div> </div>
  87. </div><!--header-->
  88. <div class="contents">
  89. <p><a class="el" href="class_sd_spi_lib_driver.html" title="SdSpiLibDriver - use standard SPI library. ">SdSpiLibDriver</a> - use standard SPI library.
  90. <a href="class_sd_spi_lib_driver.html#details">More...</a></p>
  91. <p><code>#include &lt;SdSpiDriver.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:aeb8263fb0eaca724af90830e90ddd044"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#aeb8263fb0eaca724af90830e90ddd044">activate</a> ()</td></tr>
  96. <tr class="separator:aeb8263fb0eaca724af90830e90ddd044"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <tr class="memitem:a5863b84f8f277b7a926e915cdc378957"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a5863b84f8f277b7a926e915cdc378957">begin</a> (uint8_t csPin)</td></tr>
  98. <tr class="separator:a5863b84f8f277b7a926e915cdc378957"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:a120d6b78f9dad6837d10b45b76d32c82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a120d6b78f9dad6837d10b45b76d32c82">deactivate</a> ()</td></tr>
  100. <tr class="separator:a120d6b78f9dad6837d10b45b76d32c82"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:acab44a1709ed382264e0844a544526d7"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#acab44a1709ed382264e0844a544526d7">receive</a> ()</td></tr>
  102. <tr class="separator:acab44a1709ed382264e0844a544526d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. <tr class="memitem:a961697c166b9965ab495e22b12f01ae9"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a961697c166b9965ab495e22b12f01ae9">receive</a> (uint8_t *buf, size_t n)</td></tr>
  104. <tr class="separator:a961697c166b9965ab495e22b12f01ae9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:af24e0b0555b068d059b895314a77785d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#af24e0b0555b068d059b895314a77785d">select</a> ()</td></tr>
  106. <tr class="separator:af24e0b0555b068d059b895314a77785d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  107. <tr class="memitem:aed31a7a2cc1b07200f6b295659b39a26"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#aed31a7a2cc1b07200f6b295659b39a26">send</a> (uint8_t data)</td></tr>
  108. <tr class="separator:aed31a7a2cc1b07200f6b295659b39a26"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="memitem:a2dc6c188ff9be18aa46234c4bdc4e536"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a2dc6c188ff9be18aa46234c4bdc4e536">send</a> (const uint8_t *buf, size_t n)</td></tr>
  110. <tr class="separator:a2dc6c188ff9be18aa46234c4bdc4e536"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <tr class="memitem:a99fb51a9a567923fa7f87374e0aa124f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a99fb51a9a567923fa7f87374e0aa124f">setSpiSettings</a> (SPISettings spiSettings)</td></tr>
  112. <tr class="separator:a99fb51a9a567923fa7f87374e0aa124f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="memitem:a593b443dca85fe4de76ab06547233429"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_lib_driver.html#a593b443dca85fe4de76ab06547233429">unselect</a> ()</td></tr>
  114. <tr class="separator:a593b443dca85fe4de76ab06547233429"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. </table>
  116. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  117. <div class="textblock"><p><a class="el" href="class_sd_spi_lib_driver.html" title="SdSpiLibDriver - use standard SPI library. ">SdSpiLibDriver</a> - use standard SPI library. </p>
  118. </div><h2 class="groupheader">Member Function Documentation</h2>
  119. <a class="anchor" id="aeb8263fb0eaca724af90830e90ddd044"></a>
  120. <div class="memitem">
  121. <div class="memproto">
  122. <table class="mlabels">
  123. <tr>
  124. <td class="mlabels-left">
  125. <table class="memname">
  126. <tr>
  127. <td class="memname">void SdSpiLibDriver::activate </td>
  128. <td>(</td>
  129. <td class="paramname"></td><td>)</td>
  130. <td></td>
  131. </tr>
  132. </table>
  133. </td>
  134. <td class="mlabels-right">
  135. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  136. </tr>
  137. </table>
  138. </div><div class="memdoc">
  139. <p>Activate SPI hardware. </p>
  140. </div>
  141. </div>
  142. <a class="anchor" id="a5863b84f8f277b7a926e915cdc378957"></a>
  143. <div class="memitem">
  144. <div class="memproto">
  145. <table class="mlabels">
  146. <tr>
  147. <td class="mlabels-left">
  148. <table class="memname">
  149. <tr>
  150. <td class="memname">void SdSpiLibDriver::begin </td>
  151. <td>(</td>
  152. <td class="paramtype">uint8_t&#160;</td>
  153. <td class="paramname"><em>csPin</em></td><td>)</td>
  154. <td></td>
  155. </tr>
  156. </table>
  157. </td>
  158. <td class="mlabels-right">
  159. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  160. </tr>
  161. </table>
  162. </div><div class="memdoc">
  163. <p>Initialize the SPI bus.</p>
  164. <dl class="params"><dt>Parameters</dt><dd>
  165. <table class="params">
  166. <tr><td class="paramdir">[in]</td><td class="paramname">csPin</td><td>SD card chip select pin. </td></tr>
  167. </table>
  168. </dd>
  169. </dl>
  170. </div>
  171. </div>
  172. <a class="anchor" id="a120d6b78f9dad6837d10b45b76d32c82"></a>
  173. <div class="memitem">
  174. <div class="memproto">
  175. <table class="mlabels">
  176. <tr>
  177. <td class="mlabels-left">
  178. <table class="memname">
  179. <tr>
  180. <td class="memname">void SdSpiLibDriver::deactivate </td>
  181. <td>(</td>
  182. <td class="paramname"></td><td>)</td>
  183. <td></td>
  184. </tr>
  185. </table>
  186. </td>
  187. <td class="mlabels-right">
  188. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  189. </tr>
  190. </table>
  191. </div><div class="memdoc">
  192. <p>Deactivate SPI hardware. </p>
  193. </div>
  194. </div>
  195. <a class="anchor" id="acab44a1709ed382264e0844a544526d7"></a>
  196. <div class="memitem">
  197. <div class="memproto">
  198. <table class="mlabels">
  199. <tr>
  200. <td class="mlabels-left">
  201. <table class="memname">
  202. <tr>
  203. <td class="memname">uint8_t SdSpiLibDriver::receive </td>
  204. <td>(</td>
  205. <td class="paramname"></td><td>)</td>
  206. <td></td>
  207. </tr>
  208. </table>
  209. </td>
  210. <td class="mlabels-right">
  211. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  212. </tr>
  213. </table>
  214. </div><div class="memdoc">
  215. <p>Receive a byte.</p>
  216. <dl class="section return"><dt>Returns</dt><dd>The byte. </dd></dl>
  217. </div>
  218. </div>
  219. <a class="anchor" id="a961697c166b9965ab495e22b12f01ae9"></a>
  220. <div class="memitem">
  221. <div class="memproto">
  222. <table class="mlabels">
  223. <tr>
  224. <td class="mlabels-left">
  225. <table class="memname">
  226. <tr>
  227. <td class="memname">uint8_t SdSpiLibDriver::receive </td>
  228. <td>(</td>
  229. <td class="paramtype">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. </td>
  245. <td class="mlabels-right">
  246. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  247. </tr>
  248. </table>
  249. </div><div class="memdoc">
  250. <p>Receive multiple bytes.</p>
  251. <dl class="params"><dt>Parameters</dt><dd>
  252. <table class="params">
  253. <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Buffer to receive the data. </td></tr>
  254. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to receive.</td></tr>
  255. </table>
  256. </dd>
  257. </dl>
  258. <dl class="section return"><dt>Returns</dt><dd>Zero for no error or nonzero error code. </dd></dl>
  259. </div>
  260. </div>
  261. <a class="anchor" id="af24e0b0555b068d059b895314a77785d"></a>
  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 SdSpiLibDriver::select </td>
  270. <td>(</td>
  271. <td class="paramname"></td><td>)</td>
  272. <td></td>
  273. </tr>
  274. </table>
  275. </td>
  276. <td class="mlabels-right">
  277. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  278. </tr>
  279. </table>
  280. </div><div class="memdoc">
  281. <p>Set CS low. </p>
  282. </div>
  283. </div>
  284. <a class="anchor" id="aed31a7a2cc1b07200f6b295659b39a26"></a>
  285. <div class="memitem">
  286. <div class="memproto">
  287. <table class="mlabels">
  288. <tr>
  289. <td class="mlabels-left">
  290. <table class="memname">
  291. <tr>
  292. <td class="memname">void SdSpiLibDriver::send </td>
  293. <td>(</td>
  294. <td class="paramtype">uint8_t&#160;</td>
  295. <td class="paramname"><em>data</em></td><td>)</td>
  296. <td></td>
  297. </tr>
  298. </table>
  299. </td>
  300. <td class="mlabels-right">
  301. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  302. </tr>
  303. </table>
  304. </div><div class="memdoc">
  305. <p>Send a byte.</p>
  306. <dl class="params"><dt>Parameters</dt><dd>
  307. <table class="params">
  308. <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Byte to send </td></tr>
  309. </table>
  310. </dd>
  311. </dl>
  312. </div>
  313. </div>
  314. <a class="anchor" id="a2dc6c188ff9be18aa46234c4bdc4e536"></a>
  315. <div class="memitem">
  316. <div class="memproto">
  317. <table class="mlabels">
  318. <tr>
  319. <td class="mlabels-left">
  320. <table class="memname">
  321. <tr>
  322. <td class="memname">void SdSpiLibDriver::send </td>
  323. <td>(</td>
  324. <td class="paramtype">const uint8_t *&#160;</td>
  325. <td class="paramname"><em>buf</em>, </td>
  326. </tr>
  327. <tr>
  328. <td class="paramkey"></td>
  329. <td></td>
  330. <td class="paramtype">size_t&#160;</td>
  331. <td class="paramname"><em>n</em>&#160;</td>
  332. </tr>
  333. <tr>
  334. <td></td>
  335. <td>)</td>
  336. <td></td><td></td>
  337. </tr>
  338. </table>
  339. </td>
  340. <td class="mlabels-right">
  341. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  342. </tr>
  343. </table>
  344. </div><div class="memdoc">
  345. <p>Send multiple bytes.</p>
  346. <dl class="params"><dt>Parameters</dt><dd>
  347. <table class="params">
  348. <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Buffer for data to be sent. </td></tr>
  349. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to send. </td></tr>
  350. </table>
  351. </dd>
  352. </dl>
  353. </div>
  354. </div>
  355. <a class="anchor" id="a99fb51a9a567923fa7f87374e0aa124f"></a>
  356. <div class="memitem">
  357. <div class="memproto">
  358. <table class="mlabels">
  359. <tr>
  360. <td class="mlabels-left">
  361. <table class="memname">
  362. <tr>
  363. <td class="memname">void SdSpiLibDriver::setSpiSettings </td>
  364. <td>(</td>
  365. <td class="paramtype">SPISettings&#160;</td>
  366. <td class="paramname"><em>spiSettings</em></td><td>)</td>
  367. <td></td>
  368. </tr>
  369. </table>
  370. </td>
  371. <td class="mlabels-right">
  372. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  373. </tr>
  374. </table>
  375. </div><div class="memdoc">
  376. <p>Save SPISettings.</p>
  377. <dl class="params"><dt>Parameters</dt><dd>
  378. <table class="params">
  379. <tr><td class="paramdir">[in]</td><td class="paramname">spiSettings</td><td>SPI speed, mode, and byte order. </td></tr>
  380. </table>
  381. </dd>
  382. </dl>
  383. </div>
  384. </div>
  385. <a class="anchor" id="a593b443dca85fe4de76ab06547233429"></a>
  386. <div class="memitem">
  387. <div class="memproto">
  388. <table class="mlabels">
  389. <tr>
  390. <td class="mlabels-left">
  391. <table class="memname">
  392. <tr>
  393. <td class="memname">void SdSpiLibDriver::unselect </td>
  394. <td>(</td>
  395. <td class="paramname"></td><td>)</td>
  396. <td></td>
  397. </tr>
  398. </table>
  399. </td>
  400. <td class="mlabels-right">
  401. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  402. </tr>
  403. </table>
  404. </div><div class="memdoc">
  405. <p>Set CS high. </p>
  406. </div>
  407. </div>
  408. <hr/>The documentation for this class was generated from the following file:<ul>
  409. <li>Arduino/libraries/SdFat/src/<a class="el" href="_sd_spi_driver_8h.html">SdSpiDriver.h</a></li>
  410. </ul>
  411. </div><!-- contents -->
  412. <!-- start footer part -->
  413. <hr class="footer"/><address class="footer"><small>
  414. Generated on Fri Aug 19 2016 08:28:00 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  415. <img class="footer" src="doxygen.png" alt="doxygen"/>
  416. </a> 1.8.10
  417. </small></address>
  418. </body>
  419. </html>