Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

425 lines
24KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.16"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>SdFat: ArduinoSdFat/libraries/SdFat/src/SpiDriver/SdSpiDriver.h File Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">SdFat
  25. </div>
  26. </td>
  27. </tr>
  28. </tbody>
  29. </table>
  30. </div>
  31. <!-- end header part -->
  32. <!-- Generated by Doxygen 1.8.16 -->
  33. <script type="text/javascript">
  34. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. /* @license-end */
  37. </script>
  38. <script type="text/javascript" src="menudata.js"></script>
  39. <script type="text/javascript" src="menu.js"></script>
  40. <script type="text/javascript">
  41. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  42. $(function() {
  43. initMenu('',true,false,'search.php','Search');
  44. $(document).ready(function() { init_search(); });
  45. });
  46. /* @license-end */</script>
  47. <div id="main-nav"></div>
  48. <!-- window showing the filter options -->
  49. <div id="MSearchSelectWindow"
  50. onmouseover="return searchBox.OnSearchSelectShow()"
  51. onmouseout="return searchBox.OnSearchSelectHide()"
  52. onkeydown="return searchBox.OnSearchSelectKey(event)">
  53. </div>
  54. <!-- iframe showing the search results (closed by default) -->
  55. <div id="MSearchResultsWindow">
  56. <iframe src="javascript:void(0)" frameborder="0"
  57. name="MSearchResults" id="MSearchResults">
  58. </iframe>
  59. </div>
  60. <div id="nav-path" class="navpath">
  61. <ul>
  62. <li class="navelem"><a class="el" href="dir_bd3b508a448b79faa7486a2af0c5c4a2.html">ArduinoSdFat</a></li><li class="navelem"><a class="el" href="dir_d7cdc5eb6907b67ec8d6facf0ac28083.html">libraries</a></li><li class="navelem"><a class="el" href="dir_30f4e013e11264f0426cd7e4f10b230b.html">SdFat</a></li><li class="navelem"><a class="el" href="dir_ffa9b8a1695a52c2b9469cb7873a40f4.html">src</a></li><li class="navelem"><a class="el" href="dir_00bd6ec11a5e8396a31c0ecb5ef15fc7.html">SpiDriver</a></li> </ul>
  63. </div>
  64. </div><!-- top -->
  65. <div class="header">
  66. <div class="summary">
  67. <a href="#nested-classes">Classes</a> &#124;
  68. <a href="#define-members">Macros</a> &#124;
  69. <a href="#typedef-members">Typedefs</a> &#124;
  70. <a href="#func-members">Functions</a> </div>
  71. <div class="headertitle">
  72. <div class="title">SdSpiDriver.h File Reference</div> </div>
  73. </div><!--header-->
  74. <div class="contents">
  75. <p>SpiDriver classes.
  76. <a href="#details">More...</a></p>
  77. <div class="textblock"><code>#include &quot;<a class="el" href="_sys_call_8h.html">../common/SysCall.h</a>&quot;</code><br />
  78. <code>#include &quot;SPI.h&quot;</code><br />
  79. <code>#include &quot;<a class="el" href="_sd_spi_arduino_driver_8h.html">SdSpiArduinoDriver.h</a>&quot;</code><br />
  80. </div><div class="textblock"><div class="dynheader">
  81. Include dependency graph for SdSpiDriver.h:</div>
  82. <div class="dyncontent">
  83. <div class="center"><img src="_sd_spi_driver_8h__incl.png" border="0" usemap="#_arduino_sd_fat_2libraries_2_sd_fat_2src_2_spi_driver_2_sd_spi_driver_8h" alt=""/></div>
  84. <map name="_arduino_sd_fat_2libraries_2_sd_fat_2src_2_spi_driver_2_sd_spi_driver_8h" id="_arduino_sd_fat_2libraries_2_sd_fat_2src_2_spi_driver_2_sd_spi_driver_8h">
  85. <area shape="rect" title="SpiDriver classes." alt="" coords="94,5,314,47"/>
  86. <area shape="rect" href="_sys_call_8h.html" title="SysCall class." alt="" coords="5,95,149,121"/>
  87. <area shape="rect" title=" " alt="" coords="177,95,231,121"/>
  88. <area shape="rect" href="_sd_spi_arduino_driver_8h.html" title="SpiDriver classes for Arduino compatible systems." alt="" coords="260,95,404,121"/>
  89. <area shape="rect" title=" " alt="" coords="18,244,83,271"/>
  90. <area shape="rect" title=" " alt="" coords="42,169,110,196"/>
  91. <area shape="rect" href="_sd_fat_config_8h.html" title="configuration definitions" alt="" coords="134,169,250,196"/>
  92. <area shape="rect" title=" " alt="" coords="153,244,231,271"/>
  93. <area shape="rect" href="_sd_spi_lib_driver_8h.html" title="Class using only simple SPI library functions." alt="" coords="275,169,392,196"/>
  94. </map>
  95. </div>
  96. </div><div class="textblock"><div class="dynheader">
  97. This graph shows which files directly or indirectly include this file:</div>
  98. <div class="dyncontent">
  99. <div class="center"><img src="_sd_spi_driver_8h__dep__incl.png" border="0" usemap="#_arduino_sd_fat_2libraries_2_sd_fat_2src_2_spi_driver_2_sd_spi_driver_8hdep" alt=""/></div>
  100. <map name="_arduino_sd_fat_2libraries_2_sd_fat_2src_2_spi_driver_2_sd_spi_driver_8hdep" id="_arduino_sd_fat_2libraries_2_sd_fat_2src_2_spi_driver_2_sd_spi_driver_8hdep">
  101. <area shape="rect" title="SpiDriver classes." alt="" coords="5,5,225,47"/>
  102. <area shape="rect" href="_sd_spi_card_8h.html" title="SdSpiCard class for V2 SD/SDHC cards." alt="" coords="12,95,219,136"/>
  103. </map>
  104. </div>
  105. </div><table class="memberdecls">
  106. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
  107. Classes</h2></td></tr>
  108. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_spi_config.html">SdSpiConfig</a></td></tr>
  109. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI card configuration. <a href="class_sd_spi_config.html#details">More...</a><br /></td></tr>
  110. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. </table><table class="memberdecls">
  112. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  113. Macros</h2></td></tr>
  114. <tr class="memitem:a666c394438267afda9b1e63f6b61459c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#a666c394438267afda9b1e63f6b61459c">DEDICATED_SPI</a>&#160;&#160;&#160;0X80</td></tr>
  115. <tr class="separator:a666c394438267afda9b1e63f6b61459c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:a7509778808cb232d96b7c45ad76034b0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(maxSpeed)&#160;&#160;&#160;(maxSpeed)</td></tr>
  117. <tr class="separator:a7509778808cb232d96b7c45ad76034b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <tr class="memitem:af9d0d377262ffe2bf47d8604381a5ec1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#af9d0d377262ffe2bf47d8604381a5ec1">SD_SCK_MHZ</a>(maxMhz)&#160;&#160;&#160;(1000000UL*(maxMhz))</td></tr>
  119. <tr class="separator:af9d0d377262ffe2bf47d8604381a5ec1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a5601868235dd7041b2e6e0be9445fe5d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#a5601868235dd7041b2e6e0be9445fe5d">SHARED_SPI</a>&#160;&#160;&#160;0</td></tr>
  121. <tr class="separator:a5601868235dd7041b2e6e0be9445fe5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:a2d3c9c75ba6bea3fbcb82c2d0fbc21bb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#a2d3c9c75ba6bea3fbcb82c2d0fbc21bb">SPI_DIV3_SPEED</a>&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/3)</td></tr>
  123. <tr class="separator:a2d3c9c75ba6bea3fbcb82c2d0fbc21bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. <tr class="memitem:acbca47c0a33eec35109cea773bb65ee0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#acbca47c0a33eec35109cea773bb65ee0">SPI_DIV6_SPEED</a>&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/6)</td></tr>
  125. <tr class="separator:acbca47c0a33eec35109cea773bb65ee0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:a4818fb924fd75160a3fcd5d14abdc375"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#a4818fb924fd75160a3fcd5d14abdc375">SPI_EIGHTH_SPEED</a>&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/16)</td></tr>
  127. <tr class="separator:a4818fb924fd75160a3fcd5d14abdc375"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. <tr class="memitem:a785afdf191e080f93703ad0a6f8f3d3b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#a785afdf191e080f93703ad0a6f8f3d3b">SPI_FULL_SPEED</a>&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#af9d0d377262ffe2bf47d8604381a5ec1">SD_SCK_MHZ</a>(50)</td></tr>
  129. <tr class="separator:a785afdf191e080f93703ad0a6f8f3d3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. <tr class="memitem:af7493f43efa1c1be2b718bd3cc759d0e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#af7493f43efa1c1be2b718bd3cc759d0e">SPI_HALF_SPEED</a>&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/4)</td></tr>
  131. <tr class="separator:af7493f43efa1c1be2b718bd3cc759d0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <tr class="memitem:a3bfd4f8b788952234111778be51087ae"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#a3bfd4f8b788952234111778be51087ae">SPI_QUARTER_SPEED</a>&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/8)</td></tr>
  133. <tr class="separator:a3bfd4f8b788952234111778be51087ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
  134. <tr class="memitem:a6d3bbc68aed8dc3948669d0d40f4eb11"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#a6d3bbc68aed8dc3948669d0d40f4eb11">SPI_SIXTEENTH_SPEED</a>&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/32)</td></tr>
  135. <tr class="separator:a6d3bbc68aed8dc3948669d0d40f4eb11"><td class="memSeparator" colspan="2">&#160;</td></tr>
  136. </table><table class="memberdecls">
  137. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
  138. Typedefs</h2></td></tr>
  139. <tr class="memitem:a472d56ea7cb52ec5d68b3067baa000c3"><td class="memItemLeft" align="right" valign="top">typedef SPIClass&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#a472d56ea7cb52ec5d68b3067baa000c3">SpiPort_t</a></td></tr>
  140. <tr class="separator:a472d56ea7cb52ec5d68b3067baa000c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. </table><table class="memberdecls">
  142. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  143. Functions</h2></td></tr>
  144. <tr class="memitem:ad4854101780daaa378827ecb62ef86d9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#ad4854101780daaa378827ecb62ef86d9">sdCsInit</a> (<a class="el" href="_sd_fat_config_8h.html#a7a489fb14a59adf251794342604fc5ea">SdCsPin_t</a> pin)</td></tr>
  145. <tr class="separator:ad4854101780daaa378827ecb62ef86d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  146. <tr class="memitem:ac469bbe2d31ffde9b00ffc68258d7428"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_sd_spi_driver_8h.html#ac469bbe2d31ffde9b00ffc68258d7428">sdCsWrite</a> (<a class="el" href="_sd_fat_config_8h.html#a7a489fb14a59adf251794342604fc5ea">SdCsPin_t</a> pin, bool level)</td></tr>
  147. <tr class="separator:ac469bbe2d31ffde9b00ffc68258d7428"><td class="memSeparator" colspan="2">&#160;</td></tr>
  148. </table>
  149. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  150. <div class="textblock"><p>SpiDriver classes. </p>
  151. <p>Copyright (c) 2011-2019 Bill Greiman This file is part of the SdFat library for SD memory cards.</p>
  152. <p>MIT License</p>
  153. <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
  154. <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
  155. <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
  156. </div><h2 class="groupheader">Macro Definition Documentation</h2>
  157. <a id="a666c394438267afda9b1e63f6b61459c"></a>
  158. <h2 class="memtitle"><span class="permalink"><a href="#a666c394438267afda9b1e63f6b61459c">&#9670;&nbsp;</a></span>DEDICATED_SPI</h2>
  159. <div class="memitem">
  160. <div class="memproto">
  161. <table class="memname">
  162. <tr>
  163. <td class="memname">#define DEDICATED_SPI&#160;&#160;&#160;0X80</td>
  164. </tr>
  165. </table>
  166. </div><div class="memdoc">
  167. <p>The SD is the only device on the SPI bus. </p>
  168. </div>
  169. </div>
  170. <a id="a7509778808cb232d96b7c45ad76034b0"></a>
  171. <h2 class="memtitle"><span class="permalink"><a href="#a7509778808cb232d96b7c45ad76034b0">&#9670;&nbsp;</a></span>SD_SCK_HZ</h2>
  172. <div class="memitem">
  173. <div class="memproto">
  174. <table class="memname">
  175. <tr>
  176. <td class="memname">#define SD_SCK_HZ</td>
  177. <td>(</td>
  178. <td class="paramtype">&#160;</td>
  179. <td class="paramname">maxSpeed</td><td>)</td>
  180. <td>&#160;&#160;&#160;(maxSpeed)</td>
  181. </tr>
  182. </table>
  183. </div><div class="memdoc">
  184. <p>SPISettings for SCK frequency in Hz. </p>
  185. </div>
  186. </div>
  187. <a id="af9d0d377262ffe2bf47d8604381a5ec1"></a>
  188. <h2 class="memtitle"><span class="permalink"><a href="#af9d0d377262ffe2bf47d8604381a5ec1">&#9670;&nbsp;</a></span>SD_SCK_MHZ</h2>
  189. <div class="memitem">
  190. <div class="memproto">
  191. <table class="memname">
  192. <tr>
  193. <td class="memname">#define SD_SCK_MHZ</td>
  194. <td>(</td>
  195. <td class="paramtype">&#160;</td>
  196. <td class="paramname">maxMhz</td><td>)</td>
  197. <td>&#160;&#160;&#160;(1000000UL*(maxMhz))</td>
  198. </tr>
  199. </table>
  200. </div><div class="memdoc">
  201. <p>SPISettings for SCK frequency in MHz. </p>
  202. </div>
  203. </div>
  204. <a id="a5601868235dd7041b2e6e0be9445fe5d"></a>
  205. <h2 class="memtitle"><span class="permalink"><a href="#a5601868235dd7041b2e6e0be9445fe5d">&#9670;&nbsp;</a></span>SHARED_SPI</h2>
  206. <div class="memitem">
  207. <div class="memproto">
  208. <table class="memname">
  209. <tr>
  210. <td class="memname">#define SHARED_SPI&#160;&#160;&#160;0</td>
  211. </tr>
  212. </table>
  213. </div><div class="memdoc">
  214. <p>SPI bus is share with other devices. </p>
  215. </div>
  216. </div>
  217. <a id="a2d3c9c75ba6bea3fbcb82c2d0fbc21bb"></a>
  218. <h2 class="memtitle"><span class="permalink"><a href="#a2d3c9c75ba6bea3fbcb82c2d0fbc21bb">&#9670;&nbsp;</a></span>SPI_DIV3_SPEED</h2>
  219. <div class="memitem">
  220. <div class="memproto">
  221. <table class="memname">
  222. <tr>
  223. <td class="memname">#define SPI_DIV3_SPEED&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/3)</td>
  224. </tr>
  225. </table>
  226. </div><div class="memdoc">
  227. <p>Set SCK rate to F_CPU/3 for Due </p>
  228. </div>
  229. </div>
  230. <a id="acbca47c0a33eec35109cea773bb65ee0"></a>
  231. <h2 class="memtitle"><span class="permalink"><a href="#acbca47c0a33eec35109cea773bb65ee0">&#9670;&nbsp;</a></span>SPI_DIV6_SPEED</h2>
  232. <div class="memitem">
  233. <div class="memproto">
  234. <table class="memname">
  235. <tr>
  236. <td class="memname">#define SPI_DIV6_SPEED&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/6)</td>
  237. </tr>
  238. </table>
  239. </div><div class="memdoc">
  240. <p>Set SCK rate to F_CPU/6 for Due </p>
  241. </div>
  242. </div>
  243. <a id="a4818fb924fd75160a3fcd5d14abdc375"></a>
  244. <h2 class="memtitle"><span class="permalink"><a href="#a4818fb924fd75160a3fcd5d14abdc375">&#9670;&nbsp;</a></span>SPI_EIGHTH_SPEED</h2>
  245. <div class="memitem">
  246. <div class="memproto">
  247. <table class="memname">
  248. <tr>
  249. <td class="memname">#define SPI_EIGHTH_SPEED&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/16)</td>
  250. </tr>
  251. </table>
  252. </div><div class="memdoc">
  253. <p>Set SCK rate to F_CPU/16. </p>
  254. </div>
  255. </div>
  256. <a id="a785afdf191e080f93703ad0a6f8f3d3b"></a>
  257. <h2 class="memtitle"><span class="permalink"><a href="#a785afdf191e080f93703ad0a6f8f3d3b">&#9670;&nbsp;</a></span>SPI_FULL_SPEED</h2>
  258. <div class="memitem">
  259. <div class="memproto">
  260. <table class="memname">
  261. <tr>
  262. <td class="memname">#define SPI_FULL_SPEED&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#af9d0d377262ffe2bf47d8604381a5ec1">SD_SCK_MHZ</a>(50)</td>
  263. </tr>
  264. </table>
  265. </div><div class="memdoc">
  266. <p>Set SCK to max rate. </p>
  267. </div>
  268. </div>
  269. <a id="af7493f43efa1c1be2b718bd3cc759d0e"></a>
  270. <h2 class="memtitle"><span class="permalink"><a href="#af7493f43efa1c1be2b718bd3cc759d0e">&#9670;&nbsp;</a></span>SPI_HALF_SPEED</h2>
  271. <div class="memitem">
  272. <div class="memproto">
  273. <table class="memname">
  274. <tr>
  275. <td class="memname">#define SPI_HALF_SPEED&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/4)</td>
  276. </tr>
  277. </table>
  278. </div><div class="memdoc">
  279. <p>Set SCK rate to F_CPU/4. </p>
  280. </div>
  281. </div>
  282. <a id="a3bfd4f8b788952234111778be51087ae"></a>
  283. <h2 class="memtitle"><span class="permalink"><a href="#a3bfd4f8b788952234111778be51087ae">&#9670;&nbsp;</a></span>SPI_QUARTER_SPEED</h2>
  284. <div class="memitem">
  285. <div class="memproto">
  286. <table class="memname">
  287. <tr>
  288. <td class="memname">#define SPI_QUARTER_SPEED&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/8)</td>
  289. </tr>
  290. </table>
  291. </div><div class="memdoc">
  292. <p>Set SCK rate to F_CPU/8. </p>
  293. </div>
  294. </div>
  295. <a id="a6d3bbc68aed8dc3948669d0d40f4eb11"></a>
  296. <h2 class="memtitle"><span class="permalink"><a href="#a6d3bbc68aed8dc3948669d0d40f4eb11">&#9670;&nbsp;</a></span>SPI_SIXTEENTH_SPEED</h2>
  297. <div class="memitem">
  298. <div class="memproto">
  299. <table class="memname">
  300. <tr>
  301. <td class="memname">#define SPI_SIXTEENTH_SPEED&#160;&#160;&#160;<a class="el" href="_sd_spi_driver_8h.html#a7509778808cb232d96b7c45ad76034b0">SD_SCK_HZ</a>(F_CPU/32)</td>
  302. </tr>
  303. </table>
  304. </div><div class="memdoc">
  305. <p>Set SCK rate to F_CPU/32. </p>
  306. </div>
  307. </div>
  308. <h2 class="groupheader">Typedef Documentation</h2>
  309. <a id="a472d56ea7cb52ec5d68b3067baa000c3"></a>
  310. <h2 class="memtitle"><span class="permalink"><a href="#a472d56ea7cb52ec5d68b3067baa000c3">&#9670;&nbsp;</a></span>SpiPort_t</h2>
  311. <div class="memitem">
  312. <div class="memproto">
  313. <table class="memname">
  314. <tr>
  315. <td class="memname">typedef SPIClass <a class="el" href="_sd_spi_driver_8h.html#a472d56ea7cb52ec5d68b3067baa000c3">SpiPort_t</a></td>
  316. </tr>
  317. </table>
  318. </div><div class="memdoc">
  319. <p>Port type for SPI hardware driver. </p>
  320. </div>
  321. </div>
  322. <h2 class="groupheader">Function Documentation</h2>
  323. <a id="ad4854101780daaa378827ecb62ef86d9"></a>
  324. <h2 class="memtitle"><span class="permalink"><a href="#ad4854101780daaa378827ecb62ef86d9">&#9670;&nbsp;</a></span>sdCsInit()</h2>
  325. <div class="memitem">
  326. <div class="memproto">
  327. <table class="memname">
  328. <tr>
  329. <td class="memname">void sdCsInit </td>
  330. <td>(</td>
  331. <td class="paramtype"><a class="el" href="_sd_fat_config_8h.html#a7a489fb14a59adf251794342604fc5ea">SdCsPin_t</a>&#160;</td>
  332. <td class="paramname"><em>pin</em></td><td>)</td>
  333. <td></td>
  334. </tr>
  335. </table>
  336. </div><div class="memdoc">
  337. <p>Initialize SD chip select pin.</p>
  338. <dl class="params"><dt>Parameters</dt><dd>
  339. <table class="params">
  340. <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>SD card chip select pin.</td></tr>
  341. </table>
  342. </dd>
  343. </dl>
  344. <p>Copyright (c) 2011-2019 Bill Greiman This file is part of the SdFat library for SD memory cards.</p>
  345. <p>MIT License</p>
  346. <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
  347. <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
  348. <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
  349. </div>
  350. </div>
  351. <a id="ac469bbe2d31ffde9b00ffc68258d7428"></a>
  352. <h2 class="memtitle"><span class="permalink"><a href="#ac469bbe2d31ffde9b00ffc68258d7428">&#9670;&nbsp;</a></span>sdCsWrite()</h2>
  353. <div class="memitem">
  354. <div class="memproto">
  355. <table class="memname">
  356. <tr>
  357. <td class="memname">void sdCsWrite </td>
  358. <td>(</td>
  359. <td class="paramtype"><a class="el" href="_sd_fat_config_8h.html#a7a489fb14a59adf251794342604fc5ea">SdCsPin_t</a>&#160;</td>
  360. <td class="paramname"><em>pin</em>, </td>
  361. </tr>
  362. <tr>
  363. <td class="paramkey"></td>
  364. <td></td>
  365. <td class="paramtype">bool&#160;</td>
  366. <td class="paramname"><em>level</em>&#160;</td>
  367. </tr>
  368. <tr>
  369. <td></td>
  370. <td>)</td>
  371. <td></td><td></td>
  372. </tr>
  373. </table>
  374. </div><div class="memdoc">
  375. <p>Initialize SD chip select pin.</p>
  376. <dl class="params"><dt>Parameters</dt><dd>
  377. <table class="params">
  378. <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>SD card chip select pin. </td></tr>
  379. <tr><td class="paramdir">[in]</td><td class="paramname">level</td><td>SD card chip select level. </td></tr>
  380. </table>
  381. </dd>
  382. </dl>
  383. </div>
  384. </div>
  385. </div><!-- contents -->
  386. <!-- start footer part -->
  387. <hr class="footer"/><address class="footer"><small>
  388. Generated on Fri Dec 6 2019 09:45:12 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  389. <img class="footer" src="doxygen.png" alt="doxygen"/>
  390. </a> 1.8.16
  391. </small></address>
  392. </body>
  393. </html>