Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

392 rindas
18KB

  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: ArduinoSdFat/libraries/SdFat/src/common/PrintTemplates.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.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 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_3fb0493066cff5e444f8bd6d60885f74.html">common</a></li> </ul>
  63. </div>
  64. </div><!-- top -->
  65. <div class="header">
  66. <div class="summary">
  67. <a href="#define-members">Macros</a> &#124;
  68. <a href="#func-members">Functions</a> </div>
  69. <div class="headertitle">
  70. <div class="title">PrintTemplates.h File Reference</div> </div>
  71. </div><!--header-->
  72. <div class="contents">
  73. <p>templates for printf
  74. <a href="#details">More...</a></p>
  75. <div class="textblock"><code>#include &lt;stdarg.h&gt;</code><br />
  76. <code>#include &quot;FmtNumber.h&quot;</code><br />
  77. </div><div class="textblock"><div class="dynheader">
  78. Include dependency graph for PrintTemplates.h:</div>
  79. <div class="dyncontent">
  80. <div class="center"><img src="_print_templates_8h__incl.png" border="0" usemap="#_arduino_sd_fat_2libraries_2_sd_fat_2src_2common_2_print_templates_8h" alt=""/></div>
  81. <map name="_arduino_sd_fat_2libraries_2_sd_fat_2src_2common_2_print_templates_8h" id="_arduino_sd_fat_2libraries_2_sd_fat_2src_2common_2_print_templates_8h">
  82. </map>
  83. </div>
  84. </div><table class="memberdecls">
  85. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  86. Macros</h2></td></tr>
  87. <tr class="memitem:ab82ae47ddc52e7a1a9400cc3c42a9de7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#ab82ae47ddc52e7a1a9400cc3c42a9de7">isDigit</a>(d)&#160;&#160;&#160;('0' &lt;= (d) &amp;&amp; (d) &lt;= '9')</td></tr>
  88. <tr class="separator:ab82ae47ddc52e7a1a9400cc3c42a9de7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  89. <tr class="memitem:a26baac10baccbe6d4f13f98981dd202a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#a26baac10baccbe6d4f13f98981dd202a">PRINTF_USE_FLOAT</a>&#160;&#160;&#160;2</td></tr>
  90. <tr class="separator:a26baac10baccbe6d4f13f98981dd202a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  91. </table><table class="memberdecls">
  92. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  93. Functions</h2></td></tr>
  94. <tr class="memitem:a3899b48e0eb6938ff58ca3accd53402a"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
  95. <tr class="memitem:a3899b48e0eb6938ff58ca3accd53402a"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#a3899b48e0eb6938ff58ca3accd53402a">fprintf</a> (T *file, const char *fmt,...)</td></tr>
  96. <tr class="separator:a3899b48e0eb6938ff58ca3accd53402a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <tr class="memitem:afceda1e76dbfc91ef2d06925a10eaea9"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
  98. <tr class="memitem:afceda1e76dbfc91ef2d06925a10eaea9"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#afceda1e76dbfc91ef2d06925a10eaea9">mprintf</a> (T *file, const char *fmt,...)</td></tr>
  99. <tr class="separator:afceda1e76dbfc91ef2d06925a10eaea9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  100. <tr class="memitem:a5893e928fd47234a7a69049f9e769359"><td class="memTemplParams" colspan="2">template&lt;typename F &gt; </td></tr>
  101. <tr class="memitem:a5893e928fd47234a7a69049f9e769359"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#a5893e928fd47234a7a69049f9e769359">mprintf</a> (F *file, const __FlashStringHelper *ifsh,...)</td></tr>
  102. <tr class="separator:a5893e928fd47234a7a69049f9e769359"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. <tr class="memitem:aa3bc14da82a850b0f8ce848a6d54045f"><td class="memTemplParams" colspan="2">template&lt;typename F &gt; </td></tr>
  104. <tr class="memitem:aa3bc14da82a850b0f8ce848a6d54045f"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#aa3bc14da82a850b0f8ce848a6d54045f">vfprintf</a> (F *file, const char *fmt, va_list ap)</td></tr>
  105. <tr class="separator:aa3bc14da82a850b0f8ce848a6d54045f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:ad139f8bf9b6ead8bd28abf1dd412a8a4"><td class="memTemplParams" colspan="2">template&lt;typename F &gt; </td></tr>
  107. <tr class="memitem:ad139f8bf9b6ead8bd28abf1dd412a8a4"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#ad139f8bf9b6ead8bd28abf1dd412a8a4">vmprintf</a> (F *file, const char *fmt, va_list ap)</td></tr>
  108. <tr class="separator:ad139f8bf9b6ead8bd28abf1dd412a8a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. </table>
  110. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  111. <div class="textblock"><p>templates for printf </p>
  112. <p>Copyright (c) 2011-2019 Bill Greiman This file is part of the SdFat library for SD memory cards.</p>
  113. <p>MIT License</p>
  114. <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>
  115. <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
  116. <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>
  117. </div><h2 class="groupheader">Macro Definition Documentation</h2>
  118. <a id="ab82ae47ddc52e7a1a9400cc3c42a9de7"></a>
  119. <h2 class="memtitle"><span class="permalink"><a href="#ab82ae47ddc52e7a1a9400cc3c42a9de7">&#9670;&nbsp;</a></span>isDigit</h2>
  120. <div class="memitem">
  121. <div class="memproto">
  122. <table class="memname">
  123. <tr>
  124. <td class="memname">#define isDigit</td>
  125. <td>(</td>
  126. <td class="paramtype">&#160;</td>
  127. <td class="paramname">d</td><td>)</td>
  128. <td>&#160;&#160;&#160;('0' &lt;= (d) &amp;&amp; (d) &lt;= '9')</td>
  129. </tr>
  130. </table>
  131. </div><div class="memdoc">
  132. <p>test for digit </p>
  133. </div>
  134. </div>
  135. <a id="a26baac10baccbe6d4f13f98981dd202a"></a>
  136. <h2 class="memtitle"><span class="permalink"><a href="#a26baac10baccbe6d4f13f98981dd202a">&#9670;&nbsp;</a></span>PRINTF_USE_FLOAT</h2>
  137. <div class="memitem">
  138. <div class="memproto">
  139. <table class="memname">
  140. <tr>
  141. <td class="memname">#define PRINTF_USE_FLOAT&#160;&#160;&#160;2</td>
  142. </tr>
  143. </table>
  144. </div><div class="memdoc">
  145. <p>control for supported floating formats </p>
  146. </div>
  147. </div>
  148. <h2 class="groupheader">Function Documentation</h2>
  149. <a id="a3899b48e0eb6938ff58ca3accd53402a"></a>
  150. <h2 class="memtitle"><span class="permalink"><a href="#a3899b48e0eb6938ff58ca3accd53402a">&#9670;&nbsp;</a></span>fprintf()</h2>
  151. <div class="memitem">
  152. <div class="memproto">
  153. <div class="memtemplate">
  154. template&lt;typename T &gt; </div>
  155. <table class="memname">
  156. <tr>
  157. <td class="memname">int fprintf </td>
  158. <td>(</td>
  159. <td class="paramtype">T *&#160;</td>
  160. <td class="paramname"><em>file</em>, </td>
  161. </tr>
  162. <tr>
  163. <td class="paramkey"></td>
  164. <td></td>
  165. <td class="paramtype">const char *&#160;</td>
  166. <td class="paramname"><em>fmt</em>, </td>
  167. </tr>
  168. <tr>
  169. <td class="paramkey"></td>
  170. <td></td>
  171. <td class="paramtype">&#160;</td>
  172. <td class="paramname"><em>...</em>&#160;</td>
  173. </tr>
  174. <tr>
  175. <td></td>
  176. <td>)</td>
  177. <td></td><td></td>
  178. </tr>
  179. </table>
  180. </div><div class="memdoc">
  181. <p>Formatted print.</p>
  182. <dl class="params"><dt>Parameters</dt><dd>
  183. <table class="params">
  184. <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>destination file or device. </td></tr>
  185. <tr><td class="paramdir">[in]</td><td class="paramname">fmt</td><td>format string.</td></tr>
  186. </table>
  187. </dd>
  188. </dl>
  189. <dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
  190. </div>
  191. </div>
  192. <a id="afceda1e76dbfc91ef2d06925a10eaea9"></a>
  193. <h2 class="memtitle"><span class="permalink"><a href="#afceda1e76dbfc91ef2d06925a10eaea9">&#9670;&nbsp;</a></span>mprintf() <span class="overload">[1/2]</span></h2>
  194. <div class="memitem">
  195. <div class="memproto">
  196. <div class="memtemplate">
  197. template&lt;typename T &gt; </div>
  198. <table class="memname">
  199. <tr>
  200. <td class="memname">int mprintf </td>
  201. <td>(</td>
  202. <td class="paramtype">T *&#160;</td>
  203. <td class="paramname"><em>file</em>, </td>
  204. </tr>
  205. <tr>
  206. <td class="paramkey"></td>
  207. <td></td>
  208. <td class="paramtype">const char *&#160;</td>
  209. <td class="paramname"><em>fmt</em>, </td>
  210. </tr>
  211. <tr>
  212. <td class="paramkey"></td>
  213. <td></td>
  214. <td class="paramtype">&#160;</td>
  215. <td class="paramname"><em>...</em>&#160;</td>
  216. </tr>
  217. <tr>
  218. <td></td>
  219. <td>)</td>
  220. <td></td><td></td>
  221. </tr>
  222. </table>
  223. </div><div class="memdoc">
  224. <p>Minimal formatted print.</p>
  225. <dl class="params"><dt>Parameters</dt><dd>
  226. <table class="params">
  227. <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>destination file or device. </td></tr>
  228. <tr><td class="paramdir">[in]</td><td class="paramname">fmt</td><td>format string.</td></tr>
  229. </table>
  230. </dd>
  231. </dl>
  232. <dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
  233. </div>
  234. </div>
  235. <a id="a5893e928fd47234a7a69049f9e769359"></a>
  236. <h2 class="memtitle"><span class="permalink"><a href="#a5893e928fd47234a7a69049f9e769359">&#9670;&nbsp;</a></span>mprintf() <span class="overload">[2/2]</span></h2>
  237. <div class="memitem">
  238. <div class="memproto">
  239. <div class="memtemplate">
  240. template&lt;typename F &gt; </div>
  241. <table class="memname">
  242. <tr>
  243. <td class="memname">int mprintf </td>
  244. <td>(</td>
  245. <td class="paramtype">F *&#160;</td>
  246. <td class="paramname"><em>file</em>, </td>
  247. </tr>
  248. <tr>
  249. <td class="paramkey"></td>
  250. <td></td>
  251. <td class="paramtype">const __FlashStringHelper *&#160;</td>
  252. <td class="paramname"><em>ifsh</em>, </td>
  253. </tr>
  254. <tr>
  255. <td class="paramkey"></td>
  256. <td></td>
  257. <td class="paramtype">&#160;</td>
  258. <td class="paramname"><em>...</em>&#160;</td>
  259. </tr>
  260. <tr>
  261. <td></td>
  262. <td>)</td>
  263. <td></td><td></td>
  264. </tr>
  265. </table>
  266. </div><div class="memdoc">
  267. <p>Minimal formatted print.</p>
  268. <dl class="params"><dt>Parameters</dt><dd>
  269. <table class="params">
  270. <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>destination file or device. </td></tr>
  271. <tr><td class="paramdir">[in]</td><td class="paramname">ifsh</td><td>format string using F() macro.</td></tr>
  272. </table>
  273. </dd>
  274. </dl>
  275. <dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
  276. </div>
  277. </div>
  278. <a id="aa3bc14da82a850b0f8ce848a6d54045f"></a>
  279. <h2 class="memtitle"><span class="permalink"><a href="#aa3bc14da82a850b0f8ce848a6d54045f">&#9670;&nbsp;</a></span>vfprintf()</h2>
  280. <div class="memitem">
  281. <div class="memproto">
  282. <div class="memtemplate">
  283. template&lt;typename F &gt; </div>
  284. <table class="memname">
  285. <tr>
  286. <td class="memname">int vfprintf </td>
  287. <td>(</td>
  288. <td class="paramtype">F *&#160;</td>
  289. <td class="paramname"><em>file</em>, </td>
  290. </tr>
  291. <tr>
  292. <td class="paramkey"></td>
  293. <td></td>
  294. <td class="paramtype">const char *&#160;</td>
  295. <td class="paramname"><em>fmt</em>, </td>
  296. </tr>
  297. <tr>
  298. <td class="paramkey"></td>
  299. <td></td>
  300. <td class="paramtype">va_list&#160;</td>
  301. <td class="paramname"><em>ap</em>&#160;</td>
  302. </tr>
  303. <tr>
  304. <td></td>
  305. <td>)</td>
  306. <td></td><td></td>
  307. </tr>
  308. </table>
  309. </div><div class="memdoc">
  310. <p>Formatted print.</p>
  311. <dl class="params"><dt>Parameters</dt><dd>
  312. <table class="params">
  313. <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>destination file or device. </td></tr>
  314. <tr><td class="paramdir">[in]</td><td class="paramname">fmt</td><td>format string. </td></tr>
  315. <tr><td class="paramdir">[in]</td><td class="paramname">ap</td><td>argument list.</td></tr>
  316. </table>
  317. </dd>
  318. </dl>
  319. <dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
  320. </div>
  321. </div>
  322. <a id="ad139f8bf9b6ead8bd28abf1dd412a8a4"></a>
  323. <h2 class="memtitle"><span class="permalink"><a href="#ad139f8bf9b6ead8bd28abf1dd412a8a4">&#9670;&nbsp;</a></span>vmprintf()</h2>
  324. <div class="memitem">
  325. <div class="memproto">
  326. <div class="memtemplate">
  327. template&lt;typename F &gt; </div>
  328. <table class="memname">
  329. <tr>
  330. <td class="memname">int vmprintf </td>
  331. <td>(</td>
  332. <td class="paramtype">F *&#160;</td>
  333. <td class="paramname"><em>file</em>, </td>
  334. </tr>
  335. <tr>
  336. <td class="paramkey"></td>
  337. <td></td>
  338. <td class="paramtype">const char *&#160;</td>
  339. <td class="paramname"><em>fmt</em>, </td>
  340. </tr>
  341. <tr>
  342. <td class="paramkey"></td>
  343. <td></td>
  344. <td class="paramtype">va_list&#160;</td>
  345. <td class="paramname"><em>ap</em>&#160;</td>
  346. </tr>
  347. <tr>
  348. <td></td>
  349. <td>)</td>
  350. <td></td><td></td>
  351. </tr>
  352. </table>
  353. </div><div class="memdoc">
  354. <p>Minimal formatted print.</p>
  355. <dl class="params"><dt>Parameters</dt><dd>
  356. <table class="params">
  357. <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>destination file or device. </td></tr>
  358. <tr><td class="paramdir">[in]</td><td class="paramname">fmt</td><td>format string. </td></tr>
  359. <tr><td class="paramdir">[in]</td><td class="paramname">ap</td><td>argument list.</td></tr>
  360. </table>
  361. </dd>
  362. </dl>
  363. <dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
  364. </div>
  365. </div>
  366. </div><!-- contents -->
  367. <!-- start footer part -->
  368. <hr class="footer"/><address class="footer"><small>
  369. Generated on Thu May 9 2019 06:51:28 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  370. <img class="footer" src="doxygen.png" alt="doxygen"/>
  371. </a> 1.8.14
  372. </small></address>
  373. </body>
  374. </html>