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.

403 line
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: SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt; Class Template 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_soft-members.html">List of all members</a> </div>
  86. <div class="headertitle">
  87. <div class="title">SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt; Class Template Reference</div> </div>
  88. </div><!--header-->
  89. <div class="contents">
  90. <p>Software SPI class for access to SD and SDHC flash memory cards.
  91. <a href="class_sd_spi_soft.html#details">More...</a></p>
  92. <p><code>#include &lt;SdSpi.h&gt;</code></p>
  93. <div class="dynheader">
  94. Inheritance diagram for SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt;:</div>
  95. <div class="dyncontent">
  96. <div class="center"><img src="class_sd_spi_soft__inherit__graph.png" border="0" usemap="#_sd_spi_soft_3_01_miso_pin_00_01_mosi_pin_00_01_sck_pin_01_4_inherit__map" alt="Inheritance graph"/></div>
  97. <map name="_sd_spi_soft_3_01_miso_pin_00_01_mosi_pin_00_01_sck_pin_01_4_inherit__map" id="_sd_spi_soft_3_01_miso_pin_00_01_mosi_pin_00_01_sck_pin_01_4_inherit__map">
  98. <area shape="rect" id="node2" href="class_sd_spi_base.html" title="Virtual SPI class for access to SD and SDHC flash memory cards. " alt="" coords="33,5,120,32"/>
  99. </map>
  100. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  101. <div class="dynheader">
  102. Collaboration diagram for SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt;:</div>
  103. <div class="dyncontent">
  104. <div class="center"><img src="class_sd_spi_soft__coll__graph.png" border="0" usemap="#_sd_spi_soft_3_01_miso_pin_00_01_mosi_pin_00_01_sck_pin_01_4_coll__map" alt="Collaboration graph"/></div>
  105. <map name="_sd_spi_soft_3_01_miso_pin_00_01_mosi_pin_00_01_sck_pin_01_4_coll__map" id="_sd_spi_soft_3_01_miso_pin_00_01_mosi_pin_00_01_sck_pin_01_4_coll__map">
  106. <area shape="rect" id="node2" href="class_sd_spi_base.html" title="Virtual SPI class for access to SD and SDHC flash memory cards. " alt="" coords="33,5,120,32"/>
  107. </map>
  108. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  109. <table class="memberdecls">
  110. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  111. Public Member Functions</h2></td></tr>
  112. <tr class="memitem:a957355dae46e184bf7c12cd8306ac2fd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_soft.html#a957355dae46e184bf7c12cd8306ac2fd">begin</a> (uint8_t chipSelectPin)</td></tr>
  113. <tr class="separator:a957355dae46e184bf7c12cd8306ac2fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <tr class="memitem:afe6909bd40f444c4680da3140b81de36"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_soft.html#afe6909bd40f444c4680da3140b81de36">beginTransaction</a> (uint8_t divisor)</td></tr>
  115. <tr class="separator:afe6909bd40f444c4680da3140b81de36"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:a9efd9900dfc03582e433ff8939e96dff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_soft.html#a9efd9900dfc03582e433ff8939e96dff">endTransaction</a> ()</td></tr>
  117. <tr class="separator:a9efd9900dfc03582e433ff8939e96dff"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <tr class="memitem:a8a004fe608a81458a1aa3a6716a80d74"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_soft.html#a8a004fe608a81458a1aa3a6716a80d74">receive</a> ()</td></tr>
  119. <tr class="separator:a8a004fe608a81458a1aa3a6716a80d74"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a256f21aeaff4f15a7a5402cccbcc32f1"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_soft.html#a256f21aeaff4f15a7a5402cccbcc32f1">receive</a> (uint8_t *buf, size_t n)</td></tr>
  121. <tr class="separator:a256f21aeaff4f15a7a5402cccbcc32f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:a96224c2c89d9b6118a2979252d682c2a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_soft.html#a96224c2c89d9b6118a2979252d682c2a">send</a> (uint8_t data)</td></tr>
  123. <tr class="separator:a96224c2c89d9b6118a2979252d682c2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. <tr class="memitem:a7f4cada25994f77cb8ed51f71465e334"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_soft.html#a7f4cada25994f77cb8ed51f71465e334">send</a> (const uint8_t *buf, size_t n)</td></tr>
  125. <tr class="separator:a7f4cada25994f77cb8ed51f71465e334"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. </table>
  127. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  128. <div class="textblock"><h3>template&lt;uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin&gt;<br />
  129. class SdSpiSoft&lt; MisoPin, MosiPin, SckPin &gt;</h3>
  130. <p>Software SPI class for access to SD and SDHC flash memory cards. </p>
  131. </div><h2 class="groupheader">Member Function Documentation</h2>
  132. <a class="anchor" id="a957355dae46e184bf7c12cd8306ac2fd"></a>
  133. <div class="memitem">
  134. <div class="memproto">
  135. <div class="memtemplate">
  136. template&lt;uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin&gt; </div>
  137. <table class="mlabels">
  138. <tr>
  139. <td class="mlabels-left">
  140. <table class="memname">
  141. <tr>
  142. <td class="memname">void <a class="el" href="class_sd_spi_soft.html">SdSpiSoft</a>&lt; MisoPin, MosiPin, SckPin &gt;::begin </td>
  143. <td>(</td>
  144. <td class="paramtype">uint8_t&#160;</td>
  145. <td class="paramname"><em>chipSelectPin</em></td><td>)</td>
  146. <td></td>
  147. </tr>
  148. </table>
  149. </td>
  150. <td class="mlabels-right">
  151. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  152. </tr>
  153. </table>
  154. </div><div class="memdoc">
  155. <p>Initialize the SPI bus.</p>
  156. <dl class="params"><dt>Parameters</dt><dd>
  157. <table class="params">
  158. <tr><td class="paramdir">[in]</td><td class="paramname">chipSelectPin</td><td>SD card chip select pin. </td></tr>
  159. </table>
  160. </dd>
  161. </dl>
  162. <p>Implements <a class="el" href="class_sd_spi_base.html#a4a5455a0024e3e432430cd04953908d1">SdSpiBase</a>.</p>
  163. </div>
  164. </div>
  165. <a class="anchor" id="afe6909bd40f444c4680da3140b81de36"></a>
  166. <div class="memitem">
  167. <div class="memproto">
  168. <div class="memtemplate">
  169. template&lt;uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin&gt; </div>
  170. <table class="mlabels">
  171. <tr>
  172. <td class="mlabels-left">
  173. <table class="memname">
  174. <tr>
  175. <td class="memname">void <a class="el" href="class_sd_spi_soft.html">SdSpiSoft</a>&lt; MisoPin, MosiPin, SckPin &gt;::beginTransaction </td>
  176. <td>(</td>
  177. <td class="paramtype">uint8_t&#160;</td>
  178. <td class="paramname"><em>divisor</em></td><td>)</td>
  179. <td></td>
  180. </tr>
  181. </table>
  182. </td>
  183. <td class="mlabels-right">
  184. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  185. </tr>
  186. </table>
  187. </div><div class="memdoc">
  188. <p>Initialize hardware SPI - dummy for soft SPI </p><dl class="params"><dt>Parameters</dt><dd>
  189. <table class="params">
  190. <tr><td class="paramdir">[in]</td><td class="paramname">divisor</td><td>SCK divisor - ignored. </td></tr>
  191. </table>
  192. </dd>
  193. </dl>
  194. <p>Reimplemented from <a class="el" href="class_sd_spi_base.html#a31d53d87f8735b3c76876fb150a20378">SdSpiBase</a>.</p>
  195. </div>
  196. </div>
  197. <a class="anchor" id="a9efd9900dfc03582e433ff8939e96dff"></a>
  198. <div class="memitem">
  199. <div class="memproto">
  200. <div class="memtemplate">
  201. template&lt;uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin&gt; </div>
  202. <table class="mlabels">
  203. <tr>
  204. <td class="mlabels-left">
  205. <table class="memname">
  206. <tr>
  207. <td class="memname">void <a class="el" href="class_sd_spi_soft.html">SdSpiSoft</a>&lt; MisoPin, MosiPin, SckPin &gt;::endTransaction </td>
  208. <td>(</td>
  209. <td class="paramname"></td><td>)</td>
  210. <td></td>
  211. </tr>
  212. </table>
  213. </td>
  214. <td class="mlabels-right">
  215. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  216. </tr>
  217. </table>
  218. </div><div class="memdoc">
  219. <p>End SPI transaction - dummy for soft SPI </p>
  220. <p>Reimplemented from <a class="el" href="class_sd_spi_base.html#aceef8d93a30e4fccb4fd81d4e3c26b55">SdSpiBase</a>.</p>
  221. </div>
  222. </div>
  223. <a class="anchor" id="a8a004fe608a81458a1aa3a6716a80d74"></a>
  224. <div class="memitem">
  225. <div class="memproto">
  226. <div class="memtemplate">
  227. template&lt;uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin&gt; </div>
  228. <table class="mlabels">
  229. <tr>
  230. <td class="mlabels-left">
  231. <table class="memname">
  232. <tr>
  233. <td class="memname">uint8_t <a class="el" href="class_sd_spi_soft.html">SdSpiSoft</a>&lt; MisoPin, MosiPin, SckPin &gt;::receive </td>
  234. <td>(</td>
  235. <td class="paramname"></td><td>)</td>
  236. <td></td>
  237. </tr>
  238. </table>
  239. </td>
  240. <td class="mlabels-right">
  241. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  242. </tr>
  243. </table>
  244. </div><div class="memdoc">
  245. <p>Receive a byte.</p>
  246. <dl class="section return"><dt>Returns</dt><dd>The byte. </dd></dl>
  247. <p>Implements <a class="el" href="class_sd_spi_base.html#a3488ab01ed4412f2c7143cfd10a7503c">SdSpiBase</a>.</p>
  248. </div>
  249. </div>
  250. <a class="anchor" id="a256f21aeaff4f15a7a5402cccbcc32f1"></a>
  251. <div class="memitem">
  252. <div class="memproto">
  253. <div class="memtemplate">
  254. template&lt;uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin&gt; </div>
  255. <table class="mlabels">
  256. <tr>
  257. <td class="mlabels-left">
  258. <table class="memname">
  259. <tr>
  260. <td class="memname">uint8_t <a class="el" href="class_sd_spi_soft.html">SdSpiSoft</a>&lt; MisoPin, MosiPin, SckPin &gt;::receive </td>
  261. <td>(</td>
  262. <td class="paramtype">uint8_t *&#160;</td>
  263. <td class="paramname"><em>buf</em>, </td>
  264. </tr>
  265. <tr>
  266. <td class="paramkey"></td>
  267. <td></td>
  268. <td class="paramtype">size_t&#160;</td>
  269. <td class="paramname"><em>n</em>&#160;</td>
  270. </tr>
  271. <tr>
  272. <td></td>
  273. <td>)</td>
  274. <td></td><td></td>
  275. </tr>
  276. </table>
  277. </td>
  278. <td class="mlabels-right">
  279. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  280. </tr>
  281. </table>
  282. </div><div class="memdoc">
  283. <p>Receive multiple bytes.</p>
  284. <dl class="params"><dt>Parameters</dt><dd>
  285. <table class="params">
  286. <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Buffer to receive the data. </td></tr>
  287. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to receive.</td></tr>
  288. </table>
  289. </dd>
  290. </dl>
  291. <dl class="section return"><dt>Returns</dt><dd>Zero for no error or nonzero error code. </dd></dl>
  292. <p>Implements <a class="el" href="class_sd_spi_base.html#af5810e79d39a9f6de6435f92401531be">SdSpiBase</a>.</p>
  293. </div>
  294. </div>
  295. <a class="anchor" id="a96224c2c89d9b6118a2979252d682c2a"></a>
  296. <div class="memitem">
  297. <div class="memproto">
  298. <div class="memtemplate">
  299. template&lt;uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin&gt; </div>
  300. <table class="mlabels">
  301. <tr>
  302. <td class="mlabels-left">
  303. <table class="memname">
  304. <tr>
  305. <td class="memname">void <a class="el" href="class_sd_spi_soft.html">SdSpiSoft</a>&lt; MisoPin, MosiPin, SckPin &gt;::send </td>
  306. <td>(</td>
  307. <td class="paramtype">uint8_t&#160;</td>
  308. <td class="paramname"><em>data</em></td><td>)</td>
  309. <td></td>
  310. </tr>
  311. </table>
  312. </td>
  313. <td class="mlabels-right">
  314. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  315. </tr>
  316. </table>
  317. </div><div class="memdoc">
  318. <p>Send a byte.</p>
  319. <dl class="params"><dt>Parameters</dt><dd>
  320. <table class="params">
  321. <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Byte to send </td></tr>
  322. </table>
  323. </dd>
  324. </dl>
  325. <p>Implements <a class="el" href="class_sd_spi_base.html#a1f43194a47cb5403e82af651a370be00">SdSpiBase</a>.</p>
  326. </div>
  327. </div>
  328. <a class="anchor" id="a7f4cada25994f77cb8ed51f71465e334"></a>
  329. <div class="memitem">
  330. <div class="memproto">
  331. <div class="memtemplate">
  332. template&lt;uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin&gt; </div>
  333. <table class="mlabels">
  334. <tr>
  335. <td class="mlabels-left">
  336. <table class="memname">
  337. <tr>
  338. <td class="memname">void <a class="el" href="class_sd_spi_soft.html">SdSpiSoft</a>&lt; MisoPin, MosiPin, SckPin &gt;::send </td>
  339. <td>(</td>
  340. <td class="paramtype">const uint8_t *&#160;</td>
  341. <td class="paramname"><em>buf</em>, </td>
  342. </tr>
  343. <tr>
  344. <td class="paramkey"></td>
  345. <td></td>
  346. <td class="paramtype">size_t&#160;</td>
  347. <td class="paramname"><em>n</em>&#160;</td>
  348. </tr>
  349. <tr>
  350. <td></td>
  351. <td>)</td>
  352. <td></td><td></td>
  353. </tr>
  354. </table>
  355. </td>
  356. <td class="mlabels-right">
  357. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  358. </tr>
  359. </table>
  360. </div><div class="memdoc">
  361. <p>Send multiple bytes.</p>
  362. <dl class="params"><dt>Parameters</dt><dd>
  363. <table class="params">
  364. <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Buffer for data to be sent. </td></tr>
  365. <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of bytes to send. </td></tr>
  366. </table>
  367. </dd>
  368. </dl>
  369. <p>Implements <a class="el" href="class_sd_spi_base.html#a109f2f4213e7a763fb4e4dd3ec605c3b">SdSpiBase</a>.</p>
  370. </div>
  371. </div>
  372. <hr/>The documentation for this class was generated from the following file:<ul>
  373. <li>Arduino/libraries/SdFat/src/SdSpiCard/<a class="el" href="_sd_spi_8h.html">SdSpi.h</a></li>
  374. </ul>
  375. </div><!-- contents -->
  376. <!-- start footer part -->
  377. <hr class="footer"/><address class="footer"><small>
  378. Generated on Fri Feb 12 2016 13:43:49 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  379. <img class="footer" src="doxygen.png" alt="doxygen"/>
  380. </a> 1.8.10
  381. </small></address>
  382. </body>
  383. </html>