選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

260 行
12KB

  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: SdFile 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="#pub-static-methods">Static Public Member Functions</a> &#124;
  65. <a href="class_sd_file-members.html">List of all members</a> </div>
  66. <div class="headertitle">
  67. <div class="title">SdFile Class Reference</div> </div>
  68. </div><!--header-->
  69. <div class="contents">
  70. <p>FAT16/FAT32 file with Print.
  71. <a href="class_sd_file.html#details">More...</a></p>
  72. <p><code>#include &lt;SdFat.h&gt;</code></p>
  73. <div class="dynheader">
  74. Inheritance diagram for SdFile:</div>
  75. <div class="dyncontent">
  76. <div class="center"><img src="class_sd_file__inherit__graph.png" border="0" usemap="#_sd_file_inherit__map" alt="Inheritance graph"/></div>
  77. <map name="_sd_file_inherit__map" id="_sd_file_inherit__map">
  78. <area shape="rect" id="node2" href="class_print_file.html" title="PrintFile\&lt; SdBaseFile \&gt;" alt="" coords="5,80,167,107"/>
  79. </map>
  80. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  81. <div class="dynheader">
  82. Collaboration diagram for SdFile:</div>
  83. <div class="dyncontent">
  84. <div class="center"><img src="class_sd_file__coll__graph.png" border="0" usemap="#_sd_file_coll__map" alt="Collaboration graph"/></div>
  85. <map name="_sd_file_coll__map" id="_sd_file_coll__map">
  86. <area shape="rect" id="node2" href="class_print_file.html" title="PrintFile\&lt; SdBaseFile \&gt;" alt="" coords="5,80,167,107"/>
  87. </map>
  88. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  89. <table class="memberdecls">
  90. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  91. Public Member Functions</h2></td></tr>
  92. <tr class="memitem:ad05be3a1fb635448d15a154424b6c33f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_file.html#ad05be3a1fb635448d15a154424b6c33f">SdFile</a> (const char *path, oflag_t oflag)</td></tr>
  93. <tr class="separator:ad05be3a1fb635448d15a154424b6c33f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  94. <tr class="memitem:a52f78f160083b416d66e23c680e0577d"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_print_file.html#a52f78f160083b416d66e23c680e0577d">write</a> (uint8_t b)</td></tr>
  95. <tr class="separator:a52f78f160083b416d66e23c680e0577d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. </table><table class="memberdecls">
  97. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
  98. Static Public Member Functions</h2></td></tr>
  99. <tr class="memitem:a2d78e6a8cedbf8ce545af68457b43bf1"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_file.html#a2d78e6a8cedbf8ce545af68457b43bf1">dateTimeCallback</a> (void(*dateTime)(uint16_t *date, uint16_t *time))</td></tr>
  100. <tr class="separator:a2d78e6a8cedbf8ce545af68457b43bf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:ad266770d0a779d1a528a3997aee5142d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd_file.html#ad266770d0a779d1a528a3997aee5142d">dateTimeCallbackCancel</a> ()</td></tr>
  102. <tr class="separator:ad266770d0a779d1a528a3997aee5142d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. </table>
  104. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  105. <div class="textblock"><p>FAT16/FAT32 file with Print. </p>
  106. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  107. <a id="ad05be3a1fb635448d15a154424b6c33f"></a>
  108. <h2 class="memtitle"><span class="permalink"><a href="#ad05be3a1fb635448d15a154424b6c33f">&#9670;&nbsp;</a></span>SdFile()</h2>
  109. <div class="memitem">
  110. <div class="memproto">
  111. <table class="mlabels">
  112. <tr>
  113. <td class="mlabels-left">
  114. <table class="memname">
  115. <tr>
  116. <td class="memname">SdFile::SdFile </td>
  117. <td>(</td>
  118. <td class="paramtype">const char *&#160;</td>
  119. <td class="paramname"><em>path</em>, </td>
  120. </tr>
  121. <tr>
  122. <td class="paramkey"></td>
  123. <td></td>
  124. <td class="paramtype">oflag_t&#160;</td>
  125. <td class="paramname"><em>oflag</em>&#160;</td>
  126. </tr>
  127. <tr>
  128. <td></td>
  129. <td>)</td>
  130. <td></td><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>Create an open <a class="el" href="class_sd_file.html" title="FAT16/FAT32 file with Print. ">SdFile</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  140. <table class="params">
  141. <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>path for file. </td></tr>
  142. <tr><td class="paramdir">[in]</td><td class="paramname">oflag</td><td>open flags. </td></tr>
  143. </table>
  144. </dd>
  145. </dl>
  146. </div>
  147. </div>
  148. <h2 class="groupheader">Member Function Documentation</h2>
  149. <a id="a2d78e6a8cedbf8ce545af68457b43bf1"></a>
  150. <h2 class="memtitle"><span class="permalink"><a href="#a2d78e6a8cedbf8ce545af68457b43bf1">&#9670;&nbsp;</a></span>dateTimeCallback()</h2>
  151. <div class="memitem">
  152. <div class="memproto">
  153. <table class="mlabels">
  154. <tr>
  155. <td class="mlabels-left">
  156. <table class="memname">
  157. <tr>
  158. <td class="memname">static void SdFile::dateTimeCallback </td>
  159. <td>(</td>
  160. <td class="paramtype">void(*)(uint16_t *date, uint16_t *time)&#160;</td>
  161. <td class="paramname"><em>dateTime</em></td><td>)</td>
  162. <td></td>
  163. </tr>
  164. </table>
  165. </td>
  166. <td class="mlabels-right">
  167. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
  168. </tr>
  169. </table>
  170. </div><div class="memdoc">
  171. <p>Set the date/time callback function</p>
  172. <dl class="params"><dt>Parameters</dt><dd>
  173. <table class="params">
  174. <tr><td class="paramdir">[in]</td><td class="paramname">dateTime</td><td>The user's call back function. The callback function is of the form:</td></tr>
  175. </table>
  176. </dd>
  177. </dl>
  178. <div class="fragment"><div class="line"><span class="keywordtype">void</span> dateTime(uint16_t* date, uint16_t* time) {</div><div class="line"> uint16_t year;</div><div class="line"> uint8_t month, day, hour, minute, second;</div><div class="line"></div><div class="line"> <span class="comment">// User gets date and time from GPS or real-time clock here</span></div><div class="line"></div><div class="line"> <span class="comment">// return date using FAT_DATE macro to format fields</span></div><div class="line"> *date = FAT_DATE(year, month, day);</div><div class="line"></div><div class="line"> <span class="comment">// return time using FAT_TIME macro to format fields</span></div><div class="line"> *time = FAT_TIME(hour, minute, second);</div><div class="line">}</div></div><!-- fragment --><p>Sets the function that is called when a file is created or when a file's directory entry is modified by sync(). All timestamps, access, creation, and modify, are set when a file is created. sync() maintains the last access date and last modify date/time. </p>
  179. </div>
  180. </div>
  181. <a id="ad266770d0a779d1a528a3997aee5142d"></a>
  182. <h2 class="memtitle"><span class="permalink"><a href="#ad266770d0a779d1a528a3997aee5142d">&#9670;&nbsp;</a></span>dateTimeCallbackCancel()</h2>
  183. <div class="memitem">
  184. <div class="memproto">
  185. <table class="mlabels">
  186. <tr>
  187. <td class="mlabels-left">
  188. <table class="memname">
  189. <tr>
  190. <td class="memname">static void SdFile::dateTimeCallbackCancel </td>
  191. <td>(</td>
  192. <td class="paramname"></td><td>)</td>
  193. <td></td>
  194. </tr>
  195. </table>
  196. </td>
  197. <td class="mlabels-right">
  198. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
  199. </tr>
  200. </table>
  201. </div><div class="memdoc">
  202. <p>Cancel the date/time callback function. </p>
  203. </div>
  204. </div>
  205. <a id="a52f78f160083b416d66e23c680e0577d"></a>
  206. <h2 class="memtitle"><span class="permalink"><a href="#a52f78f160083b416d66e23c680e0577d">&#9670;&nbsp;</a></span>write()</h2>
  207. <div class="memitem">
  208. <div class="memproto">
  209. <table class="mlabels">
  210. <tr>
  211. <td class="mlabels-left">
  212. <table class="memname">
  213. <tr>
  214. <td class="memname">size_t <a class="el" href="class_print_file.html">PrintFile</a>&lt; SdBaseFile &gt;::write </td>
  215. <td>(</td>
  216. <td class="paramtype">uint8_t&#160;</td>
  217. <td class="paramname"><em>b</em></td><td>)</td>
  218. <td></td>
  219. </tr>
  220. </table>
  221. </td>
  222. <td class="mlabels-right">
  223. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
  224. </tr>
  225. </table>
  226. </div><div class="memdoc">
  227. <p>Write a single byte. </p><dl class="params"><dt>Parameters</dt><dd>
  228. <table class="params">
  229. <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>byte to write. </td></tr>
  230. </table>
  231. </dd>
  232. </dl>
  233. <dl class="section return"><dt>Returns</dt><dd>one for success. </dd></dl>
  234. </div>
  235. </div>
  236. <hr/>The documentation for this class was generated from the following file:<ul>
  237. <li>ArduinoSdFat/libraries/SdFat/src/<a class="el" href="_sd_fat_8h.html">SdFat.h</a></li>
  238. </ul>
  239. </div><!-- contents -->
  240. <!-- start footer part -->
  241. <hr class="footer"/><address class="footer"><small>
  242. Generated on Thu May 9 2019 06:51:28 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  243. <img class="footer" src="doxygen.png" alt="doxygen"/>
  244. </a> 1.8.14
  245. </small></address>
  246. </body>
  247. </html>