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.

class_block_device_interface.html 16KB

5 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  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.14"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>SdFat: BlockDeviceInterface Class 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.14 -->
  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><!-- top -->
  61. <div class="header">
  62. <div class="summary">
  63. <a href="#pub-methods">Public Member Functions</a> &#124;
  64. <a href="class_block_device_interface-members.html">List of all members</a> </div>
  65. <div class="headertitle">
  66. <div class="title">BlockDeviceInterface Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  67. </div><!--header-->
  68. <div class="contents">
  69. <p><a class="el" href="class_block_device_interface.html" title="BlockDeviceInterface class. ">BlockDeviceInterface</a> class.
  70. <a href="class_block_device_interface.html#details">More...</a></p>
  71. <p><code>#include &lt;BlockDeviceInterface.h&gt;</code></p>
  72. <div class="dynheader">
  73. Inheritance diagram for BlockDeviceInterface:</div>
  74. <div class="dyncontent">
  75. <div class="center"><img src="class_block_device_interface__inherit__graph.png" border="0" usemap="#_block_device_interface_inherit__map" alt="Inheritance graph"/></div>
  76. <map name="_block_device_interface_inherit__map" id="_block_device_interface_inherit__map">
  77. <area shape="rect" id="node2" href="class_sd_card_interface.html" title="Abstract interface for an SD card. " alt="" coords="19,80,134,107"/>
  78. <area shape="rect" id="node3" href="class_sdio_card.html" title="Raw SDIO access to SD and SDHC flash memory cards. " alt="" coords="39,155,114,181"/>
  79. </map>
  80. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  81. <table class="memberdecls">
  82. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  83. Public Member Functions</h2></td></tr>
  84. <tr class="memitem:a537ffdf8645666ee60d9bee0d7e3d17e"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_block_device_interface.html#a537ffdf8645666ee60d9bee0d7e3d17e">readSector</a> (uint32_t sector, uint8_t *dst)=0</td></tr>
  85. <tr class="separator:a537ffdf8645666ee60d9bee0d7e3d17e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. <tr class="memitem:aeee2944296d4aaabd00ee7be90596c5c"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_block_device_interface.html#aeee2944296d4aaabd00ee7be90596c5c">readSectors</a> (uint32_t sector, uint8_t *dst, size_t ns)=0</td></tr>
  87. <tr class="separator:aeee2944296d4aaabd00ee7be90596c5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  88. <tr class="memitem:a1531ba16d499510ae60be288112faae1"><td class="memItemLeft" align="right" valign="top">virtual uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_block_device_interface.html#a1531ba16d499510ae60be288112faae1">sectorCount</a> ()=0</td></tr>
  89. <tr class="separator:a1531ba16d499510ae60be288112faae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:a23e30999f1cc03da99e285cf180dbbb7"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_block_device_interface.html#a23e30999f1cc03da99e285cf180dbbb7">syncDevice</a> ()=0</td></tr>
  91. <tr class="separator:a23e30999f1cc03da99e285cf180dbbb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  92. <tr class="memitem:a8a4be0a85c3771c705617fad98303e49"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_block_device_interface.html#a8a4be0a85c3771c705617fad98303e49">writeSector</a> (uint32_t sector, const uint8_t *src)=0</td></tr>
  93. <tr class="separator:a8a4be0a85c3771c705617fad98303e49"><td class="memSeparator" colspan="2">&#160;</td></tr>
  94. <tr class="memitem:a5cb063692a65f092ccdfd14f8700b58a"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_block_device_interface.html#a5cb063692a65f092ccdfd14f8700b58a">writeSectors</a> (uint32_t sector, const uint8_t *src, size_t ns)=0</td></tr>
  95. <tr class="separator:a5cb063692a65f092ccdfd14f8700b58a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. </table>
  97. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  98. <div class="textblock"><p><a class="el" href="class_block_device_interface.html" title="BlockDeviceInterface class. ">BlockDeviceInterface</a> class. </p>
  99. </div><h2 class="groupheader">Member Function Documentation</h2>
  100. <a id="a537ffdf8645666ee60d9bee0d7e3d17e"></a>
  101. <h2 class="memtitle"><span class="permalink"><a href="#a537ffdf8645666ee60d9bee0d7e3d17e">&#9670;&nbsp;</a></span>readSector()</h2>
  102. <div class="memitem">
  103. <div class="memproto">
  104. <table class="mlabels">
  105. <tr>
  106. <td class="mlabels-left">
  107. <table class="memname">
  108. <tr>
  109. <td class="memname">virtual bool BlockDeviceInterface::readSector </td>
  110. <td>(</td>
  111. <td class="paramtype">uint32_t&#160;</td>
  112. <td class="paramname"><em>sector</em>, </td>
  113. </tr>
  114. <tr>
  115. <td class="paramkey"></td>
  116. <td></td>
  117. <td class="paramtype">uint8_t *&#160;</td>
  118. <td class="paramname"><em>dst</em>&#160;</td>
  119. </tr>
  120. <tr>
  121. <td></td>
  122. <td>)</td>
  123. <td></td><td></td>
  124. </tr>
  125. </table>
  126. </td>
  127. <td class="mlabels-right">
  128. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  129. </tr>
  130. </table>
  131. </div><div class="memdoc">
  132. <p>Read a 512 byte sector.</p>
  133. <dl class="params"><dt>Parameters</dt><dd>
  134. <table class="params">
  135. <tr><td class="paramdir">[in]</td><td class="paramname">sector</td><td>Logical sector to be read. </td></tr>
  136. <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location that will receive the data. </td></tr>
  137. </table>
  138. </dd>
  139. </dl>
  140. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  141. <p>Implemented in <a class="el" href="class_sdio_card.html#a77ae4fbe24bb04b74af5d388d4139dde">SdioCard</a>.</p>
  142. </div>
  143. </div>
  144. <a id="aeee2944296d4aaabd00ee7be90596c5c"></a>
  145. <h2 class="memtitle"><span class="permalink"><a href="#aeee2944296d4aaabd00ee7be90596c5c">&#9670;&nbsp;</a></span>readSectors()</h2>
  146. <div class="memitem">
  147. <div class="memproto">
  148. <table class="mlabels">
  149. <tr>
  150. <td class="mlabels-left">
  151. <table class="memname">
  152. <tr>
  153. <td class="memname">virtual bool BlockDeviceInterface::readSectors </td>
  154. <td>(</td>
  155. <td class="paramtype">uint32_t&#160;</td>
  156. <td class="paramname"><em>sector</em>, </td>
  157. </tr>
  158. <tr>
  159. <td class="paramkey"></td>
  160. <td></td>
  161. <td class="paramtype">uint8_t *&#160;</td>
  162. <td class="paramname"><em>dst</em>, </td>
  163. </tr>
  164. <tr>
  165. <td class="paramkey"></td>
  166. <td></td>
  167. <td class="paramtype">size_t&#160;</td>
  168. <td class="paramname"><em>ns</em>&#160;</td>
  169. </tr>
  170. <tr>
  171. <td></td>
  172. <td>)</td>
  173. <td></td><td></td>
  174. </tr>
  175. </table>
  176. </td>
  177. <td class="mlabels-right">
  178. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  179. </tr>
  180. </table>
  181. </div><div class="memdoc">
  182. <p>Read multiple 512 byte sectors.</p>
  183. <dl class="params"><dt>Parameters</dt><dd>
  184. <table class="params">
  185. <tr><td class="paramdir">[in]</td><td class="paramname">sector</td><td>Logical sector to be read. </td></tr>
  186. <tr><td class="paramdir">[in]</td><td class="paramname">ns</td><td>Number of sectors to be read. </td></tr>
  187. <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the location that will receive the data. </td></tr>
  188. </table>
  189. </dd>
  190. </dl>
  191. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  192. <p>Implemented in <a class="el" href="class_sdio_card.html#a1ed4229446a5a2fe815d460b027243b9">SdioCard</a>.</p>
  193. </div>
  194. </div>
  195. <a id="a1531ba16d499510ae60be288112faae1"></a>
  196. <h2 class="memtitle"><span class="permalink"><a href="#a1531ba16d499510ae60be288112faae1">&#9670;&nbsp;</a></span>sectorCount()</h2>
  197. <div class="memitem">
  198. <div class="memproto">
  199. <table class="mlabels">
  200. <tr>
  201. <td class="mlabels-left">
  202. <table class="memname">
  203. <tr>
  204. <td class="memname">virtual uint32_t BlockDeviceInterface::sectorCount </td>
  205. <td>(</td>
  206. <td class="paramname"></td><td>)</td>
  207. <td></td>
  208. </tr>
  209. </table>
  210. </td>
  211. <td class="mlabels-right">
  212. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  213. </tr>
  214. </table>
  215. </div><div class="memdoc">
  216. <dl class="section return"><dt>Returns</dt><dd>device size in sectors. </dd></dl>
  217. <p>Implemented in <a class="el" href="class_sd_card_interface.html#a1a8c37709b578bffc556240f6f03a8da">SdCardInterface</a>, and <a class="el" href="class_sdio_card.html#a49a502cf7b59dc559a6c75a3285e6c1a">SdioCard</a>.</p>
  218. </div>
  219. </div>
  220. <a id="a23e30999f1cc03da99e285cf180dbbb7"></a>
  221. <h2 class="memtitle"><span class="permalink"><a href="#a23e30999f1cc03da99e285cf180dbbb7">&#9670;&nbsp;</a></span>syncDevice()</h2>
  222. <div class="memitem">
  223. <div class="memproto">
  224. <table class="mlabels">
  225. <tr>
  226. <td class="mlabels-left">
  227. <table class="memname">
  228. <tr>
  229. <td class="memname">virtual bool BlockDeviceInterface::syncDevice </td>
  230. <td>(</td>
  231. <td class="paramname"></td><td>)</td>
  232. <td></td>
  233. </tr>
  234. </table>
  235. </td>
  236. <td class="mlabels-right">
  237. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  238. </tr>
  239. </table>
  240. </div><div class="memdoc">
  241. <p>End multi-sector transfer and go to idle state. </p><dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  242. <p>Implemented in <a class="el" href="class_sdio_card.html#a1201ec7a6fa91b73a1daa584a1b055f7">SdioCard</a>.</p>
  243. </div>
  244. </div>
  245. <a id="a8a4be0a85c3771c705617fad98303e49"></a>
  246. <h2 class="memtitle"><span class="permalink"><a href="#a8a4be0a85c3771c705617fad98303e49">&#9670;&nbsp;</a></span>writeSector()</h2>
  247. <div class="memitem">
  248. <div class="memproto">
  249. <table class="mlabels">
  250. <tr>
  251. <td class="mlabels-left">
  252. <table class="memname">
  253. <tr>
  254. <td class="memname">virtual bool BlockDeviceInterface::writeSector </td>
  255. <td>(</td>
  256. <td class="paramtype">uint32_t&#160;</td>
  257. <td class="paramname"><em>sector</em>, </td>
  258. </tr>
  259. <tr>
  260. <td class="paramkey"></td>
  261. <td></td>
  262. <td class="paramtype">const uint8_t *&#160;</td>
  263. <td class="paramname"><em>src</em>&#160;</td>
  264. </tr>
  265. <tr>
  266. <td></td>
  267. <td>)</td>
  268. <td></td><td></td>
  269. </tr>
  270. </table>
  271. </td>
  272. <td class="mlabels-right">
  273. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  274. </tr>
  275. </table>
  276. </div><div class="memdoc">
  277. <p>Writes a 512 byte sector.</p>
  278. <dl class="params"><dt>Parameters</dt><dd>
  279. <table class="params">
  280. <tr><td class="paramdir">[in]</td><td class="paramname">sector</td><td>Logical sector to be written. </td></tr>
  281. <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
  282. </table>
  283. </dd>
  284. </dl>
  285. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  286. <p>Implemented in <a class="el" href="class_sdio_card.html#a74919a168bac68028ce62222500cf238">SdioCard</a>.</p>
  287. </div>
  288. </div>
  289. <a id="a5cb063692a65f092ccdfd14f8700b58a"></a>
  290. <h2 class="memtitle"><span class="permalink"><a href="#a5cb063692a65f092ccdfd14f8700b58a">&#9670;&nbsp;</a></span>writeSectors()</h2>
  291. <div class="memitem">
  292. <div class="memproto">
  293. <table class="mlabels">
  294. <tr>
  295. <td class="mlabels-left">
  296. <table class="memname">
  297. <tr>
  298. <td class="memname">virtual bool BlockDeviceInterface::writeSectors </td>
  299. <td>(</td>
  300. <td class="paramtype">uint32_t&#160;</td>
  301. <td class="paramname"><em>sector</em>, </td>
  302. </tr>
  303. <tr>
  304. <td class="paramkey"></td>
  305. <td></td>
  306. <td class="paramtype">const uint8_t *&#160;</td>
  307. <td class="paramname"><em>src</em>, </td>
  308. </tr>
  309. <tr>
  310. <td class="paramkey"></td>
  311. <td></td>
  312. <td class="paramtype">size_t&#160;</td>
  313. <td class="paramname"><em>ns</em>&#160;</td>
  314. </tr>
  315. <tr>
  316. <td></td>
  317. <td>)</td>
  318. <td></td><td></td>
  319. </tr>
  320. </table>
  321. </td>
  322. <td class="mlabels-right">
  323. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  324. </tr>
  325. </table>
  326. </div><div class="memdoc">
  327. <p>Write multiple 512 byte sectors.</p>
  328. <dl class="params"><dt>Parameters</dt><dd>
  329. <table class="params">
  330. <tr><td class="paramdir">[in]</td><td class="paramname">sector</td><td>Logical sector to be written. </td></tr>
  331. <tr><td class="paramdir">[in]</td><td class="paramname">ns</td><td>Number of sectors to be written. </td></tr>
  332. <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to the location of the data to be written. </td></tr>
  333. </table>
  334. </dd>
  335. </dl>
  336. <dl class="section return"><dt>Returns</dt><dd>true for success or false for failure. </dd></dl>
  337. <p>Implemented in <a class="el" href="class_sdio_card.html#a55e2fc82ef9ecf7272a94b565c50303b">SdioCard</a>.</p>
  338. </div>
  339. </div>
  340. <hr/>The documentation for this class was generated from the following file:<ul>
  341. <li>ArduinoSdFat/libraries/SdFat/src/common/<a class="el" href="_block_device_interface_8h.html">BlockDeviceInterface.h</a></li>
  342. </ul>
  343. </div><!-- contents -->
  344. <!-- start footer part -->
  345. <hr class="footer"/><address class="footer"><small>
  346. Generated on Thu May 9 2019 06:51:28 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  347. <img class="footer" src="doxygen.png" alt="doxygen"/>
  348. </a> 1.8.14
  349. </small></address>
  350. </body>
  351. </html>