1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>OS_Printf</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">OS_Printf <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD><CODE>#include <nitro/os.h></CODE><BR> 15 <BR> 16 <CODE>void OS_Printf( const char *fmt, ... );</CODE> 17</DL> 18<H2>Arguments</H2> 19<TABLE border="1"> 20 <TBODY> 21 <TR> 22 <TD><B><I>fmt</I></B></TD> 23 <TD>Output format string.</TD> 24 </TR> 25 <TR> 26 <TD><B><I>...</I></B></TD> 27 <TD>Variable number of arguments</TD> 28 </TR> 29 </TBODY> 30</TABLE> 31<H2>Return Values</H2> 32<P>None.</P> 33<H2>Description</H2> 34<P>Outputs a string. A variable number of arguments can be given in accordance to the format string (output format string).</P> 35<BLOCKQUOTE style="background-color:#ffffcc"> 36<P>Example:<br /> OS_Printf( "variable test = %d\n", test );</P> 37</BLOCKQUOTE> 38<P>This function is compiled with weak symbols. Therefore, you can overwrite them with your own function definitions.</P> 39<P>This function is used for debugging. It will not be included in the final ROM version (<code>FINALROM</code>).</P> 40 41<H2>Note</H2> 42<P>The <FONT color="#000000"><CODE>OS_Printf</CODE> function consumes a lot of stack space. The IRQ stack used during interrupt and callback execution is not that big. Therefore, whenever possible use the <A href="OS_TPrintf.html"><CODE>OS_TPrintf</CODE></A> function, which is the lighter version, in deeply nested function calls within IRQ interrupts. When debug output freezes, you may be able to use the <A href="OS_TPrintf.html"><CODE>OS_TPrintf</CODE></A> function instead to prevent this from occurring.</FONT></P> 43<P>However, floating-point output is not supported by <A href="OS_TPrintf.html"><CODE>OS_TPrintf</CODE></A>.</P> 44<H2>See Also</H2> 45<P><CODE><A href="OS_PutString.html">OS_PutString</A><BR></CODE></P> 46<H2>Revision History</H2> 47<P>2004/11/25 Added description of weak symbols. <BR>2003/12/01 Initial version.</P> 48<hr><p>CONFIDENTIAL</p></body> 49</HTML>