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.

class_block_device_interface.html 16KB

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